用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill code-review命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | code-review |
| description | | Use when this capability is needed. |
Canonical:
references/tool-chain.md(graph → gbrain → Read) Persona:agents/code-reviewer.mdMotivation: Reading files inline costs 8–49× more tokens than blast-radius mapping. This skill enforces graph-first review for every host.
Token-efficient, high-signal code review: map impact with code-review-graph, resolve symbols with gbrain, read only confirmed files, then judge with a confidence-gated reviewer persona (≥ 80 only).
Senior code reviewer — see full contract in agents/code-reviewer.md:
1. code-review-graph → blast-radius / detect_changes_tool / review context
2. gbrain → code-def, code-refs, search (LESSONS / decisions)
3. Read → only graph-confirmed files
Never skip step 1 on multi-file tasks. Never whole-repo Read before graph.
| Choose | When |
|---|---|
| Delta | Uncommitted changes, small diff, pre-commit, "review my changes", < ~10 files and no PR context |
| PR | gh pr, branch vs main, explicit PR review, large diff, or user asks for thorough / multi-lens review |
flowchart LR
start[Invoke skill] --> route{Scope?}
route -->|Delta| delta[Single-pass + graph]
route -->|PR| pr[Graph + 5 lenses + merge]
delta --> report[Report]
pr --> report
output-format.md).review-lenses-pr.md + orchestration-dispatch.md.Server: OpenClaw/.mcp.json — uvx code-review-graph serve (Python 3.13+).
Full tool matrix: references/mcp-tools-crg.md.
| Tool | When |
|---|---|
list_graph_stats_tool | Stale / empty graph check |
detect_changes_tool | Start of any diff review |
semantic_search_nodes_tool | Unknown symbol or entry point |
query_graph_tool | callers, callees, imports, tests |
get_impact_radius_tool | Refactor / merge risk |
get_affected_flows_tool | Broken execution paths |
get_review_context_tool | Snippets before full Read |
get_architecture_overview_tool | Unfamiliar area |
refactor_tool | Rename / dead-code planning only |
MCP names: code-review-graph serve (v2.3.3+) registers tools with a *_tool suffix. Prose elsewhere may shorten (e.g. list_graph_stats_tool → same handler as list_graph_stats_tool).
Embeddings: CRG + gbrain share bge-m3 (1024-dim). Toggle: scripts/crg-embed-mode · references/crg-embed-mode.md.
Slash commands (Claude Code): /code-review-graph:review-delta, review-pr, build-graph. Cursor: use MCP tools directly.
setup-embeddings wires the env config but cannot call MCP tools — the graph must be seeded interactively inside Claude Code.
list_graph_stats_tool(repo_root=<path>)
| Result | Action |
|---|---|
nodes > 0, embeddings_count > 0 | Graph is healthy — skip to Phase A |
nodes > 0, embeddings_count = 0 | Embeddings missing → run Step 2 only |
nodes = 0 | Never built or wiped → run Steps 1 + 2 |
disk I/O error | Corrupted graph.db → delete it, then run Steps 1 + 2 |
build_or_update_graph_tool(
repo_root = "<repo_path>", # orama-system / AlphaClaw / Perpetua-Tools
full_rebuild = True,
postprocess = "full"
)
Expected output per repo (ballpark):
embed_graph_tool(
repo_root = "<repo_path>",
provider = "openai", # OpenAI-compat shim → Ollama
model = "bge-m3"
)
Prerequisite: Ollama running at localhost:11434 with bge-m3 pulled.
If Ollama is down, omit the call — CRG falls back to FTS-only keyword search.
rm "<repo_path>/.code-review-graph/graph.db"
# then run Steps 1 + 2 above
# Acknowledge YAML / embedding failures and continue
gbrain sync --source <source-id> --skip-failed
Check ~/.gbrain/sync-failures.jsonl to see which files failed and why.
Old failures with "acknowledged": true are harmless.
setup-embeddings ran but no one called build_or_update_graph_tool. Add a
reminder to your first-session checklist: after setup-embeddings, call the
build + embed tools once per repo before starting any review work.
The graph tools above run inside Claude Code via MCP. When the code-review-graph
MCP shows disconnected, drive the uvx CLI directly — but mind two traps that
bit us live (2026-06-13):
Cold-start timeout = the usual disconnect cause. The first
uvx code-review-graph serve of a session downloads tree-sitter-language-pack
(~74 packages, ~31 MiB) and can blow past the MCP handshake window, so the harness
marks it disconnected. Pre-warm the cache once, then reconnect:
uvx code-review-graph --help # one-time download; warms the uvx cache
# then in Claude Code: /mcp → reconnect code-review-graph (warm = connects fast)
CLI embed defaults to local (NOT the unified provider).
uvx code-review-graph embed defaults to --provider local (sentence-transformers,
not installed → hard error). You MUST pass the provider for the bge-m3 vector space.
Full CLI refresh after a big change (mirrors the MCP build+embed path):
export CRG_OPENAI_API_KEY=ollama CRG_OPENAI_BASE_URL=http://localhost:11434/v1 \
CRG_OPENAI_MODEL=bge-m3 CRG_OPENAI_DIMENSION=1024 CRG_ACCEPT_CLOUD_EGRESS=1
uvx code-review-graph update # incremental re-parse
uvx code-review-graph embed --provider openai --model bge-m3 # NEVER omit --provider
uvx code-review-graph postprocess # flows / communities / FTS
uvx code-review-graph status # confirm nodes + embeddings
embed_graph_tool(provider="openai") already does this over MCP — the --provider
flag is only needed on the CLI path, where local is the unfortunate default.
Semantic search is MCP-only — fall back to gbrain. semantic_search_nodes_tool,
query_graph_tool, get_impact_radius_tool, get_review_context_tool exist only
over MCP — there is no uvx CLI equivalent (the CLI does build/update/embed/status,
not search). So any skill that calls them fails outright when the MCP is disconnected.
When you can't reconnect immediately, use gbrain for the semantic lane — it shares the
same bge-m3 vector space, so results are directly comparable:
After blast-radius identifies symbols:
gbrain code-def <symbol>
gbrain code-refs <symbol>
gbrain code-callers <symbol>
gbrain code-callees <symbol>
gbrain search "<intent>"
gbrain search "<terms>" --source gstack-brain-<user> # cross-session memory
Worktree pinned via .gbrain-source — no --source when cwd is in repo.
Architecture? → docs/2026-05-14--UNIFIED-ABSORPTION-PLAN.md (link section; do not restate).
HITL? → docs/HUMAN-IN-LOOP-ACCOUNTABILITY.md
get_review_context_tool for changed + impacted files from Phase A.Read only those files — do not re-read if already in context.agents/code-reviewer.mdprofiles/CLAUDE.coding.mdgit diff or detect_changes_tool outputorchestration-dispatch.md):
Task → sequentialreview-lenses-pr.md)Workers: use agents/code-reviewer.md + lens prompt. No commits from workers.
Codex boundary: workers must not execute SKILL.md under skills/gstack or gstack global skills as procedures.
Template and rubric: references/output-format.md.
Minimum fields: scope, strengths (short), Critical / Important lists with file:line, verdict.
Read / Grep on many files before detect_changes_tool or blast-radiusget_review_context_tool then reading full filesgbrain search skipped in favor of reading LESSONS.md inline| Profile | Use |
|---|---|
profiles/CLAUDE.coding.md | Review, debug, refactor tone |
profiles/CLAUDE.agents.md | Multi-agent pipelines |
profiles/J-drona23-v5/ | Default agentic coding (builder + workflow rules) |
| Doc | Content |
|---|---|
references/mcp-tools-crg.md | Full CRG MCP matrix + sequences |
references/output-format.md | Confidence rubric + report template |
references/review-lenses-pr.md | Five PR lenses + prompts |
references/orchestration-dispatch.md | OmniRoute / ai-cli / Task probe |
references/agent-matrix.md | Per-host invocation |
references/crg-embed-mode.md | Embedding toggle |
references/pressure-test-notes.md | Expected graph-first behavior |
agents/code-reviewer.md | Subagent / worker persona |
bin/orama-system/SKILL.md (OmniRoute probe, search policy)docs/how-to/first-run-and-code-review.md — fresh machine → first-run → MCP → graph → this skillskills/first-run-setup/SKILL.md · references/first-run-install.mdbin/orama-system/mcp-install/SKILL.md~/.claude/skills/mcp-orchestration/SKILL.mdSource: diazMelgarejo/orama-system — distributed by TomeVault.
gbrain search "<terms>" · gbrain query "<q>"gbrain code-def Y · gbrain code-callers Y
Reconnect CRG (/mcp) when you specifically need graph-native blast-radius
(get_impact_radius, flows, communities) that gbrain doesn't model. Never block a review
on a dead MCP — degrade to gbrain + FTS and say so in the report.