code-tool-router
Choose the right code intelligence tool before searching, navigating, refactoring, or analyzing a codebase.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Choose the right code intelligence tool before searching, navigating, refactoring, or analyzing a codebase.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Check whether global code intelligence tools are installed and configured consistently.
Build a compact architecture map of a repository using CGC, Semble, rg, and source reads.
Safely analyze code impact before refactors, behavior changes, API changes, and cross-module edits.
| name | code-tool-router |
| description | Choose the right code intelligence tool before searching, navigating, refactoring, or analyzing a codebase. |
| execution_mode | docs_only |
| supported_agents | ["codex","claude"] |
Routes code work across the right tool:
| Intent | First tool | Verification |
|---|---|---|
| Exact string, config key, env var, error text, symbol spelling | rg | Open matching files directly |
| Broad semantic discovery, "where is X implemented?", similar code | Semble | rg for exact terms, then file reads |
| Definition, references, rename, signature change, type-aware navigation | Serena | rg for generated/dynamic callsites |
| Callers, callees, complexity, dependency graph, architecture report | CGC | Serena or rg before edits |
| Project decisions, product facts, user preferences, long-term notes | Existing project memory, when available | Source documents or current code |
| Current library/API usage | Context7 or official docs | Local code examples |
Use this skill when a task requires finding code, understanding ownership, tracing behavior, planning a refactor, or comparing implementation patterns. The authored skill contract names Codex and Claude, and plugin targets mirror the same guidance into Cursor, Gemini, and OpenCode outputs.
Classify the question before searching, then use the cheapest reliable tool first.
Exact search:
rg -n "INTERVIEW_MEMORY_MODE" .
rg -n "reset_session\\(" .
rg --files | rg "memory|context"
Semantic discovery:
uvx --from semble==0.2.0 semble search "where interview memory context is assembled" .
uvx --from semble==0.2.0 semble search -k 10 "copy helper browser focus integration" .
uvx --from semble==0.2.0 semble find-related src/path/file.ts 42 .
Graph and architecture:
cgc stats . --context "$(basename "$PWD")"
cgc find name reset_session --context "$(basename "$PWD")"
cgc analyze callers reset_session --context "$(basename "$PWD")"
cgc analyze calls assemble_stream_context_or_fallback --context "$(basename "$PWD")"
cgc analyze complexity --limit 20 --context "$(basename "$PWD")"
cgc report --output /tmp/CGC_REPORT.md --context "$(basename "$PWD")"
For Serena, use LSP-backed definitions, references, symbols, diagnostics, rename, and signature tools. If Serena exposes an initial-instructions tool, read it before using Serena in a new session.
Do not block the task just because a specialized tool is unavailable.
rg is missing, use the fastest available local text search and mention the fallback.rg to build a shortlist, then read the most relevant files directly.rg for definitions/references and avoid automated rename/refactor claims.rg --files, source reads, and language tooling where available.code-intelligence-doctor skill when available.rg first for exact text. It is still the fastest and most trustworthy tool for literals.