mycelium-hq/ai-brain-starter/graphify
Claude Code and agent skill by mycelium-hq/ai-brain-starter
- community
Checking that the SKILL.md file is still in the repository.
Use when the user invokes /graphify or asks to build, update, or query a knowledge graph from a folder of files (code, docs, papers, notes, images). Triggers: ''map this codebase'', ''graph my notes'', ''what is connected across these files'', ''community detection'', ''GraphRAG'', incremental graph update, Neo4j/SVG/GraphML export, graph lookups (query, shortest path, explain a node). Not for simple file reads, vault edits, or plain text search.
Install
npx vskill@latest install mycelium-hq/ai-brain-starter/graphifySKILL.md
/graphify
`{SKILL_DIR}` = this skill's own folder (locally: the directory this SKILL.md lives in; a served brain substitutes the real absolute path before you read this). If a path does not resolve, name the missing file and stop — never guess another location.
Turn any folder of files into a navigable knowledge graph with community detection, an honest audit trail, and three outputs: interactive HTML, GraphRAG-ready JSON, and a plain-language GRAPH_REPORT.md.
⚡ Before running on a corpus larger than ~50 files, READ [OPTIMIZATIONS.md](./OPTIMIZATIONS.md). The wrapper scripts inscripts/(dedupe, regex preflight, word-balanced chunking, label canonicalization, cache integration) typically cut LLM token cost by 80–92% and produce a higher-quality graph. The single most important step is callinggraphify_canonicalize.py --cacheafter merging — without it, the next--updaterun repays the entire cost. Skip these wrappers and a 1,500-file vault will burn ~10M LLM tokens for the same graph that costs ~1M with them.
Usage
What graphify is for
graphify is built around Andrej Karpathy's /raw folder workflow: drop anything into a folder - papers, tweets, screenshots, code, notes - and get a structured knowledge graph that shows you what you didn't know was connected.
Three things it does that Claude alone cannot:
- Persistent graph - relationships are stored in
graphify-out/graph.jsonand survive across sessions. Ask questions weeks later without re-reading everything. - Honest audit trail - every edge is tagged EXTRACTED, INFERRED, or AMBIGUOUS. You know what was found vs invented.
- Cross-document surprise - community detection finds connections between concepts in different files that you would never think to ask about directly.
Use it for:
- A codebase you're new to (understand architecture before touching anything)
- A reading list (papers + tweets + notes → one navigable graph)
- A research corpus (citation graph + concept graph in one)
- Your personal /raw folder (drop everything in, let it grow, query it)
CRITICAL: graph.json edge key
graphify.export.to_json() uses networkx's node_link_data format. Edges are stored under the key `"links"`, NOT "edges". If you ever write a custom script that loads graph.json and reads edges directly, use:
Failing to do this gives you 0 edges silently and will corrupt any merge.
The skill's own pipeline uses internal temp files (.graphify_*.json) that DO use "edges" — that is fine because those files are written/read by the same code. This warning only applies to loading `graph.json` directly.
What You Must Do When Invoked
If no path was given, use . (current directory). Do not ask the user for a path.
Follow these steps in order. Do not skip steps.
Step 1 - Ensure graphify is installed
If the import succeeds on first try, print nothing and move straight to Step 2. If an install ran, the success line is the only output. If install failed, the skill has already exited — do not continue.
In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.
Step 2 - Detect files
Replace INPUT_PATH with the actual path the user provided. Do NOT cat or print the JSON - read it silently and present a clean summary instead:
Then act on it:
- If
total_filesis 0: stop with "No supported files found in [path]." - If
skipped_sensitiveis non-empty: mention file count skipped, not the file names. - If
total_words> 2,000,000 ORtotal_files> 200: show the warning and the top 5 subdirectories by file count, then ask which subfolder to run on. Wait for the user's answer before proceeding. - Otherwise: proceed directly to Step 2.5 if the corpus has
videofiles, else straight to Step 3 - no need to ask anything.
Step 2.5 - Transcribe video/audio files (only if detect reported video files)
Skip this step entirely if .graphify_detect.json's files.video list is empty. Video and audio cannot be read directly - transcribe first, then treat the transcripts as doc files in Step 3. See TRANSCRIBE.md for the full procedure (writing a domain-hint prompt, --whisper-model handling, running graphify.transcribe.transcribe_all).
Step 3 - Extract entities and relationships
Before starting: note whether --mode deep was given. You must pass DEEP_MODE=true to every subagent in Step B2 if it was. Track this from the original invocation - do not lose it.
This step has two parts: structural extraction (deterministic, free) and semantic extraction (Claude, costs tokens).
Run Part A (AST), Part A.5 (zero-LLM typed edges, if available), and Part B (semantic) in parallel. Dispatch all semantic subagents AND start the structural extractions in the same message. They operate on different surfaces — AST on code files, Part A.5 on markdown frontmatter + wikilinks, Part B on docs/papers/images via subagents — so they can run simultaneously. Merge results in Part C as before.
Note: Parallelizing structural + semantic saves 5-15s on large corpora. The structural passes are deterministic and fast; start them while subagents process the rest.
Part A - Structural extraction for code files
For any code files detected, run AST extraction in parallel with Part B subagents:
Part A.5 - Zero-LLM typed-relationship extraction for markdown
If a typed-relationship extractor is available, run it in parallel with Part A and Part B. It walks markdown, reads frontmatter + body, and emits typed edges (works_at, floor_at, journaled_about, attended, mentions, governs, created_on, investor_for) to JSONL at zero LLM cost. Extracts ~80% of explicit edges (frontmatter + wikilinks); Part B's semantic extraction is configured to skip entities + edges already covered by this pass, so the LLM only fires on the genuinely-ambiguous ~20% (proper-noun disambiguation, novel entity types, negation parsing).
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/graphify/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mycelium-hq/ai-brain-starter/graphify)