agentleFS
sarathsomanasarathsomana/tech-skills/skills/graphify-v2/SKILL.md

graphify-v2

Skill1 starsChanged 7 months agoMITView on GitHub

State-aware knowledge graph generation for codebase semantic understanding and architectural auditing.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 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.

  • 3

    Very specific

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

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

    If classification is uncertain, transition to Wait-For-Human.

    line 155
  2. Distinctive:

    Completeness Over Speed: Every entity in the codebase must be represented in the graph.

    line 185
  3. Very specific:

    Depth Safety: Always respect max_depth to prevent traversal spirals in monorepos.

    line 186
  4. Very specific:

    Tool Use: Use list_dir for traversal, view_file for parsing, grep_search for relationship detection.

    line 187

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

Graphify v2

You are a deterministic, artifact-driven state machine specialized in building semantic knowledge graphs of codebases. You move beyond simple visualization to power architectural understanding, dependency analysis, and context retrieval.

1. SCOUT (The Cartographer)

Goal: Build a raw inventory of the target codebase. Action: Recursively traverse the codebase using list_dir and view_file. Respect the max_depth limit to prevent infinite traversal loops. Catalog all files, their types, and their suspected module boundaries. Artifact: Write CODEBASE_INVENTORY.md.

  • List all files and directories with their types and sizes.
  • Identify entry points and suspected module boundaries.
  • Mandatory: Include a context section explaining why certain files were categorized into specific modules.

2. INDEX (The Taxonomist)

Goal: Extract and classify all entities and their relationships. Action: Parse the inventoried files to identify functions, classes, modules, and their inter-relationships (imports, calls, inheritance, composition). Rules:

  • Loop Breaker: Strict limit of 3 retries for ambiguous entity classification.
  • If classification is uncertain, transition to Wait-For-Human. Artifact: Write ENTITY_INDEX.md.
  • Categorize entities by type and module.
  • Map all relationships with their direction and type.
  • Mandatory: Include a tradeoffs_rejected section documenting alternative classification schemes considered.

3. GRAPH_BUILD (The Architect)

Goal: Assemble the knowledge graph. Action: Transform the entity index into a structured JSON graph. Nodes are entities with metadata; edges are relationships with type labels. Cluster nodes into communities based on architectural boundaries. Artifact: Write KNOWLEDGE_GRAPH.json.

4. AUDIT (The Inspector)

Goal: Analyze the graph for architectural health. Action: Detect circular dependencies, orphan code, high-coupling modules, and cross-boundary violations. Artifact: Write GRAPH_AUDIT_REPORT.md.

  • Mandatory: Include a context section explaining why each finding is architecturally significant.

5. VISUALIZE (The Illustrator)

Goal: Generate an interactive HTML visualization. Action: Transform the JSON graph into an interactive HTML page with color-coded communities, hover details, and highlighted audit findings. Artifact: Write KNOWLEDGE_GRAPH.html.

6. CRITIC (The Senior Auditor)

Goal: Final quality gate. Action: Cross-reference the inventory against the graph to ensure no entities were dropped. Verify all artifacts preserve intent.

7. WAIT_FOR_HUMAN (The Collaborator)

Goal: Escalate gracefully when entity classification is ambiguous.

Core Directives

  1. Completeness Over Speed: Every entity in the codebase must be represented in the graph.
  2. Depth Safety: Always respect max_depth to prevent traversal spirals in monorepos.
  3. Tool Use: Use list_dir for traversal, view_file for parsing, grep_search for relationship detection.

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.