Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Audit and recommend improvements for a repository's agent-readable context, including AGENTS.md, CLAUDE.md, WARP.md, CONTRIBUTING.md, .agents/skills, and specs/ PRODUCT.md and TECH.md contracts. Use when asked to review, score, assess, or standardize repo instructions, agent onboarding, spec workflows, or cross-repo agent-context conventions. Use agentsmd-scaffold instead when the user wants to generate or apply root/scoped AGENTS.md files.
.claude/skills/majiayu000-repo-agent-context-audit/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 65% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 78% | 0% |
Assess whether a repository has a small, usable agent context stack: a short top-level instruction file, task-specific skills, and behavior/implementation specs for substantial work. Default to a read-only audit and minimal recommendations; create or edit high-context files only when the user explicitly asks.
If the user asks to generate, split, or apply root/scoped AGENTS.md files, handoff to agentsmd-scaffold. This skill may identify that scaffold as the smallest useful change, but should not duplicate the generation workflow.
Prefer this three-layer shape:
AGENTS.md or repo-equivalent: 80-150 lines, top-level routing only..agents/skills/<task>/SKILL.md: reusable workflows for common fragile tasks.specs/<id>/PRODUCT.md and specs/<id>/TECH.md: checked-in contracts for substantial features.Do not force this exact layout when a repo already has a coherent equivalent, such as WARP.md, CLAUDE.md, CONTRIBUTING.md, or framework-specific instruction files. Map existing files to the layers first, then fill only the real gaps.
Run the read-only scanner when possible:
bash# From this skill directory: python3 scripts/scan_repo_context.py <repo-root>
Then inspect the important files directly. Always search before creating:
AGENTS.md, CLAUDE.md, WARP.md, .claude/instructions.mdCONTRIBUTING.md, README.md, .github/copilot-instructions.md.agents/skills/*/SKILL.mdspecs/**/{PRODUCT,product,TECH,tech}.mdIf multiple instruction files overlap, record their scopes and precedence instead of merging them by default.
Classify the repo into one of these states:
Use the rubric in references/standards.md for:
Lead with the smallest useful change. Good recommendations usually look like:
AGENTS.md that points to existing docs instead of duplicating them..agents/skills/write-product-spec and .agents/skills/write-tech-spec only if spec writing is repeated.specs/<id>/PRODUCT.md and TECH.md templates only if the repo ships substantial features.When the user explicitly asks to generate, split, or apply root/scoped AGENTS.md files, use agentsmd-scaffold instead of duplicating that workflow.
When the user asks for exact PRODUCT/TECH spec templates or non-AGENTS context scaffolding, read references/templates.md and adapt the templates to the repo. Before editing:
AGENTS.md or equivalent whose scope covers the target path| Case | Action | |---|---| | Small bugfix repo with README and clear tests | No spec system; maybe add a short AGENTS.md router | | Repeated feature work with review churn | Add PRODUCT/TECH spec workflow | | User asks to generate or apply root/scoped AGENTS.md files | Use agentsmd-scaffold | | Existing CLAUDE.md or WARP.md is good | Link it from AGENTS.md or leave it as the repo-equivalent | | Multiple teams or nested packages | Use scoped nested AGENTS.md only where rules genuinely differ | | High-context file over 200 lines | Split into top-level router plus referenced skills/docs | | User asks for bulk normalization | Audit first; do not batch edit until 2-3 repos have been manually validated |
Direct actions:
agentsmd-scaffold.Escalate before:
AGENTS.md, CLAUDE.md, WARP.md, hooks, settings, or generated docs.Evidence-backed pushback:
Feedback loop:
AGENTS.md just because it is missing. If CLAUDE.md, WARP.md, or CONTRIBUTING.md already works as a coherent router, recommend a pointer or no change.PRODUCT.md vs product.md, then ask before changing conventions.Return concise findings:
markdown## Agent Context Audit - state: <classification> - top-level router: <present/missing/overloaded> - reusable skills: <present/missing/not needed> - specs: <present/missing/inconsistent/not needed> - main risk: <one sentence> ## Smallest Useful Change 1. <change> - <why> - <estimated effort> ## Evidence - <file>:<line> - <what it proves> ## Optional Scaffold - <files to create or update, only if requested>
scripts/scan_repo_context.py: read-only repo scanner for high-context files, skills, and specs.references/standards.md: scoring rubric and design rules. Read for audits.references/templates.md: minimal AGENTS.md, PRODUCT.md, and TECH.md templates. Read only when scaffolding or proposing exact file contents.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 15,054 | 8,616 | -43% | 1 | 1 | 0% | 2,537 | 2,078 | -18% | 0 | 0 | — |
case-02 | fail→fail | 5,859 | 5,267 | -10% | 1 | 1 | 0% | 289 | 1,976 | +584% | 0 | 0 | — |
case-03 | fail→fail | 25,255 | 6,983 | -72% | 1 | 1 | 0% | 4,067 | 2,059 | -49% | 0 | 0 | — |
case-04 | fail→fail | 21,726 | 7,437 | -66% | 1 | 1 | 0% | 3,873 | 2,294 | -41% | 0 | 0 | — |
case-05 | pass→pass | 12,212 | 9,501 | -22% | 1 | 1 | 0% | 1,933 | 3,494 | +81% | 0 | 0 | — |
case-06 | pass→pass | 11,706 | 10,605 | -9% | 1 | 1 | 0% | 1,809 | 3,439 | +90% | 0 | 0 | — |
case-07 | pass→pass | 9,328 | 4,764 | -49% | 1 | 1 | 0% | 1,463 | 2,497 | +71% | 0 | 0 | — |
case-08 | fail→pass | 8,123 | 3,014 | -63% | 1 | 1 | 0% | 1,345 | 2,218 | +65% | 0 | 0 | — |
case-09 | fail→pass | 11,082 | 2,566 | -77% | 1 | 1 | 0% | 1,666 | 2,098 | +26% | 0 | 0 | — |
case-10 | pass→pass | 13,444 | 8,274 | -38% | 1 | 1 | 0% | 1,994 | 3,042 | +53% | 0 | 0 | — |
case-11 | pass→pass | 11,236 | 4,223 | -62% | 1 | 1 | 0% | 1,681 | 2,430 | +45% | 0 | 0 | — |
case-12 | fail→pass | 19,020 | 2,379 | -87% | 1 | 1 | 0% | 2,614 | 2,141 | -18% | 0 | 0 | — |
case-13 | fail→pass | 18,218 | 4,851 | -73% | 1 | 1 | 0% | 2,546 | 2,515 | -1% | 0 | 0 | — |
case-14 | fail→pass | 11,369 | 7,920 | -30% | 1 | 1 | 0% | 1,728 | 3,079 | +78% | 0 | 0 | — |
case-15 | fail→pass | 11,822 | 4,434 | -62% | 1 | 1 | 0% | 1,668 | 2,441 | +46% | 0 | 0 | — |
case-16 | pass→pass | 10,477 | 3,085 | -71% | 1 | 1 | 0% | 1,483 | 2,248 | +52% | 0 | 0 | — |
case-17 | fail→pass | 10,619 | 3,369 | -68% | 1 | 1 | 0% | 1,582 | 2,296 | +45% | 0 | 0 | — |
case-18 | pass→pass | 12,748 | 7,338 | -42% | 1 | 1 | 0% | 1,704 | 2,773 | +63% | 0 | 0 | — |
case-19 | pass→pass | 11,660 | 18,196 | +56% | 1 | 1 | 0% | 1,839 | 4,080 | +122% | 0 | 0 | — |
case-20 | pass→pass | 8,059 | 4,216 | -48% | 1 | 1 | 0% | 1,341 | 2,396 | +79% | 0 | 0 | — |
case-21 | pass→pass | 7,031 | 9,395 | +34% | 1 | 1 | 0% | 1,184 | 3,437 | +190% | 0 | 0 | — |
case-22 | pass→pass | 7,280 | 3,514 | -52% | 1 | 1 | 0% | 1,033 | 2,370 | +129% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 18 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +32 percentage points is the difference between those two pass rates over the 18 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.