Designs, audits, and evolves a repository as a coding agent's working environment with AGENTS.md routing, durable knowledge, guardrails, verification surfaces, and security boundaries.
Ships in agentic-scaffolding. 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.
Design the repository as the agent's working environment: durable knowledge, executable constraints, inspectable systems, safe capabilities, and feedback loops. The correct scaffold is project-specific. Derive it from the user's workflow and failure modes; never impose a universal directory tree.
README.md files and use scoped AGENTS.md files for agent-facing guidance. Reserve READMEs for public projects with outside human consumers.Do not design from generic best practices alone. Use references/discovery.md to resolve the material choices. Ask only questions whose answers change the architecture; inspect the repository first when it can answer them.
At minimum establish:
If material uncertainty remains, present 2–3 viable architectures with explicit tradeoffs and ask the user to choose. Otherwise select the smallest adequate design and state the assumptions.
Read references/architecture.md, then choose only the layers the project needs.
Unless the repository already has a well-established equivalent, create a root agentic-scaffolding/ directory as the durable home for deeper agent-facing material. Keep the root AGENTS.md concise and link from it to agentic-scaffolding/AGENTS.md; do not copy deeper material into the always-loaded file.
Use agentic-scaffolding/ for the project's scaffold index and the focused architecture, workflow, plan, reference, evaluation, and governance artifacts selected below. Keep runtime-discovered files in their required native locations—for example .agents/skills/—and link to them from the scaffold index rather than breaking tool conventions.
Before creating a file, choose its destination from the repository's declared layout, including files produced by other skills. Distinguish source, configuration, generated output, plans, retained research, temporary files, and credentials. Existing root clutter is not a placement convention. Keep retained research in the project's data location, such as data/.
Do not create agentic-scaffolding/scripts/ or agentic-scaffolding/temp/. Executable helpers belong in existing project tooling or a runtime-required native location. Put temporary files in the OS temporary directory ($TMPDIR or /tmp), never in the repository. This includes disposable screenshots, logs, downloads, and intermediate build output; tool-required generated outputs keep their required locations.
In a private product repository, default to a scoped AGENTS.md in each human-maintained directory. Each nested file should state only that directory's local commands, boundaries, ownership, conventions, and routes while inheriting parent guidance; never copy the full parent file. Omit generated, vendored, build-output, and purely organizational directories, and omit any file that would contain no local contract. Public projects may use READMEs for external onboarding, but agent-operational guidance still belongs in AGENTS.md.
The root AGENTS.md should identify agentic-scaffolding/AGENTS.md as the canonical deeper index, route agents to relevant files, and contain only the rules and triggers that must always load.
Unless an established framework or repository convention requires otherwise, place first-party application and library code under src/, grouped immediately below it by coherent system or component rather than by incidental file type. Keep configuration, generated output, vendored code, migrations, and tool-required entry points in their native locations. Each meaningful src/<system-or-component>/ boundary should have scoped AGENTS.md guidance when it has local rules.
Treat this layout as an executable architecture invariant. Prefer GritQL for structural and dependency rules and Biome for supported lint, format, and import rules. If neither cleanly expresses path placement, add the smallest repository-owned structural check rather than forcing the wrong tool.
Run the canonical architecture, GritQL, and Biome checks from a blocking pre-push hook and from CI. The root AGENTS.md must name the exact command and state: never use --no-verify, disable or edit around the hook, suppress failures, or push while the check is unavailable. Fix violations; if the hook or its dependencies cannot run, stop and report the blocker. CI must run the same command because a local Git hook alone is not an enforceable trust boundary.
Use AGENTS.md, CLAUDE.md, or the agent's native equivalent for rules that must be present every session:
Keep it compact. Prefer a map to an encyclopedia. Generic repository summaries often add cost without improving outcomes; persistent context earns its place by routing retrieval or preventing a costly mistake.
Store durable knowledge in focused, owned files:
Give each source a clear owner and freshness signal. Keep current decisions and operational facts in one canonical source; plans, tickets, and other guidance link to it rather than copy values that can drift.
Create a skill when a workflow is repeatable, task-specific, too detailed for persistent instructions, and has a concrete output. Each skill needs:
Critical skills need an explicit persistent if/then trigger. Availability alone does not guarantee invocation.
Split judgment from mechanics:
Custom error messages should tell an agent how to repair the violation. Enforce invariants centrally; allow implementation freedom locally.
Agents need direct, scoped access to the evidence humans use:
Expose the smallest sufficient interface. Start with files and standard tools when they preserve structure and remain inspectable; add typed tools for permissioned capabilities, stable service boundaries, or dangerous operations.
For external account or OAuth setup, establish the agent's host and the machine/browser the user can actually see. Use the user's normal browser for provider sign-in. Provide the account/project ID, client type, exact origin and callback where applicable, and private credential destination together. Resolve known values from context before asking. Inspect non-secret credential metadata before activation and verify a real sign-in afterward.
For work that crosses sessions, preserve state outside the context window:
For concurrent autonomous work, use one isolated workspace per task and a durable control plane such as the issue tracker. Model dependencies explicitly. Prefer objectives and observable handoff states over a rigid sequence of model micro-steps.
Map these actors separately: trusted harness, model-driven agent, credentials, generated code, filesystem/environment, network destinations, and external content.
Default controls:
A shared sandbox protects the host but does not protect harness credentials from generated code inside that sandbox. For sensitive workloads, separate harness compute from execution compute.
Define proof before increasing autonomy:
Build evals from real failures and unseen fixtures. Measure separately:
Always compare against a baseline without the scaffold. Do not interpret compliance as task success.
When an agent fails, classify the missing capability before changing prompts:
Promote evidence into the narrowest durable artifact: canonical doc, skill, exemplar, linter, eval, or coverage-gap record. Require human acceptance for changes that encode organizational taste or policy.
Before relocating files, identify their code, build, documentation, and ticket consumers. Update their references with the move, run the affected workflow, and compare output when behavior should stay unchanged. Read back edited ticket links to confirm their saved destination.
Read references/decision-guide.md when choosing among patterns. Defaults:
AGENTS.md files over READMEs; READMEs only when external human consumers need public onboarding.src/, grouped by system or component; GritQL/Biome plus the smallest necessary structural check enforce the boundary.AGENTS.md forbids --no-verify, hook bypass, suppression, or pushing when the check cannot run.Return a project-specific scaffold proposal or implementation with:
For implementation requests, make the smallest coherent end-to-end change and verify it. For audit or design requests, do not edit unless asked.
AGENTS.md files would provide inherited, enforceable agent guidance.See references/sources.md for primary engineering posts, public repository examples, and empirical studies behind these patterns.
What SKILL.md sets; muted values are Claude Code's defaults
/agentic-scaffolding:agentic-scaffoldingfrom agentic-scaffolding
npx claudepluginhub ratacat/ratacats-skills --plugin agentic-scaffoldingOther plugins' skills for the same job