AgentSkillsCN

oracle

具备两种模式的战略技术顾问,适用于获取第二意见、制定架构决策、排查疑难问题、开展安全分析以及进行前沿研究。在“仓库模式”下,系统可自主探索您的代码库——查找潜在漏洞、审查代码逻辑、追踪并定位各类缺陷;而在“网页模式”下,则专注于挖掘外部信息——包括当前最佳实践、各类库的对比评测以及官方文档等。当您需要将自身实现与行业标准进行比对时,不妨同时启用这两种模式,以获得更全面、更深入的洞察。

SKILL.md
--- frontmatter
name: oracle
description: Strategic technical advisor with two modes. Use for second opinions, architecture decisions, debugging, security analysis, and research. REPO MODE explores your codebase autonomously (finds gaps, reviews code, traces bugs). WEB MODE researches external info (current best practices, library comparisons, docs). Run both in parallel when comparing your implementation against current standards.
allowed-tools: Bash, TaskOutput, AskUserQuestion

Oracle - Unified Technical Advisor

Two complementary modes for different types of questions.

Routing Decision

Ask: "Is the truth external, or is it in our code?"

Truth LocationModeModel
In our codeRepogpt-5.2 xhigh via Codex SDK
External (docs, standards, comparisons)Web5.2 Thinking + Heavy (default)
Complex research needing web synthesisWebgpt-5.2-pro (escalation)
Both (compare impl vs standards)ParallelRun both modes

Commands

Script root: ${CLAUDE_PLUGIN_ROOT}/skills/oracle/scripts

Repo Oracle (codebase exploration)

bash
bun ${CLAUDE_PLUGIN_ROOT}/skills/oracle/scripts/oracle.ts "question"

Capabilities: Explores files, runs commands, searches web (read-only sandbox).

Web Oracle (external research)

bash
# Default: 5.2 Thinking with Heavy reasoning
npx -y @steipete/oracle --engine browser --model "5.2 Thinking" --browser-thinking-time heavy -p "question"

# Escalation: gpt-5.2-pro (Deep Research - for complex multi-source research)
npx -y @steipete/oracle --engine browser --model gpt-5.2-pro -p "question"

# Include repo context (curated files)
npx -y @steipete/oracle --engine browser --model "5.2 Thinking" --browser-thinking-time heavy \
  --file "src/auth/**/*.ts" \
  --file "!**/*.test.ts" \
  -p "question with context"

Parallel Execution

Run both with run_in_background=true, poll with TaskOutput, synthesize results.

When to Use Each Mode

Repo Oracle

Questions where the answer is in the codebase:

  • "What's causing this race condition in the queue processor?"
  • "Audit the blast radius before I refactor the payment service"
  • "Why are tests flaky on CI? Investigate the test setup"
  • "Map how a request flows from API route to database"
  • "Review the uncommitted changes for issues"

Web Oracle (5.2 Thinking - default)

Questions needing external knowledge:

  • "Drizzle vs Prisma for heavy read loads - what are teams saying?"
  • "Current security gotchas with Google OAuth?"
  • "Is it worth migrating Next.js pages router to app router now?"
  • "Compare Socket.io vs Ably vs Pusher for a team of 3"

Web Oracle (gpt-5.2-pro - escalation)

Complex research requiring multi-source synthesis:

  • "Comprehensive analysis of auth patterns for B2B SaaS in 2026"
  • "Migration path from Redis to Valkey - gather all community experiences"
  • "Full competitive analysis of state management solutions"

Both in Parallel

When comparing your code against current standards:

  • "Is our auth middleware following current OWASP guidelines?"
  • "Does our error handling match RFC 7807? Review our impl"
  • "Are we using this library correctly per current docs?"

Routing When Unclear

If the question type isn't obvious, use AskUserQuestion:

code
What kind of help do you need?
- Find issues in the current implementation (Repo)
- Research best practices and patterns (Web)
- Compare our implementation against current standards (Both)

Second Opinion Workflow

Best practice from developer research: review diffs and tests, not raw code.

code
1. Generate changes (primary agent writes code)
2. Package context for review (diff + key files + test results)
3. Review with oracle (critique: bugs, edge cases, missing tests)
4. Apply fixes + run tests
5. Repeat until critique converges

Effective review questions:

  • "Review the current diff for security issues"
  • "What edge cases am I missing in these uncommitted changes?"
  • "At the end of this phase, review my work"

Response Format

Both modes return structured responses:

Essential

  • Bottom Line: Direct answer (1-2 sentences)
  • Action Plan: Numbered next steps
  • Effort Estimate: Quick (<1h) | Short (1-4h) | Medium (1-2d) | Large (3d+)

Expanded (when relevant)

  • Reasoning: Why this approach
  • Trade-offs: Gains vs sacrifices
  • Dependencies: Prerequisites

Edge Cases (when applicable)

  • Escalation Triggers: When to reconsider
  • Alternatives: Backup options
  • Gotchas: Common mistakes

Background Execution

For deep analysis, run in background:

bash
# Start (use run_in_background=true)
bun ${CLAUDE_PLUGIN_ROOT}/skills/oracle/scripts/oracle.ts "Audit this codebase for security issues"

# Poll
TaskOutput with block=false

# Get result (avoid context flooding)
tail -100 /path/to/output

Model Selection Summary

ModeModelUse When
Repogpt-5.2 xhighCodebase questions, finding gaps, code review
Web (default)5.2 Thinking + HeavyExternal research, best practices, comparisons
Web (escalation)gpt-5.2-proComplex multi-source research, deep synthesis