Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate or update repository-specific AGENTS.md instruction files from real repo evidence. Use when asked to create, design, scaffold, split, or improve root or scoped AGENTS.md files for Codex/Claude/agent workflows, especially when a repo needs directory-specific rules, validation commands, generated-file boundaries, or a short agent onboarding router.
.claude/skills/majiayu000-agentsmd-scaffold/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 32% | 0% |
Use this skill to generate a small, evidence-backed AGENTS.md stack for a repository. The output may be a plan, exact proposed file contents, or applied files when the user explicitly asks to write them.
This skill is for instruction scaffolding. Use repo-agent-context-audit first when the user only asks whether the repo's agent context is healthy.
Default to a scoped plan before editing. Only write or modify AGENTS.md, CLAUDE.md, WARP.md, hooks, settings, or generated docs when the user has explicitly asked to apply the scaffold.
Direct actions:
AGENTS.md plan with evidence and validation commands.Escalate before:
AGENTS.md, CLAUDE.md, or WARP.md instead of adding ashort pointer or scoped complement.
Evidence-backed pushback:
evidence supports them.
Feedback loop:
references/scaffold-agents.md, scannersignals, or eval prompts.
Run the scanner from this skill directory when possible:
bashpython3 scripts/scan_repo_context.py <repo-root> python3 scripts/scan_repo_context.py <repo-root> --json
Then inspect the files that matter:
AGENTS.md, CLAUDE.md, WARP.md, .claude/instructions.md, and.github/copilot-instructions.md
README.md, CONTRIBUTING.md, package manifests, Makefiles, CI workflows,and documented test commands
payments, registry metadata, generated clients, and production operations
Do not infer commands or ownership from names alone. Use scanner output as a lead, then verify with actual files.
Read references/scaffold-agents.md before proposing files. Choose the smallest stack that changes agent behavior:
AGENTS.md for repo-wide routing and validationAGENTS.md only where directory rules differ from rootmanually validated
Before editing, report:
markdown## Scoped AGENTS Plan | Path | Why here | Rules to include | Validation | |---|---|---|---| | `AGENTS.md` | <repo evidence> | <root topics> | `<command>` | | `<dir>/AGENTS.md` | <repo evidence> | <scoped topics> | `<command>` | ## Files To Preserve - `<existing high-context file>` - <how it will be referenced or left alone> ## Open Facts - <missing command or ownership fact that cannot be inferred>
When applying the scaffold:
rules, and validation commands
missing
command
| Situation | Action | |---|---| | Existing CLAUDE.md or WARP.md is already a good router | Add a short AGENTS.md pointer only if cross-runtime routing helps. | | Root instruction file exceeds roughly 200 lines | Propose root router plus scoped files or references. | | Directory has generated outputs | Add scoped rules naming source of truth and regenerate/check commands. | | Directory has distinct safety rules | Add scoped rules with escalation boundaries. | | Directory has ordinary implementation files only | Keep guidance in root unless conventions differ. | | Commands cannot be verified from repo evidence | Leave an open fact instead of guessing. |
AGENTS.md files for every directory. Add them only wherelocal rules differ from root.
Cite the manifest, CI workflow, script, or docs that prove the command.
CLAUDE.md, WARP.md, or AGENTS.md just tonormalize naming. Preserve it, point to it, or propose a split first.
AGENTS.md; route toreferences or existing docs instead.
After applying changes:
the new instructions when practical
python3 scripts/scan_repo_context.py <repo-root> if using the bundledscanner to confirm scoped files are discoverable
If verification cannot run, report the exact missing precondition and the command that should be run later.
scripts/scan_repo_context.py: read-only scanner for high-context files,command hints, specs, local skills, and scoped AGENTS.md candidates.
references/scaffold-agents.md: scaffold selection rules and templates forroot, generated metadata, scripts/tools, skill libraries, and tests.
evals/evals.json: lightweight prompts for future behavior checks.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 2,507 | 10,784 | +330% | 1 | 1 | 0% | 353 | 1,615 | +358% | 0 | 0 | — |
case-02 | fail→fail | 10,509 | 5,147 | -51% | 1 | 1 | 0% | 1,722 | 1,712 | -1% | 0 | 0 | — |
case-03 | fail→fail | 4,473 | 5,936 | +33% | 1 | 1 | 0% | 170 | 1,669 | +882% | 0 | 0 | — |
case-04 | fail→fail | 7,441 | 5,826 | -22% | 1 | 1 | 0% | 1,137 | 1,682 | +48% | 0 | 0 | — |
case-05 | fail→fail | 4,439 | 5,802 | +31% | 1 | 1 | 0% | 164 | 1,581 | +864% | 0 | 0 | — |
case-06 | pass→fail | 12,711 | 6,422 | -49% | 1 | 1 | 0% | 2,120 | 1,735 | -18% | 0 | 0 | — |
case-07 | fail→pass | 9,994 | 3,393 | -66% | 1 | 1 | 0% | 1,669 | 1,942 | +16% | 0 | 0 | — |
case-08 | fail→pass | 9,350 | 6,150 | -34% | 1 | 1 | 0% | 1,558 | 2,375 | +52% | 0 | 0 | — |
case-09 | pass→pass | 69,963 | 6,320 | -91% | 1 | 1 | 0% | 1,505 | 2,413 | +60% | 0 | 0 | — |
case-10 | fail→pass | 11,283 | 9,412 | -17% | 1 | 1 | 0% | 1,958 | 2,870 | +47% | 0 | 0 | — |
case-11 | pass→pass | 11,269 | 7,429 | -34% | 1 | 1 | 0% | 1,675 | 2,590 | +55% | 0 | 0 | — |
case-12 | pass→pass | 12,496 | 8,566 | -31% | 1 | 1 | 0% | 1,910 | 2,819 | +48% | 0 | 0 | — |
case-13 | pass→pass | 11,642 | 5,973 | -49% | 1 | 1 | 0% | 1,926 | 2,491 | +29% | 0 | 0 | — |
case-14 | fail→pass | 18,221 | 2,519 | -86% | 1 | 1 | 0% | 1,516 | 1,773 | +17% | 0 | 0 | — |
case-15 | fail→pass | 11,599 | 6,247 | -46% | 1 | 1 | 0% | 1,784 | 2,354 | +32% | 0 | 0 | — |
case-16 | pass→pass | 11,435 | 7,152 | -37% | 1 | 1 | 0% | 1,665 | 2,516 | +51% | 0 | 0 | — |
case-17 | pass→pass | 7,010 | 5,975 | -15% | 1 | 1 | 0% | 1,138 | 2,418 | +112% | 0 | 0 | — |
case-18 | fail→fail | 3,218 | 3,296 | +2% | 1 | 1 | 0% | 468 | 1,920 | +310% | 0 | 0 | — |
case-19 | pass→pass | 10,193 | 5,519 | -46% | 1 | 1 | 0% | 1,538 | 2,117 | +38% | 0 | 0 | — |
case-20 | pass→pass | 8,666 | 6,908 | -20% | 1 | 1 | 0% | 1,366 | 2,538 | +86% | 0 | 0 | — |
case-21 | pass→pass | 14,813 | 13,015 | -12% | 1 | 1 | 0% | 2,438 | 3,543 | +45% | 0 | 0 | — |
case-22 | fail→pass | 7,501 | 1,801 | -76% | 1 | 1 | 0% | 971 | 1,592 | +64% | 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 16 counted toward the lift figure. The other 6 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 +23 percentage points is the difference between those two pass rates over the 16 comparable cases. 3 cases got worse with the skill loaded, and they are 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.