agentleFS
n24q02mn24q02m/better-code-review-graph/.agents/skills/build-graph/SKILL.md

build-graph

Skill76 starsChanged 7 months agoApache-2.0View on GitHub

Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the graph has never been built (last_updated is null), proceed with a full build.

    line 14
  2. Distinctive:

    If the graph exists, proceed with an incremental update.

    line 15
  3. Distinctive:

    After major refactoring or branch switches

    line 30
  4. Distinctive:

    If the graph seems stale or out of sync

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

Build Graph

Build or incrementally update the persistent code knowledge graph for this repository.

Steps

  1. Check graph status by calling graph with action="stats".
    • If the graph has never been built (last_updated is null), proceed with a full build.
    • If the graph exists, proceed with an incremental update.
  2. Build the graph by calling graph:
    • For first-time setup: graph(action="build", full_rebuild=True)
    • For updates: graph(action="update") (incremental by default)
  3. Verify by calling graph(action="stats") again and report the results:
    • Number of files parsed
    • Number of nodes and edges created
    • Languages detected
    • Any errors encountered

When to Use

  • First time setting up the graph for a repository
  • After major refactoring or branch switches
  • If the graph seems stale or out of sync
  • The graph auto-updates via hooks on edit/commit, so manual builds are rarely needed

Notes

  • The graph is stored as a SQLite database (.code-review-graph/graph.db) in the repo root
  • Binary files, generated files, and patterns in .code-review-graphignore are skipped
  • Supported languages: Python, TypeScript/JavaScript, Go, Rust, Java, C#, Ruby, Kotlin, Swift, PHP, C/C++

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.