Oracle (CLI) - best use
Oracle bundles your prompt + selected files into one "one-shot" request so another model can answer with real repo context (API or browser automation). Treat outputs as advisory: verify against the codebase + tests.
Main use case (browser, GPT-5.2 Pro)
Default workflow here: --engine browser with GPT-5.2 Pro in ChatGPT. This is the "human in the loop" path: it can take ~10 minutes to ~1 hour; expect a stored session you can reattach to.
Recommended defaults:
- Engine: browser (
--engine browser)
- Model: GPT-5.2 Pro (either
--model gpt-5.2-pro or a ChatGPT picker label like --model "5.2 Pro")
- Browser:
--browser-manual-login --browser-keep-browser
- Attachments: directories/globs + excludes; avoid secrets.
Golden path (fast + reliable)
- Pick a tight file set (fewest files that still contain the truth).
- Preview what you're about to send (
--dry-run + --files-report when needed).
- Run in browser mode for the usual GPT-5.2 Pro ChatGPT workflow (prefer
--browser-manual-login --browser-keep-browser); use API only when you explicitly want it.
- If the run detaches/timeouts: reattach to the stored session (don't re-run).
Commands (preferred)
- Show help (once/session):
npx -y @steipete/oracle --help
- Preview (no tokens):
npx -y @steipete/oracle --dry-run summary -p "<task>" --file "src/**" --file "!**/*.test.*"
npx -y @steipete/oracle --dry-run full -p "<task>" --file "src/**"
- Token/cost sanity:
npx -y @steipete/oracle --dry-run summary --files-report -p "<task>" --file "src/**"
- Browser run (main path; long-running is normal):
npx -y @steipete/oracle --engine browser --browser-manual-login --browser-keep-browser --model gpt-5.2-pro -p "<task>" --file "src/**"
- Manual paste fallback (assemble bundle, copy to clipboard):
npx -y @steipete/oracle --render --copy -p "<task>" --file "src/**"
- Note:
--copy is a hidden alias for --copy-markdown.
Attaching files (--file)
--file accepts files, directories, and globs. You can pass it multiple times; entries can be comma-separated.
- Include:
--file "src/**" (directory glob)
--file src/index.ts (literal file)
--file docs --file README.md (literal directory + file)
- Exclude (prefix with
!):
--file "src/**" --file "!src/**/*.test.ts" --file "!**/*.snap"
- Defaults (important behavior from the implementation):
- Default-ignored dirs:
node_modules, dist, coverage, .git, .turbo, .next, build, tmp (skipped unless you explicitly pass them as literal dirs/files).
- Honors
.gitignore when expanding globs.
- Does not follow symlinks (glob expansion uses
followSymbolicLinks: false).
- Dotfiles are filtered unless you explicitly opt in with a pattern that includes a dot-segment (e.g.
--file ".github/**").
- Hard cap: files > 1 MB are rejected (split files or narrow the match).
Budget + observability
- Target: keep total input under ~196k tokens.
- Use
--files-report (and/or --dry-run json) to spot the token hogs before spending.
- If you need hidden/advanced knobs:
npx -y @steipete/oracle --help --verbose.
Engines (API vs browser)
- Auto-pick: uses
api when OPENAI_API_KEY is set, otherwise browser.
- Browser engine supports GPT + Gemini only; use
--engine api for Claude/Grok/Codex or multi-model runs.
- API runs require explicit user consent before starting because they incur usage costs.
- Browser attachments:
--browser-attachments auto|never|always (auto pastes inline up to ~60k chars then uploads).
- Remote browser host (signed-in machine runs automation):
- Host:
oracle serve --host 0.0.0.0 --port 9473 --token <secret>
- Client:
oracle --engine browser --remote-host <host:port> --remote-token <secret> -p "<task>" --file "src/**"
Sessions + slugs (don't lose work)
- Stored under
~/.oracle/sessions (override with ORACLE_HOME_DIR).
- Runs may detach or take a long time (browser + GPT-5.2 Pro often does). If the CLI times out: don't re-run; reattach.
- List:
oracle status --hours 72
- Attach:
oracle session <id> --render
- Use
--slug "<3-5 words>" to keep session IDs readable.
- Duplicate prompt guard exists; use
--force only when you truly want a fresh run.
Prompt template (high signal)
Oracle starts with zero project knowledge. Assume the model cannot infer your stack, build tooling, conventions, or "obvious" paths. Include:
- Project briefing (stack + build/test commands + platform constraints).
- "Where things live" (key directories, entrypoints, config files, dependency boundaries).
- Exact question + what you tried + the error text (verbatim).
- Constraints ("don't change X", "must keep public API", "perf budget", etc).
- Desired output ("return patch plan + tests", "list risky assumptions", "give 3 options with tradeoffs").
"Exhaustive prompt" pattern (for later restoration)
When you know this will be a long investigation, write a prompt that can stand alone later:
- Top: 6-30 sentence project briefing + current goal.
- Middle: concrete repro steps + exact errors + what you already tried.
- Bottom: attach all context files needed so a fresh model can fully understand (entrypoints, configs, key modules, docs).
If you need to reproduce the same context later, re-run with the same prompt + --file ... set (Oracle runs are one-shot; the model doesn't remember prior runs).
Safety
- Don't attach secrets by default (
.env, key files, auth tokens). Redact aggressively; share only what's required.
- Prefer "just enough context": fewer files + better prompt beats whole-repo dumps.
Installation
Add to your Claude project:
/install-skill https://github.com/steipete/oracle/tree/main/skills/oracle
1---2name: oracle3description: Use the @steipete/oracle CLI to bundle a prompt plus the right files and get a second-model review (API or browser) for debugging, refactors, design checks, or cross-validation. Prefer browser runs with --engine browser --browser-manual-login --browser-keep-browser.4---56# Oracle (CLI) - best use7Oracle bundles your prompt + selected files into one "one-shot" request so another model can answer with real repo context (API or browser automation). Treat outputs as advisory: verify against the codebase + tests.89## Main use case (browser, GPT-5.2 Pro)10Default workflow here: `--engine browser` with GPT-5.2 Pro in ChatGPT. This is the "human in the loop" path: it can take ~10 minutes to ~1 hour; expect a stored session you can reattach to.1112Recommended defaults:13- Engine: browser (`--engine browser`)14- Model: GPT-5.2 Pro (either `--model gpt-5.2-pro` or a ChatGPT picker label like `--model "5.2 Pro"`)15- Browser: `--browser-manual-login --browser-keep-browser`16- Attachments: directories/globs + excludes; avoid secrets.1718## Golden path (fast + reliable)191. Pick a tight file set (fewest files that still contain the truth).202. Preview what you're about to send (`--dry-run` + `--files-report` when needed).213. Run in browser mode for the usual GPT-5.2 Pro ChatGPT workflow (prefer `--browser-manual-login --browser-keep-browser`); use API only when you explicitly want it.224. If the run detaches/timeouts: reattach to the stored session (don't re-run).2324## Commands (preferred)25- Show help (once/session):26 - `npx -y @steipete/oracle --help`27- Preview (no tokens):28 - `npx -y @steipete/oracle --dry-run summary -p "<task>" --file "src/**" --file "!**/*.test.*"`29 - `npx -y @steipete/oracle --dry-run full -p "<task>" --file "src/**"`30- Token/cost sanity:31 - `npx -y @steipete/oracle --dry-run summary --files-report -p "<task>" --file "src/**"`32- Browser run (main path; long-running is normal):33 - `npx -y @steipete/oracle --engine browser --browser-manual-login --browser-keep-browser --model gpt-5.2-pro -p "<task>" --file "src/**"`34- Manual paste fallback (assemble bundle, copy to clipboard):35 - `npx -y @steipete/oracle --render --copy -p "<task>" --file "src/**"`36 - Note: `--copy` is a hidden alias for `--copy-markdown`.3738## Attaching files (`--file`)39`--file` accepts files, directories, and globs. You can pass it multiple times; entries can be comma-separated.4041- Include:42 - `--file "src/**"` (directory glob)43 - `--file src/index.ts` (literal file)44 - `--file docs --file README.md` (literal directory + file)45- Exclude (prefix with `!`):46 - `--file "src/**" --file "!src/**/*.test.ts" --file "!**/*.snap"`47- Defaults (important behavior from the implementation):48 - Default-ignored dirs: `node_modules`, `dist`, `coverage`, `.git`, `.turbo`, `.next`, `build`, `tmp` (skipped unless you explicitly pass them as literal dirs/files).49 - Honors `.gitignore` when expanding globs.50 - Does not follow symlinks (glob expansion uses `followSymbolicLinks: false`).51 - Dotfiles are filtered unless you explicitly opt in with a pattern that includes a dot-segment (e.g. `--file ".github/**"`).52 - Hard cap: files > 1 MB are rejected (split files or narrow the match).5354## Budget + observability55- Target: keep total input under ~196k tokens.56- Use `--files-report` (and/or `--dry-run json`) to spot the token hogs before spending.57- If you need hidden/advanced knobs: `npx -y @steipete/oracle --help --verbose`.5859## Engines (API vs browser)60- Auto-pick: uses `api` when `OPENAI_API_KEY` is set, otherwise `browser`.61- Browser engine supports GPT + Gemini only; use `--engine api` for Claude/Grok/Codex or multi-model runs.62- API runs require explicit user consent before starting because they incur usage costs.63- Browser attachments:64 - `--browser-attachments auto|never|always` (auto pastes inline up to ~60k chars then uploads).65- Remote browser host (signed-in machine runs automation):66 - Host: `oracle serve --host 0.0.0.0 --port 9473 --token <secret>`67 - Client: `oracle --engine browser --remote-host <host:port> --remote-token <secret> -p "<task>" --file "src/**"`6869## Sessions + slugs (don't lose work)70- Stored under `~/.oracle/sessions` (override with `ORACLE_HOME_DIR`).71- Runs may detach or take a long time (browser + GPT-5.2 Pro often does). If the CLI times out: don't re-run; reattach.72 - List: `oracle status --hours 72`73 - Attach: `oracle session <id> --render`74- Use `--slug "<3-5 words>"` to keep session IDs readable.75- Duplicate prompt guard exists; use `--force` only when you truly want a fresh run.7677## Prompt template (high signal)78Oracle starts with zero project knowledge. Assume the model cannot infer your stack, build tooling, conventions, or "obvious" paths. Include:79- Project briefing (stack + build/test commands + platform constraints).80- "Where things live" (key directories, entrypoints, config files, dependency boundaries).81- Exact question + what you tried + the error text (verbatim).82- Constraints ("don't change X", "must keep public API", "perf budget", etc).83- Desired output ("return patch plan + tests", "list risky assumptions", "give 3 options with tradeoffs").8485### "Exhaustive prompt" pattern (for later restoration)86When you know this will be a long investigation, write a prompt that can stand alone later:8788- Top: 6-30 sentence project briefing + current goal.89- Middle: concrete repro steps + exact errors + what you already tried.90- Bottom: attach all context files needed so a fresh model can fully understand (entrypoints, configs, key modules, docs).9192If you need to reproduce the same context later, re-run with the same prompt + `--file ...` set (Oracle runs are one-shot; the model doesn't remember prior runs).9394## Safety95- Don't attach secrets by default (`.env`, key files, auth tokens). Redact aggressively; share only what's required.96- Prefer "just enough context": fewer files + better prompt beats whole-repo dumps.9798### Installation99Add to your Claude project:100101`/install-skill https://github.com/steipete/oracle/tree/main/skills/oracle`