Agent skill

AGENTS.md Scaffold

by majiayu000 in majiayu000/spellbook

Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

MITAuto-check passedAgent Workflows

Install AGENTS.md Scaffold

skills CLI
$ npx skills add majiayu000/spellbook --skill agentsmd-scaffold -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/spellbook agentsmd-scaffold --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agentsmd-scaffold .claude/skills/agentsmd-scaffold && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agentsmd-scaffold
GitHub stars
287
Token cost
~1.5k tokens
SKILL.md length
674 words
Files
4 (incl. scripts, references)
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

  • Works in 4 steps: Discover Existing Context → Choose The Instruction Stack → Produce A Candidate Plan → …
  • Creating a root AGENTS.md for a repository that has none
  • SKILL.md covers Operating Contract, Workflow, Decision Gates and Gotchas, plus 2 more sections
  • Runs Python scripts from its folder; calls python3

What it does

The result is a plan by default, exact proposed file contents on request, and applied files only when you explicitly ask for them to be written. The agent runs scripts/scan_repo_context.py, then reads existing AGENTS.md, CLAUDE.md, WARP.md and Copilot instructions along with the README, CONTRIBUTING, manifests, Makefiles, CI workflows, generated files and risky areas such as migrations, auth, secrets and payments.

It picks the smallest instruction stack that changes agent behavior: a root file for repo-wide routing and validation, and nested files only where a directory's rules differ. Guessed commands, ownership or generated-file rules are challenged unless the repo supports them, existing files get short pointers instead of rewrites, and batch changes across several repositories need your confirmation. A reference file and an evals file support the workflow, and a separate audit skill answers whether current agent context is healthy.

When your agent uses it

  • Creating a root AGENTS.md for a repository that has none
  • Splitting instructions into scoped files for directories with different rules
  • Improving an AGENTS.md so it lists real validation commands and generated-file boundaries

Example prompts

  • “Scan this repo and propose an AGENTS.md plan, but don't write any files yet.”
  • “Add a scoped AGENTS.md for the migrations folder with the commands that actually work here.”
  • “Trim our root AGENTS.md into a short router and move package-specific rules into nested files.”

Requirements

  • python3 to run the repository scanner

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Discover Existing Context
  2. Choose The Instruction Stack
  3. Produce A Candidate Plan
  4. Scaffold On Request

What it can do on your machine

Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AGENTS.md Scaffold loads about 1.5k tokens when it runs, and up to ~2.9k if it reads all its reference files. Until then it costs about 94 tokens; SKILL.md has 674 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 674 words, ~1,518 tokens.

Download SKILL.mdSave it as .claude/skills/agentsmd-scaffold/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
agentsmd-scaffold
description
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.

AGENTS.md 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.

Operating Contract

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:

  • Run read-only discovery, scanner commands, and repo command inspection.
  • Produce a scoped AGENTS.md plan with evidence and validation commands.
  • Draft exact file contents when the user asks for proposed text.

Escalate before:

  • Creating or editing high-context files when the user only asked for an audit.
  • Rewriting existing AGENTS.md, CLAUDE.md, or WARP.md instead of adding a short pointer or scoped complement.
  • Batch-normalizing multiple repositories.

Evidence-backed pushback:

  • Challenge new scoped files when the directory has no distinct local rules.
  • Challenge guessed commands, ownership, or generated-file rules unless repo evidence supports them.

Feedback loop:

  • Promote repeated false starts into references/scaffold-agents.md, scanner signals, or eval prompts.

Workflow

1. Discover Existing Context

Run the scanner from this skill directory when possible:

bash
python3 scripts/scan_repo_context.py <repo-root>
python3 scripts/scan_repo_context.py <repo-root> --json

Then inspect the files that matter:

  • existing 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
  • generated files and their generators
  • high-risk directories such as migrations, deploy scripts, auth, secrets, 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.

2. Choose The Instruction Stack

Read references/scaffold-agents.md before proposing files. Choose the smallest stack that changes agent behavior:

  • root AGENTS.md for repo-wide routing and validation
  • nested AGENTS.md only where directory rules differ from root
  • no nested file for directories that only need ordinary README context
  • no bulk normalization across multiple repos until a few examples have been manually validated
3. Produce A Candidate Plan

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>
4. Scaffold On Request

When applying the scaffold:

  • keep root files short, normally 80-150 lines
  • keep nested files focused on that directory's ownership, source-of-truth rules, and validation commands
  • include real commands and paths, not placeholders, unless the fact is truly missing
  • preserve existing high-context files unless the user requested a rewrite
  • pair every prohibition with a concrete alternative, helper, generator, or command
Show full SKILL.md (273 more words)Show less

Decision Gates

SituationAction
Existing CLAUDE.md or WARP.md is already a good routerAdd a short AGENTS.md pointer only if cross-runtime routing helps.
Root instruction file exceeds roughly 200 linesPropose root router plus scoped files or references.
Directory has generated outputsAdd scoped rules naming source of truth and regenerate/check commands.
Directory has distinct safety rulesAdd scoped rules with escalation boundaries.
Directory has ordinary implementation files onlyKeep guidance in root unless conventions differ.
Commands cannot be verified from repo evidenceLeave an open fact instead of guessing.

Gotchas

  • Do not add nested AGENTS.md files for every directory. Add them only where local rules differ from root.
  • Do not guess build, test, lint, or generator commands from framework names. Cite the manifest, CI workflow, script, or docs that prove the command.
  • Do not overwrite an existing CLAUDE.md, WARP.md, or AGENTS.md just to normalize naming. Preserve it, point to it, or propose a split first.
  • Do not put long architecture explanations in root AGENTS.md; route to references or existing docs instead.

Verification

After applying changes:

  • run the repo's narrow validation command for the affected scope
  • run any repo-wide registry, docs, typecheck, lint, or test command named in the new instructions when practical
  • rerun python3 scripts/scan_repo_context.py <repo-root> if using the bundled scanner to confirm scoped files are discoverable

If verification cannot run, report the exact missing precondition and the command that should be run later.

Resources

  • 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 for root, generated metadata, scripts/tools, skill libraries, and tests.
  • evals/evals.json: lightweight prompts for future behavior checks.

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/agentsmd-scaffold of majiayu000/spellbook.

  • SKILL.md
  • evals/evals.json
  • references/scaffold-agents.md
  • scripts/scan_repo_context.py

Open the folder on GitHubat commit ed52af7

Compare with similar skills

AGENTS.md Scaffold next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AGENTS.md Scaffold compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AGENTS.md Scaffold this skillmajiayu000/spellbook287—~1.5kAutomated safety check: PassMIT
Intent Layercrafter-station/skills1121 repos~633Automated safety check: PassMIT
AI Bomcdxgen/cdxgen1.1k—~2.5kAutomated safety check: PassApache-2.0
AI Context Workspace Initkvker/ai-context-workspace101—~948Automated safety check: PassMIT
Add Remote Endpointnextcloud/android-library106—~1.1kAutomated safety check: PassCustom licence
Scaffold Clauderagnar-pwninskjold/tech-snacks137—~1.7kAutomated safety check: PassMIT

Similar skills

  • Intent Layer

    crafter-station/skills

    Set up hierarchical Intent Layer (AGENTS.md files) for codebases.

    112 GitHub starsUsed in 1 repo~633 tokens
    Agent WorkflowsAuto-check passed
  • AI Bom

    cdxgen/cdxgen

    Generates AI-BOM, MCP inventory, AI skill inventory, and AI authorship provenance documents with cdxgen, cataloging models, inference services, Hugging Face purls, MCP servers and their…

    1.1k GitHub stars~2.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • AI Context Workspace Init

    kvker/ai-context-workspace

    Turns existing work units or an empty directory into an AI Context Workspace by scanning materials, generating background and conventions, and installing runtime skills.

    101 GitHub stars~948 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Add Remote Endpoint

    nextcloud/android-library

    A skill your agent uses when adding a new remote/network endpoint (a RemoteOperation / OCSRemoteOperation) to this Nextcloud Android library, or when the user says "add an endpoint", "new remote…

    106 GitHub stars~1.1k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Scaffold Claude

    ragnar-pwninskjold/tech-snacks

    A skill your agent uses when the user wants to create, draft, or scaffold a CLAUDE.md (or AGENTS.md) file for their project.

    137 GitHub stars~1.7k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Harness Init

    k1ein-chen/Harness-Starter

    Initialize this project with the Harness Engineering starter template.

    119 GitHub stars~995 tokensUpdated 17 days ago
    Agent WorkflowsAuto-check: notes

More from majiayu000/spellbook

All 97 skills in this repo
  • Skill Ecosystem Doctor

    majiayu000/spellbook

    Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

    287 GitHub stars~3k tokensUpdated 2 days ago
    Auto-check passed
  • Product Demo Builder

    majiayu000/spellbook

    Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.

    287 GitHub stars~3.3k tokensUpdated 2 days ago
    Auto-check passed
  • Flowguard Task Guard

    majiayu000/spellbook

    Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.

    287 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • npm Supply Chain Check

    majiayu000/spellbook

    Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.

    287 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Product Manager Toolkit

    majiayu000/spellbook

    Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.

    287 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Repo Agent Context Audit

    majiayu000/spellbook

    Audits a repository's agent-readable context, from AGENTS.md and CLAUDE.md to skills and PRODUCT or TECH specs, and recommends the smallest useful improvements.

    287 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about AGENTS.md Scaffold

What does AGENTS.md Scaffold do?

Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries. The result is a plan by default, exact proposed file contents on request, and applied files only when you explicitly ask for them to be written.md and Copilot instructions along with the README, CONTRIBUTING, manifests, Makefiles, CI workflows, generated files and risky areas such as migrations, auth, secrets and payments.

When should I use AGENTS.md Scaffold?

AGENTS.md Scaffold fits situations like: creating a root AGENTS.md for a repository that has none; splitting instructions into scoped files for directories with different rules; improving an AGENTS.md so it lists real validation commands and generated-file boundaries.

How do I install AGENTS.md Scaffold in Claude Code?

Run `npx skills add majiayu000/spellbook --skill agentsmd-scaffold -a claude-code`. Or copy the skill folder (skills/agentsmd-scaffold in majiayu000/spellbook) into .claude/skills/agentsmd-scaffold in your project. Claude Code loads it when a task matches its description.

How do I install AGENTS.md Scaffold in Codex?

Run `npx skills add majiayu000/spellbook --skill agentsmd-scaffold -a codex`. Or copy the skill folder (skills/agentsmd-scaffold in majiayu000/spellbook) into .agents/skills/agentsmd-scaffold in your project. Codex loads it when a task matches its description.

Can I use AGENTS.md Scaffold in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill agentsmd-scaffold -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agentsmd-scaffold, .gemini/skills/agentsmd-scaffold, .github/skills/agentsmd-scaffold and .opencode/skills/agentsmd-scaffold in your project.

What does AGENTS.md Scaffold need to run?

Going by SKILL.md and its folder, AGENTS.md Scaffold needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: python3 to run the repository scanner.

Does AGENTS.md Scaffold access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is AGENTS.md Scaffold safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does AGENTS.md Scaffold use?

AGENTS.md Scaffold is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AGENTS.md Scaffold use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to AGENTS.md Scaffold?

Skills that share tags, products or a category with AGENTS.md Scaffold: Intent Layer (crafter-station/skills, 112 stars), AI Bom (cdxgen/cdxgen, 1.1k stars), AI Context Workspace Init (kvker/ai-context-workspace, 101 stars) and Add Remote Endpoint (nextcloud/android-library, 106 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AGENTS.md Scaffold?

majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.

Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.