Community编程与开发github.com

oracle

Oracle CLI 的第二模型审查/调试/重构/设计工具,支持选定文件、预览 Token 消耗、API 或浏览器引擎。

oracle 是什么?

Oracle 是一款 CLI 工具,它可以将提示词与选定文件打包,通过第二个模型进行一次分析,提供建议性输出。用户需要自行验证结果是否与代码和测试一致。它的主要用途是代码审查、调试、重构和设计。Oracle 支持两种运行引擎:浏览器引擎(适用于长时间 ChatGPT Pro 运行)和 API 引擎(当配置了 `OPENAI_API_KEY` 或 Azure 时)。用户可以通过 `--dry-run` 和 `--file` 参数预览 Token 消耗和文件列表,从而控制成本。当运行超时或断开时,可以通过会话 ID 重新连接,而不是盲目重新运行。Oracle 还支持通过 `--browser-attachments` 参数控制文件附件方式,以及 `oracle serve` 启动远程浏览器主机。

兼容平台✓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. 预览负载和 Token 消耗(--dry-run + --files-report)。
  3. 浏览器模式用于长时间 Pro 思考;API 模式用于显式 API 调用。
  4. 如果运行断开/超时:重新连接已存储的会话。不要盲目重新运行。

命令(推荐)

  • 帮助:

    • oracle --help
    • 如果二进制未安装:npx -y @steipete/oracle --help(此处避免使用 pnpx;sqlite 绑定)。
  • 预览(不消耗 Token):

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

    • 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 与浏览器)

  • 自动选择:当设置了 OPENAI_API_KEY 时选择 api;否则选择 browser。
  • 浏览器仅支持 GPT + Gemini;使用 --engine api 支持 Claude/Grok/Codex 或多模型运行。
  • 浏览器附件:
    • --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 words>" 让会话 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.

相关技能