graph
Skill17 starsChanged 3 months agoMITView on GitHub
Build and query a local, deterministic codebase knowledge graph (imports, symbols, OpenSpec specs, memory) so agents navigate with token-budgeted subgraphs instead of re-grepping. Use when indexing a repo, finding who consumes a symbol, tracing how one module reaches another, or before a deep explore or review sweep.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- 9Ashwin/let-it-gotheir own version, first seen Sep 28, 2026
- Yeachan-Heo/oh-my-claudecodetheir own version, first seen Sep 22, 2026
- AraneaDev/knossostheir own version, first seen Sep 15, 2026
- factor241/ketos-bottheir own version, first seen Sep 3, 2026
- nikshostudios/uni-claude-skillstheir own version, first seen Aug 31, 2026
- iwe-org/skillstheir own version, first seen Aug 29, 2026
Used with
Projects with it also use watch, lint and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hidai25Skillwatch
Start EvalView watch mode to automatically re-run regression checks whenever project files change.
Also in 3 projects that use this
Microsoft AzureSkilllint
Run all linting and spell checking for TypeScript and Rust code. Run this before committing to catch style issues, clippy warnings, and misspellings.
Also in 3 projects that use this
raven-souravSkillingest
Also in 3 projects that use this
DockerSkillresearch
Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".
Also in 4 projects that use this
Google CloudSkilltriage
Gather context on a change or bug and plan the implementation.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- smallnest/goal-workflow★ 287same name
- romarayt/raytsystem-public-os★ 150same name
- alirezarezvani/gaios★ 45same name
- drafthq/draft★ 40same name
- iwe-org/skills★ 13same name
- AraneaDev/knossos★ 2same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- geronimo-iia/llm-wiki-skills★ 2same name
- modeled-information-format/research-harness-template★ 2same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- bootstrapSkill
- commitSkill
- dispatchSkill
- docs-digestSkill
- evalsSkill
- explain-codeSkill
- exploreSkill
- fix-testsSkill
- manual-test-planSkill
- mrSkill
- reportSkill
- review-artifactsSkill
- review-codeSkill
- shipSkill
- specSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
3
Distinctive
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
- Very specific: line 31
Add .claude/graph/ to .gitignore — these are generated per-checkout and should never be committed.
- Distinctive: line 69
Run the matching subcommand:
- Distinctive: line 79
Only then reach for Grep/Read to cover what the graph structurally cannot see: dynamic imports, string-keyed lookups, generated code, …
- Very specific: line 83
Never read all of docs/*.md upfront.
- Very specific: line 127
Follow ${CLAUDE_PLUGIN_ROOT}/shared/TOOL-ECONOMY.md and ${CLAUDE_PLUGIN_ROOT}/shared/INVARIANT-SWEEP.md.
- Very specific: line 134
Confidence matters: Prefer EXTRACTED edges. Treat INFERRED edges (OpenSpec, memory overlays) as hints to verify, not facts.
- Distinctive: line 135
Never invent nodes: If the CLI reports no match, say so and fall back to grep.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Build and query a local, deterministic codebase knowledge graph. No vector store, no external service, no network.
What gets indexed: JS/TS, Python (.py/.pyi), shell (.sh/.bash), and curated small config JSON (package.json, tsconfig*.json — not lockfiles). Markdown stays on the bounded-retrieval path (DOCS_DIGEST.md / context / docs) plus the OpenSpec overlay — never dump every *.md into graph.json.
Languages outside that set (Go, Rust, Java, Ruby) are not structurally indexed: you still get the docs and OpenSpec overlays, but no import/symbol edges. Say so plainly rather than implying the graph is complete.
Artifacts, all project-local under .claude/graph/:
| Path | Role |
graph.json | Node-link graph — the query source of truth |
GRAPH_REPORT.md | Cheap bootstrap: hubs, modules, inferred edges |
docs-index.json | Deterministic docs TOC + content hashes |
DOCS_DIGEST.md | Agent-only prose bootstrap (written by /interlock:docs-digest) |
manifest.json | File hashes powering incremental update |
Add .claude/graph/ to .gitignore — these are generated per-checkout and should never be committed.
The CLI
interlock-graph is on PATH whenever this plugin is enabled. Do not probe for it, do not build a fallback path, do not shell out to node with an absolute path.
interlock-graph --help # full subcommand list
interlock-graph which # print the resolved CLI path, if you need to report itModes
Build — when the graph is missing, or the user asks to index
interlock-graph build .Then read .claude/graph/GRAPH_REPORT.md and summarize the top hub nodes and module boundaries. Do not rebuild on every query. If graph.json already exists, query it or update it.
Update — after merges, or when paths look stale
interlock-graph update .No-ops when file hashes still match manifest.json.
Query — the default mode
For "where is X", "what connects to Y", "how does A reach B", "who uses Z":
- Expand the user's wording into graph vocabulary (use labels from a prior
queryor fromGRAPH_REPORT.md). - Run the matching subcommand:
interlock-graph query "<tokens>" --budget 1500
interlock-graph consumers <symbol-or-file>
interlock-graph path <A> <B>
interlock-graph explain <node>- Answer from the returned subgraph. Cite
source_file:source_location. - Only then reach for Grep/Read to cover what the graph structurally cannot see: dynamic imports, string-keyed lookups, generated code, reflection.
Docs and context — bounded prose retrieval
Never read all of docs/*.md upfront.
- Prose bootstrap — if
.claude/graph/DOCS_DIGEST.mdexists, read it once. Rebuild with/interlock:docs-digestwhen it is missing or stale. - Rebuild the deterministic TOC the digest is derived from:
interlock-graph docs-index . --write- Task-specific excerpts:
interlock-graph context "<task tokens>" --budget 2000 --changed path/a.ts,path/b.ts
interlock-graph docs "<domain terms>" --budget 800 --dirs docs,openspec/specscontext combines a structural subgraph (~45% of budget) with ranked Markdown sections (~55%). Sections cite file — heading (Lstart-Lend).
Arguments
This skill takes free text, treated as a query. Two forms are recognized ahead of that:
| Input | Action |
| "index the repo" / "build the graph" / "rebuild" | build ., summarize the report, stop |
| "update the graph" | update ., report what changed, stop |
| anything else | Query mode |
Note these map to CLI subcommands, not flags. There is no --rebuild or --consumers flag; interlock-graph --rebuild is an error.
When other skills call this
| Situation | Command |
| Session explore / architecture mapping | Read GRAPH_REPORT.md, then query per subsystem |
| Domain prose bootstrap | Read DOCS_DIGEST.md; rebuild via /interlock:docs-digest if stale |
| Invariant sweep, structural layer | consumers <field-or-symbol> first, then grep for string-keyed readers |
| explain-code "called by" / "calls into" | explain / consumers / path |
| Brownfield onboarding | build, then seed the architecture doc from report hubs and modules |
Follow ${CLAUDE_PLUGIN_ROOT}/shared/TOOL-ECONOMY.md and ${CLAUDE_PLUGIN_ROOT}/shared/INVARIANT-SWEEP.md.
Stance
- Graph first, files second. The graph is an index, not a substitute for reading real code when you implement or verify semantics.
- Confidence matters. Prefer
EXTRACTEDedges. TreatINFERREDedges (OpenSpec, memory overlays) as hints to verify, not facts. - Never invent nodes. If the CLI reports no match, say so and fall back to grep. Do not synthesize a plausible-looking path.
- Read-only by default.
buildandupdatewrite only under.claude/graph/.
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.

