graphify-v2
Skill1 starsChanged 7 months agoMITView on GitHub
State-aware knowledge graph generation for codebase semantic understanding and architectural auditing.
In this repository14 other files it gives its agents.
- base-state-machine-runtimeSkill
- <skill-name>Skill
- component-wizardSkill
- first-principles-designSkill
- implementation-engineerSkill
- legacy-modernizerSkill
- multi-agent-orchestratorSkill
- perf-optimusSkill
- root-cause-isolatorSkill
- security-sentinelSkill
- skill-architectSkill
- skill-registrySkill
- test-engineerSkill
- ux-guardianSkill
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
- Very specific: line 155
If classification is uncertain, transition to Wait-For-Human.
- Distinctive: line 185
Completeness Over Speed: Every entity in the codebase must be represented in the graph.
- Very specific: line 186
Depth Safety: Always respect max_depth to prevent traversal spirals in monorepos.
- Very specific: line 187
Tool Use: Use list_dir for traversal, view_file for parsing, grep_search for relationship detection.
≈ “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.
Files
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
contextsection 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: WriteENTITY_INDEX.md. - Categorize entities by type and module.
- Map all relationships with their direction and type.
- Mandatory: Include a
tradeoffs_rejectedsection 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
contextsection 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
- Completeness Over Speed: Every entity in the codebase must be represented in the graph.
- Depth Safety: Always respect
max_depthto prevent traversal spirals in monorepos. - Tool Use: Use
list_dirfor traversal,view_filefor parsing,grep_searchfor relationship detection.
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
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.

