/arch-skills:repo-navigability-auditfrom Architecture skills
Audits how easily people and coding agents find, understand and extend code in a repo, and returns a scored report with ranked fixes and an AGENTS.md draft. Use to audit a repo's structure, make it agent-ready, or set up AGENTS.md or CLAUDE.md.
Ships in Architecture skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Measure how fast a newcomer (a person or an agent with no memory) can get from "I have a task" to "these are the files to change", then fix what slows them down.
Score nothing without evidence, and test with real tasks. A repo can tick every box (it has an AGENTS.md, it has folders) and still be hard to navigate. The find-the-code test in Step 4 is what shows it.
Why: agents and newcomers fail in the same way. When they cannot find the existing code, they write a second copy. That is where duplication and boundary bypasses start.
If the repo has app.modules.ts and docs/verify/gate-checks.txt, read references/project-bphs-connect.md first: it names the module layout and the conventions (such as <module>/shared/) that are deliberate, so you do not score them as clutter.
git log --since="3 months ago" --format= --name-only | cut -d/ -f1-2 | sort | uniq -c | sort -rn | head).python3 scripts/repo_scan.py <repo-root> # add --source-dirs src/features,packages if the guess is wrong
python3 scripts/repo_scan.py <repo-root> --json # for exact numbers
Run it with --help the first time. It reports front doors, nested rule files, stale paths in front doors, depth, generic folder names, wide folders, public entries per module, exemplars, and name tokens with possible synonym clusters. It collects facts; it does not score.
Read in full: root AGENTS.md or CLAUDE.md, ARCHITECTURE.md, README.md, and the ADR index or the 5 newest ADRs. For each, note:
stale_links in the scan)Then read references/information-architecture.md for the principles and the scoring rubric.
This is the most important step. It is tree testing (an established IA method) applied to a repo.
git log --oneline -30), open issues, or ask the user. Mix: one feature addition, one bug fix, one cross-cutting change.If the repo has no history, say so and use tasks the user gives you. Keep the tasks and step counts in the report: after the fixes land, the same test run again is the before-and-after measure.
If the repo has a glossary (GLOSSARY.md, a Glossary section in ARCHITECTURE.md, or a domain docs page), check names against it. Otherwise, from vocabulary in the scan and from the domain types you read, pick the 5 to 10 main domain nouns. For each, list every name used for it across folders, types, tables and API routes. More than one name for one concept inside one bounded context is a finding (Evans 2003). Different names in different bounded contexts may be correct: say which context each belongs to.
Score the 12 checks in the rubric (Brown's eight principles plus the four layers), 0 to 2 each, with one line of evidence per score. Use references/severity.md for findings.
Rank fixes by how much they shorten the find-the-code test, divided by effort. Typical high-value fixes, cheapest first:
assets/AGENTS.template.md).assets/ARCHITECTURE.template.md).utils/, helpers/, common/, misc/): move each file next to its only caller, or into a named domain module. This is a plan, not an action; it needs the owner's yes.references/fitness-functions.md).Offer to write the drafts for items 1 to 3. Make no moves or renames without the user's yes.
REPO NAVIGABILITY AUDIT: <repo> (<scope>)
Score: <n>/24 Find-the-code: <tasks passed>/<tasks run>, median <n> steps
Verdict: <one sentence: the single biggest obstacle>
Top fixes (ranked):
1. <fix> | effort: S/M/L | evidence: <short> | expected effect: <which test task gets shorter>
2. ...
Find-the-code results:
T1 "<task>": <steps> steps, <found right files: yes/no>, lost at: <where>
...
Scores:
| Check | Score | Evidence |
| Objects (one name per concept) | 1 | invoice/bill used for the same thing in src/billing and api/routes |
| ... 12 rows ... |
Findings: (severity, confidence, evidence, principle, fix), Critical to Low, then Positive
Vocabulary: <concept: names found, and where>
Drafts offered: <AGENTS.md / ARCHITECTURE.md / none>
Not checked: <what and why>
| If you think... | Do this instead |
|---|---|
| "AGENTS.md exists, so front doors score 2." | Read it. Score its content: specific, short, current, correct paths. |
| "A longer AGENTS.md is better." | Every line is read in every session. Cut generic advice; link to details instead. |
| "I'll generate a full AGENTS.md overview from the tree." | Write only what the code does not already show: commands, unusual conventions, invariants, where to start. |
| "Deep folders are bad, so flatten everything." | Depth is a problem when it makes search fail. Use the find-the-code results, not the number alone. |
"shared/ is a generic name, so it is a finding." | Check what is in it. A small, owned kernel of domain types is fine; a dumping ground is not. |
| "I'll reorganise the folders to show what good looks like." | Propose a move plan. Never move files during an audit. |
| "The scan is the audit." | The scan gives facts. Steps 3 to 5 are the audit. |
app/, Rails app/models, Django apps). Judge against the framework's own norms first.repo_scan.py guesses source folders (src, app, packages, ...). If modules live one level lower (src/features/*), rerun with --source-dirs.kernel/http.ts for server/http.ts), or files git ignores on purpose. Check before reporting.modules/*/shared) is a layout convention. The scan folds it into one line; judge it as a convention, not as a dumping ground.assets/AGENTS.template.md (opens in a new tab)assets/ARCHITECTURE.template.md (opens in a new tab)references/fitness-functions.md (opens in a new tab)references/information-architecture.md (opens in a new tab)references/project-bphs-connect.md (opens in a new tab)references/severity.md (opens in a new tab)scripts/repo_scan.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bytefloww1013/josh-skills --plugin arch-skills6 skills in this plugin
/architecture-decision-reviewReviews a design choice before it is built and returns an ADR with a reversibility call, a connascence table and fitness functions. Use when choosing between design options, or before a plan adds, splits or moves a module, dependency, schema or public API./architecture-review-reportReviews the architecture in a written plan, spec, RFC, design doc or set of GitHub issues and writes an evidence-based report: each finding quotes its text and gives a severity, an impact and a suggestion. Use for "review this spec" or "what's wrong with this plan"./pr-erosion-checkChecks a PR, branch or diff for architecture erosion, agent shortcuts and scope beyond the linked issue, and returns a merge verdict with file:line findings. Use to review a PR or diff, before a merge, and before a coding agent reports done./state-machine-auditFind the implicit state machines in an app or repo, map them (Mermaid for big ones), judge whether each behavior is intended, flag paths to bugs or invalid states, and write a findings report./user-flow-mapperMap an app user's journey for a task as Mermaid diagrams, get approval, then build mockups/prototype and a formal UX report. Use when asked for a user flow, journey map or flow blueprint.