graphify
Use when exploring unfamiliar codebases, before searching for code, or after editing files. Builds a structural AST index (classes, functions, imports, call graph) from 12 languages via tree-sitter. Trigger: /graphify
Security Assessment
About graphify
A structural code-navigation layer that builds an AST-based index of a codebase — classes, functions, imports, and a call graph — using tree-sitter, so an agent can know what exists, where it lives, and how it connects before resorting to keyword search. It is delivered as a CLI (installed with npm i -g graphify-ts, which runs on the Bun runtime) and triggered via /graphify. The index is updated manually rather than automatically, a deliberate choice to avoid write conflicts in git worktrees and multi-session setups. Setup builds the index once per project with graphify build ., which scans all source files, extracts AST structure, and saves it to graphify-out/graph.json, reporting the counts of files, symbols, and relationships. Four commands drive it: build for the first-time or full rebuild; query, a case-insensitive search that returns matching symbols with their file locations; update, an incremental re-extraction of named files after edits; and auto-update, which computes changed and untracked files from git diff and refreshes them in bulk, staying silent when nothing changed. The recommended usage is to query the graph before Glob or Grep whenever graphify-out/graph.json exists, replacing blind keyword search with structured lookup; to run an incremental update after editing if the graph will be queried again in the same session; and to query concepts when exploring unfamiliar code to find entry points without guessing filenames. It supports a broad set of languages including Python, JavaScript, TypeScript (JSX/TSX), Go, Rust, Java, C, C++, Ruby, C#, Kotlin, Scala, and PHP. The graph output is JSON with nodes, edges, and metadata, and edge relations include contains, method, imports, imports_from, calls, and inherits.
FAQ
How do I set up graphify?
Install the CLI once per machine with npm i -g graphify-ts (it uses the Bun runtime), then build the index once per project with graphify build .
Does the index update itself automatically?
No — updates are manual by design to avoid write conflicts in git worktrees and multi-session setups; run graphify update or graphify build when the index drifts from the code.
When should I query the graph instead of grepping?
Whenever graphify-out/graph.json exists, query it before Glob or Grep — the graph tells you which files contain which symbols, replacing blind keyword search with structured lookup.
How do I refresh the index after editing files?
Run graphify update graphify-out/graph.json <files> to re-extract specific files, or graphify auto-update to bulk-refresh changed and untracked files computed from git diff.
Which languages are supported?
A broad set including Python, JavaScript, TypeScript (JSX/TSX), Go, Rust, Java, C, C++, Ruby, C#, Kotlin, Scala, and PHP, all parsed via tree-sitter.
Install graphify
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
howell5/willhong-skills