用 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. |
code-review.Structured, actionable code review focused on correctness, bugs, style, and maintainability. Act as a senior engineer: thorough, pragmatic, impact-first.
#pragma warning disable).When NOT to use:
python-testing or equivalent).| Area | Look for |
|---|---|
| Correctness & Logic | Wrong behavior, broken contracts, off-by-one |
| Bugs & Edge Cases | Nil/null paths, boundary values, error propagation |
| Code Quality & Style | Naming, readability, idiomatic usage |
| Structure & Maintainability | Coupling, duplication, separation of concerns |
| Best Practices | Language/framework conventions, SOLID, DRY |
| Test Adequacy | Missing tests for behavior changes, regression gaps |
| Security & Risk | Input validation, auth, secrets, dependency risk |
| Documentation | Misleading comments, missing doc for public API |
Determine review scope and available tooling before doing any analysis.
Scope detection:
Identify whether this is a pre-commit or pre-merge review, then set the base ref accordingly.
Pre-commit (staged changes):
# List staged files
git diff --cached --name-status
# View staged diff
git --no-pager diff --cached
Pre-merge (branch vs. target):
# Resolve target base branch from origin/HEAD when available
BASE_BRANCH=$(git rev-parse --abbrev-ref origin/HEAD 2>/dev/null)
BASE_BRANCH=${BASE_BRANCH#origin/}
BASE_BRANCH=${BASE_BRANCH:-main}
MERGE_BASE=$(git merge-base "$BASE_BRANCH" HEAD)
# List changed files on this branch relative to the target base
git diff --name-status "$MERGE_BASE"...HEAD
# View full branch diff
git --no-pager diff "$MERGE_BASE"...HEAD
If the user does not specify scope, infer from context:
Graph-enhanced tooling gate:
If the code-review-graph MCP plugin is available, probe and ensure freshness:
build_or_update_graph_tool() to run an incremental update.list_graph_stats_tool() to verify the graph has nodes and check last_updated.When the graph is available, follow references/code-review-graph-integration.md for enhanced analysis at each subsequent step.
The reference doc specifies required and optional tool calls per phase, with decision criteria for when to use each.
Build a prioritized review plan before reading any code in detail.
Always (git-based):
Git diagnostics (useful for unfamiliar codebases or large diffs — see references/git-diagnostics-before-review.md):
When graph is available (see references/code-review-graph-integration.md Phase 1):
detect_changes_tool(base=<base>) for risk-scored, priority-ordered triage.
Use its risk scores to order files highest-risk first.get_review_context_tool(base=<base>) for token-efficient structural context instead of reading entire changed files.get_affected_flows_tool (change touches 2+ files), get_architecture_overview_tool (change spans 3+ directories), or get_impact_radius_tool (need raw blast-radius data) as the scope warrants.Triage output: Produce a prioritized file list and a brief review plan identifying the highest-risk areas to focus on.
For each changed file or module, summarize what changed and why. Evaluate each area in the Quick Reference table above.
Rules:
When graph is available (see references/code-review-graph-integration.md Phase 2):
query_graph_tool(pattern="tests_for", target=<function>) to flag test coverage gaps.query_graph_tool(pattern="callers_of", target=<function>) to verify consumers are updated.query_graph_tool("importers_of") for module-level API changes, query_graph_tool("inheritors_of") for base class changes, find_large_functions_tool for complexity flags, semantic_search_nodes_tool to check for duplication, and refactor_tool("dead_code") to catch orphaned code.Compile findings into issues using the template in assets/issue-template.md.
Sort issues by priority: critical > high > medium > low.
For each issue, include blocking status, confidence, and evidence.
Present the review as a prioritized list of issues from Step 2.
When graph was used, append:
Proceed only when the user asks to "apply changes", "fix issues", "implement suggestions", or similar.
Treat these recommendations as preferred defaults. When a default conflicts with project constraints, suggest a better-fit alternative, call out tradeoffs, and note compensating controls.
assets/issue-template.md — issue type/priority legends and suggestion format.references/review-best-practices-links.md — external review best-practice links used by this skill.references/git-diagnostics-before-review.md — git commands for assessing codebase health before reviewing.references/code-review-graph-integration.md — tool dispatch playbook for code-review-graph MCP plugin (required + optional tools per phase, decision guide).Converted and distributed by TomeVault — claim your Tome and manage your conversions.