code-reachability-audit
Skill220 starsChanged 17 days agoMITView on GitHub
Use before classifying a repository file or script as dead or proposing deletion: census static, dynamic, CI, hook, manifest, documentation, and host-scheduler callers; prove the search with positive and negative controls; classify reachability and resolve misleading mentions. Not for restructuring a live module graph.
In this repository179 other files it gives its agents.
- AGENTS.mdAGENTS.md
- chrono/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- accessible-media-authoringSkill
- agentic-safety-auditSkill
- agent-prompt-engineeringSkill
- audio-event-map-authoringSkill
- auto-scaffoldSkill
- chain-constructSkill
- chain-construct-smart-contractSkill
- claim-verificationSkill
- code-review-loopSkill
- color-theorySkill
- conversation-designSkill
- copy-refinementSkill
- cosmos-sdk-audit-checklistSkill
- cross-chain-bridge-auditSkill
- cross-file-relationship-synthesisSkill
- data-flow-traceSkill
- dedup-prior-art-checkSkill
- defi-invariant-checkSkill
- dependency-cycle-auditSkill
- dependency-health-triageSkill
- detection-as-codeSkill
- diff-aware-semgrep-scanSkill
- differential-reviewSkill
- dimensional-analysis-checkSkill
- dual-level-retrievalSkill
- durable-nonce-exploitationSkill
- erc1271-revert-data-checkSkill
- error-based-sstiSkill
- evm-audit-flowSkill
- figma-implement-designSkill
- findings-filterSkill
- forensic-timeline-authoringSkill
- game-design-fundamentalsSkill
- game-mechanics-balancingSkill
- head-tailSkill
- incident-response-runbookSkill
- interactive-audio-designSkill
- interface-ambiguity-checkSkill
- keyword-clusteringSkill
- knowledge-base-integrationSkill
- known-advisory-backport-checkSkill
- layered-analysis-loopSkill
- level-design-patternsSkill
- locale-adaptationSkill
- multi-stance-audit-fanoutSkill
- narrative-structureSkill
- osint-platform-auditSkill
- parser-differential-route-confusionSkill
- persuasive-technical-writingSkill
- platform-complianceSkill
- player-engagement-psychologySkill
- pre-audit-threat-modelSkill
- program-rubric-lookupSkill
- read-only-reentrancy-checkSkill
- requirements-elicitationSkill
- review-severity-ladderSkill
- rule6-rights-gateSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Use (^|[^A-Za-z0-9_-])<basename> — allow a path separator before the name, forbid word characters.
≈ “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
Code Reachability Audit
Deciding a file is dead is a deletion, and deletions are irreversible. The claim "nothing calls this" is an absence claim, so it needs an exhaustive search plus a control proving the search can detect presence. A grep miss is not proof.
The search set — every surface, not just the obvious ones
A repo-only git grep is not exhaustive. Check all of these:
| Surface | Why it hides callers |
| Shell | exec, source, bash "$VAR", paths built from $(dirname …) |
| Python | subprocess, Path(...), names assembled from parts |
.github/workflows/** | CI is a caller with no in-repo reference to it |
Git hooks (.githooks/**) | invoked by git, never by code |
| Plugin manifests, lane adapters | declarative wiring, not calls |
~/Library/LaunchAgents/*.plist | outside the repo entirely |
crontab -l, systemd units | same class as launchd on other platforms |
| Operator documentation | a script a human runs on purpose is live with zero programmatic callers |
The launchd surface is the one that bites. On 2026-08-06 an audit classified
bin/squad-monitor.sh as dead on correct in-repo evidence — its only references
were two tests. It runs every 120 seconds via com.chrono.squad-monitor,
registered in ~/Library/LaunchAgents/, where no git grep reaches. Several repo
scripts are bound that way. bin/doctor.sh now reports the live mapping on every
health run, computed from the main checkout; read that mapping (not any fixed count,
which drifts) before calling anything dead.
Matching, without fooling yourself
Both failure directions are real and both happened in one session:
- Too loose. A bare basename search reported
capture.pyas having six callers. Every hit was insideautocapture.py. - Too strict. Anchoring with
[^A-Za-z0-9_/-]then excluded/, hiding path-qualified references, so a file with a live caller looked orphaned.
Use (^|[^A-Za-z0-9_-])<basename> — allow a path separator before the name,
forbid word characters.
Two controls, every time
- Positive — search for a file you know is live and confirm the census returns its callers. If it cannot find a known caller, its silence is meaningless.
- Negative — search for an invented filename and confirm zero rows. This is what makes empty output evidence rather than an artifact.
Read the hit before believing it
A reference is not always a call:
vs-dashboard-loop.shmentionswatch-lane.shin a comment — "Replaces the old 4-lane watch-lane.sh render." A mention of what something replaced is not a call.- Prose documenting a removal necessarily names the thing removed. A regex counting "stale terminology" will score those as drift; they are the record of the change.
- A parser may consume a literal string that looks like prose. Seven references
to
Expected Model Lane Tool Surfacewere to a block name still emitted at runtime; renaming them would have broken the parser.
Buckets
entry-point (humans or CI invoke it; zero callers is correct) · live ·
reachable-dynamically (runtime-constructed path; evidence required) ·
legacy-live (reachable but built for a retired architecture — say what must
change before retiring it) · dead.
Before deleting
- Prove equivalence where you can. Truncating a file after an unconditional
exitshould produce byte-identical output — restore the original inside its own directory so path resolution matches, and diff the two runs. A control run from a temp directory measures the environment, not the change. - Deleting code deletes its dedicated tests too; a test for removed code is also dead. A test that covers the removed thing among others is not — edit it or leave the code alone.
- Sweep for stranded references afterwards: file headers describing what is
"below", docs pointing at output directories nothing writes any more, and
glob-based config where case matters (
action-log.mdwill not matchACTION-LOG.md).
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.

