Community程式設計與開發github.com

Oracle

使用選定檔案進行第二模型傳遞(審查、除錯、重構、設計),支援預覽令牌檢查、API 或瀏覽器引擎。

Oracle 是什麼?

Oracle 是一款 CLI 工具,旨在將提示與一組精選檔案打包,發送給第二個語言模型進行一次性的審查、除錯、重構或設計任務。它的主要用途是讓開發者在主要開發工作流程之外,獲得另一個模型的獨立意見,因此輸出應視為建議,最終仍需透過程式碼與測試來驗證。此技能支援瀏覽器引擎(適合長時間的 ChatGPT Pro 會話)和 API 引擎(適用於設定好 `OPENAI_API_KEY` 或 Azure 配置的情境),並能自動偵測環境變數來選擇引擎。核心功能包括使用 `--dry-run` 預覽令牌成本與檔案清單、使用 `--file` 支援 glob 模式與排除規則、以及透過 `oracle serve` 實現遠端瀏覽器主機模式。對於長時間執行的任務,若 CLI 超時,可以透過 `oracle status` 和 `oracle session` 重新連接已儲存的會話,而無需盲目重新執行。該工具還強調高訊號提示工程,要求提供完整的專案簡報、目錄結構、確切問題與錯誤訊息,以獲得最佳結果。

相容平台✓Claude Code✓Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/oracle

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Oracle 是做什麼的?

Oracle 將提示與一組選定檔案打包,進行一次第二模型傳遞。請將輸出視為建議,並務必透過程式碼與測試進行驗證。

主要路徑

目前 CLI 預設模型:gpt-5.5-pro。瀏覽器引擎適用於長時間的 ChatGPT Pro 執行;API 引擎則適合已準備好 OPENAI_API_KEY 或 Azure 配置的情境。

建議的預設值:

  • 先預覽:--dry-run summary --files-report
  • 瀏覽器長時間執行:--engine browser --model gpt-5.5-pro
  • API 明確指定:--engine api --model gpt-5.5

黃金路徑

  1. 挑選精簡的檔案集合(最少但包含所有必要資訊的檔案)。
  2. 預覽酬載與令牌花費(使用 --dry-run + --files-report)。
  3. 長時間 Pro 思考使用瀏覽器模式;明確的 API 呼叫使用 API 模式。
  4. 若執行中斷或超時:重新連接到已儲存的會話,不要盲目重新執行。

指令(建議使用)

  • 說明:

    • oracle --help
    • 若二進位檔案未安裝:npx -y @steipete/oracle --help(避免使用 pnpx;牽涉 sqlite 繫結)。
  • 預覽(不消耗令牌):

    • oracle --dry-run summary -p "<task>" --file "src/**" --file "!**/*.test.*"
    • oracle --dry-run full -p "<task>" --file "src/**"
  • 令牌合理性檢查:

    • oracle --dry-run summary --files-report -p "<task>" --file "src/**"
  • 瀏覽器執行(主要路徑;長時間執行為正常現象):

    • oracle --engine browser --model gpt-5.5-pro -p "<task>" --file "src/**"
  • 手動貼上備用方案:

    • oracle --render --copy -p "<task>" --file "src/**"
    • 注意:--copy 是 --copy-markdown 的隱藏別名。

附加檔案(--file)

--file 接受檔案、目錄與 glob 模式。可以多次傳遞;項目可以用逗號分隔。

  • 包含:

    • --file "src/**"
    • --file src/index.ts
    • --file docs --file README.md
  • 排除:

    • --file "src/**" --file "!src/**/*.test.ts" --file "!**/*.snap"
  • 預設行為:

    • 預設忽略的目錄:node_modules、dist、coverage、.git、.turbo、.next、build、tmp(除非明確指定為文字路徑/檔案,否則會跳過)。
    • 展開 glob 時會遵循 .gitignore。
    • 不跟隨符號連結。
    • 除非透過模式選擇(例如 --file ".github/**"),否則會過濾掉點檔案。
    • 拒絕大於 1 MB 的檔案。

引擎(API vs 瀏覽器)

  • 自動選擇:當設定了 OPENAI_API_KEY 時使用 api,否則使用 browser。
  • 瀏覽器僅支援 GPT + Gemini;若要使用 Claude/Grok/Codex 或多模型執行,請使用 --engine api。
  • 瀏覽器附加檔案:
    • --browser-attachments auto|never|always(auto 會內嵌貼上最多約 60k 字元,其餘則上傳)。
  • 遠端瀏覽器主機:
    • 主機端:oracle serve --host 0.0.0.0 --port 9473 --token <secret>
    • 客戶端:oracle --engine browser --remote-host <host:port> --remote-token <secret> -p "<task>" --file "src/**"

會話與識別碼

  • 儲存在 ~/.oracle/sessions 下(可透過 ORACLE_HOME_DIR 覆蓋)。
  • 執行可能會中斷或花費很長時間(瀏覽器 + Pro 模式經常如此)。若 CLI 超時:不要重新執行,請重新連接。
    • 列出:oracle status --hours 72
    • 連接:oracle session <id> --render
  • 使用 --slug "<3-5 個單字>" 讓會話 ID 更容易閱讀。
  • 存在重複提示保護機制;只有當你確實需要全新執行時,才使用 --force。

提示範本(高信號)

Oracle 初始時對專案毫無知識。請假設模型無法推斷你的技術棧、建置工具、慣例或「顯而易見」的路徑。請包含:

  • 專案簡報(技術棧 + 建置/測試指令 + 平台限制)。
  • 「東西在哪裡」(關鍵目錄、進入點、配置檔、邊界)。
  • 確切的問題 + 你嘗試過的方法 + 錯誤文字(原文)。
  • 限制條件(「不要改變 X」、「必須保持公開 API」等)。
  • 期望的輸出(「回傳修補計畫 + 測試」、「給出 3 個選項及其取捨」)。

附加檔案注意事項

  • 除非使用者要求,否則請將 .env、金鑰檔案和驗證令牌排除在附加檔案之外。

「詳盡提示」恢復模式

對於長時間的調查,請撰寫一個獨立的提示與檔案集,以便幾天後可以重新執行:

  • 6-30 句的專案簡報 + 目標。
  • 重現步驟 + 確切錯誤 + 你嘗試過的方法。
  • 附加所有所需的上下文檔案(進入點、配置、關鍵模組、文件)。

Oracle 執行是一次性的;模型不會記住先前的執行。「恢復上下文」意味著使用相同的提示與 --file … 集合重新執行(或重新連接到仍在執行的已儲存會話)。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

相關技能