graph-guided-code-reading
Skill16 starsChanged 5 months agoMITView on GitHub
Reduce repository-reading token waste by navigating code through symbols, entrypoints, dependencies, changed files, and blast radius instead of broad whole-tree or whole-file reading. Use on medium-to-large repos, PR reviews, architecture questions, onboarding, debugging across modules, or long-running audits.
In this repository94 other files it gives its agents.
- agent-friction-ledgerSkill
- agent-learning-layer-triageSkill
- agent-operations-contractSkill
- agents-best-practicesSkill
- agent-tool-contract-reviewSkill
- anti-slop-reviewSkill
- architecture-deepening-reviewSkill
- assumption-excavationSkill
- authorized-security-routerSkill
- book-to-skillSkill
- bounded-evaluationSkill
- bounded-growth-loopSkill
- bounded-orchestration-contractSkill
- brief-first-executionSkill
- browser-verificationSkill
- bug-evidence-protocolSkill
- codex-review-loopSkill
- compaction-survivalSkill
- complexity-optimizerSkill
- confidence-fragility-reviewSkill
- context-degradation-reviewSkill
- corporate-surfaceSkill
- delivery-baseline-auditSkill
- delivery-preflight-gateSkill
- design-critique-polishSkill
- designmd-brand-kitSkill
- design-register-bootstrapSkill
- diagnoseSkill
- doc-grounded-grillingSkill
- doc-to-lora-evaluatorSkill
- durable-context-maintenanceSkill
- dynamic-workflow-packetsSkill
- editorial-surfaceSkill
- evidence-ledger-researchSkill
- filesystem-context-disciplineSkill
- fluid-interaction-reviewSkill
- frontend-product-builderSkill
- frontend-taste-layerSkill
- git-native-context-contractSkill
- goal-loop-designerSkill
- handoffSkill
- happy-handoffSkill
- html-brief-artifactSkill
- html-diagram-artifactSkill
- hypothesis-diversificationSkill
- idea-to-ship-gatesSkill
- knowledge-base-enrichmentSkill
- lean-context-layoutSkill
- local-inference-tuningSkill
- loop-hardening-contractSkill
- loopops-protocolSkill
- loop-readiness-reviewSkill
- lottie-motion-builderSkill
- minimal-diff-builderSkill
- motion-review-gateSkill
- overengineering-reviewSkill
- personal-workspace-routerSkill
- phase-spec-executionSkill
- pipeline-readiness-gateSkill
- plan-to-issuesSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Stop expanding once the next action is clear.
- Distinctive: line 31
Start from the highest-signal anchor:
- Distinctive: line 41
Read narrow slices around the relevant symbols first.
- Distinctive: line 47
If a repo graph, repomap, AST, or change-impact tool exists, use it first.
- Distinctive: line 48
If not, emulate graph reading with:
- Distinctive: line 58
Start with changed files and public interfaces.
- Distinctive: line 64
Start from the failing surface and walk inward.
- Distinctive: line 65
Prefer one causal path over opening every suspected file.
- Distinctive: line 66
Keep hypotheses tied to specific nodes in the focus set.
- Distinctive: line 70
Start from entrypoints and major seams, not internal helpers.
- Distinctive: line 80
Do not force graph formalism on tiny repos where two files answer the question.
- Distinctive: line 81
Do not skip critical config, generated interfaces, or migration boundaries when they affect behavior.
- Distinctive: line 82
Do not keep expanding the graph after the winning path is already clear.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Graph Guided Code Reading
Save tokens by reading the codebase as a dependency graph, not as a pile of files.
Core Principle
Most repo-reading waste comes from opening too many files too early. Build a small relevance graph first, then read only the nodes that matter.
Minimal Relevance Graph
For each task, identify only:
- the user-visible entrypoint or changed surface;
- the owning module or service;
- the direct dependencies and dependents that shape behavior;
- the nearest tests, config, or contracts that constrain the change.
Stop expanding once the next action is clear.
Reading Workflow
- Start from the highest-signal anchor:
- changed files;
- failing test;
- route, command, job, or entry function;
- exact symbol or error text.
- Build a compact focus set:
- entrypoint;
- implementation module;
- adjacent callers/callees or imports;
- validating tests.
- Read narrow slices around the relevant symbols first.
- Expand one edge at a time only if the current node does not answer the question.
- Maintain a short checked-location ledger so files are not reopened without a reason.
Preferred Tools
- If a repo graph, repomap, AST, or change-impact tool exists, use it first.
- If not, emulate graph reading with:
rgfor symbol ownership;git diff --name-onlyor failing-test paths for anchors;- imports, call sites, and config references for edges;
- nearby tests for behavior contracts.
Task Patterns
PR Review
- Start with changed files and public interfaces.
- Trace immediate blast radius: callers, consumers, schemas, tests.
- Review the impact set before reading unrelated modules.
Debugging
- Start from the failing surface and walk inward.
- Prefer one causal path over opening every suspected file.
- Keep hypotheses tied to specific nodes in the focus set.
Architecture Questions
- Start from entrypoints and major seams, not internal helpers.
- Build a compact service/module map before diving into implementation details.
Long Audits
- Partition the codebase into focused subgraphs.
- Finish one subgraph with evidence before opening the next.
Guardrails
- Do not force graph formalism on tiny repos where two files answer the question.
- Do not skip critical config, generated interfaces, or migration boundaries when they affect behavior.
- Do not keep expanding the graph after the winning path is already clear.
Final Report
Include the focus set, the decisive nodes, what was not read, and any remaining uncertainty at the edges.
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.

