agentleFS
vikisingh23vikisingh23/neuraforge-ai/skills/codebase-graph/SKILL.md

codebase-graph

Skill4 starsChanged 7 months agoApache-2.0View on GitHub

Build a queryable knowledge graph of the codebase before generating or reviewing code, so "does this already exist?" is answered by evidence instead of a quick grep

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before generating code in a codebase you haven't already mapped this session, and especially before creating a new file, entity, or service …

    line 23
  2. Very specific:

    If graphify isn't on $PATH, skip this skill and fall back to plain search (Grep/Glob) — don't block on it.

    line 35
  3. Very specific:

    Run graphify update . --code-only once at the start of a session touching an unfamiliar part of the codebase.

    line 56
  4. Very specific:

    Before creating a new entity/service/component, graphify query for it by name or responsibility instead of assuming it doesn't exist.

    line 58
  5. Very specific:

    Check GRAPH_REPORT.md's "God Nodes" and "Surprising Connections" sections when reviewing architecture — they surface coupling a reviewer …

    line 60

≈ “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

Codebase Graph

Backs the Reuse Decision Tree's first step — "search codebase, does something similar exist?" (ARCHITECTURE_PRINCIPLES.md §3) and the Minimal Solution Principle's second rung (MINIMAL_SOLUTION.md) — with a tool built for that exact question: graphify (package name on PyPI: graphifyy). Entirely optional — every forge/reviewer agent works without it, this just makes "search first" scale past what grep can reliably answer on a large or unfamiliar codebase.

When to Use It

Before generating code in a codebase you haven't already mapped this session, and especially before creating a new file, entity, or service — this is where "I didn't realize X already does this" gets caught before it ships as a duplicate.

Setup (once per machine)

uv tool install graphifyy
# or: pipx install graphifyy / pip install graphifyy

If graphify isn't on $PATH, skip this skill and fall back to plain search (Grep/Glob) — don't block on it.

Usage

# Build the graph (local AST parsing only, no LLM/API key needed, no network call)
graphify update . --code-only

# Ask it directly instead of re-reading files by hand
graphify query "what handles order creation?"
graphify explain "OrderService"
graphify path "OrderController" "PaymentGateway"

Output lands in graphify-out/ (graph.json, graph.html, GRAPH_REPORT.md) — add graphify-out/ to .gitignore if it isn't already there, it's a local cache, not something to commit.

How to Fold This Into Generation/Review

  1. Run graphify update . --code-only once at the start of a session touching an unfamiliar part of the codebase.
  2. Before creating a new entity/service/component, graphify query for it by name or responsibility instead of assuming it doesn't exist.
  3. Check GRAPH_REPORT.md's "God Nodes" and "Surprising Connections" sections when reviewing architecture — they surface coupling a reviewer skimming diffs would miss.
  4. Re-run graphify update . (same flags) after a batch of changes — it's incremental, not a full re-scan.

What This Doesn't Replace

Anti-pattern checks (rules/anti-patterns/{stack}.md), the architecture reviewer, and the eval suite are unaffected — this is purely a search tool, not a correctness check. A clean graph doesn't mean the code is right, only that you know what else touches it before you change it.

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.