agentleFS
smilefufusmilefufu/pi-code-review-graph/skills/code-review-graph/SKILL.md

code-review-graph

Skill0 starsChanged 4 months agoMITView on GitHub

Use the code-review-graph CLI for token-efficient code review, architecture exploration, impact analysis, caller/callee tracing, test coverage lookup, and code search. Before using graph features in a repository, check whether its graph has been built; if not, ask the user whether to build it.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. AymanShams/codex-coding-os★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use code-review-graph through Pi's bash tool.

    line 9
  2. Distinctive:

    Before using graph-backed analysis in a repository:

    line 15
  3. Distinctive:

    Verify the CLI and its version:

    line 23
  4. Distinctive:

    Treat this command as the authoritative graph check:

    line 34
  5. Very specific:

    Do not rely only on .code-review-graph/graph.db.

    line 40
  6. Very specific:

    If status exits unsuccessfully because no graph exists:

    line 45
  7. Very specific:

    Do not build automatically or run the build through bash.

    line 47
  8. Distinctive:

    Ask the user to run the bundled Extension command:

    line 49
  9. Very specific:

    If /crg-build is unavailable, explain that the Pi Package is incomplete or disabled.

    line 60
  10. Distinctive:

    If the user declines, continue with Pi's normal tools and do not ask again during the same task.

    line 63
  11. Very specific:

    If built_on_branch and current_branch differ, recommend /crg-build.

    line 74
  12. Very specific:

    Do not run build or update through bash.

    line 81
  13. Distinctive:

    Prefer a compact graph query before broad file reads:

    line 86
  14. Very specific:

    Use Pi's read, grep, and find tools to inspect only the source files identified by graph queries.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Review Graph

Use code-review-graph through Pi's bash tool. Pi does not provide the code-review-graph MCP tools directly, so do not attempt to call names such as query_graph_tool or detect_changes_tool.

Preflight

Before using graph-backed analysis in a repository:

  1. Resolve the repository root with:

    git rev-parse --show-toplevel
  2. Verify the CLI and its version:

    code-review-graph --version

    Continue only when stdout is exactly code-review-graph X.Y.Z and the semantic version is 2.3.7 or newer. If the version is older, missing, malformed, or a prerelease, stop CRG usage and ask the user to install or upgrade it.

  3. Treat this command as the authoritative graph check:

    code-review-graph status --json --repo "<repo-root>"

Do not rely only on .code-review-graph/graph.db; CRG can store graph data in an external directory.

When the graph is missing

If status exits unsuccessfully because no graph exists:

  1. Do not build automatically or run the build through bash.
  2. Explain that this repository has not been indexed.
  3. Ask the user to run the bundled Extension command:

    /crg-build

    That command jointly confirms the build and .gitignore mutation, rejects symlinked or non-regular .gitignore files, safely appends through a no-follow file descriptor without replacing existing content, rejects tracked CRG artifacts, and verifies the effective Git ignore rule before building.

  4. If /crg-build is unavailable, explain that the Pi Package is incomplete or disabled; do not fall back to modifying .gitignore or building through bash.
  5. If the user declines, continue with Pi's normal tools and do not ask again during the same task.

For a Pi-only workflow, do not run code-review-graph install or code-review-graph init. Those commands configure MCP clients and hooks for other platforms.

When the graph exists

Inspect the status before querying:

  • If built_on_branch and current_branch differ, recommend /crg-build.
  • For normal source changes, recommend the bundled incremental command:

    /crg-update

Do not run build or update through bash. Let the bundled Extension enforce version checks and report failures.

Query workflow

Prefer a compact graph query before broad file reads:

code-review-graph architecture --detail-level minimal --repo "<repo-root>"
code-review-graph search "<query>" --repo "<repo-root>"
code-review-graph query callers_of "<symbol>" --repo "<repo-root>"
code-review-graph query callees_of "<symbol>" --repo "<repo-root>"
code-review-graph query tests_for "<symbol>" --repo "<repo-root>"
code-review-graph impact --base HEAD~1 --repo "<repo-root>"
code-review-graph detect-changes --brief --repo "<repo-root>"

Use Pi's read, grep, and find tools to inspect only the source files identified by graph queries. Treat graph output as navigation and impact context, not as proof that the underlying source is correct.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.