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.
npx skills add https://github.com/majiayu000/spellbook --skill agentsmd-scaffold
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:
python3 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:
## 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.Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take majiayu000/agentsmd-scaffold from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.