agent-scaffolder

agent-scaffolder is a skill for Claude Code, Codex from xuanhieu2611/build-your-own-agents-skill. It costs 41 tokens per session (1,337 once invoked), scanned A, original, MIT.

A generator that turns an Agent Build Spec into a runnable Python project. An Agent Build Spec describes an agent's goal, tools, session data, permissions, and control loop.

In plain words
What is it for?
Creating starter files for an agent controller, tool stubs, session state, permission checks, structured logging, and a command-line entry point.
Why use it?
It gives the specification a working project structure instead of leaving the agent design as documentation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Creating starter files for an agent controller, tool stubs, session state, permission checks, structured logging, and a command-line entry point.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xuanhieu2611/build-your-own-agents-skill/agent-scaffolder
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xuanhieu2611/build-your-own-agents-skill --skill agent-scaffolder
Clone the repo
git clone --depth 1 https://github.com/xuanhieu2611/build-your-own-agents-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-scaffolder

README.md
[![agentmods](https://agentmods.dev/badge/skills/xuanhieu2611/build-your-own-agents-skill/agent-scaffolder/github.svg)](https://agentmods.dev/skills/xuanhieu2611/build-your-own-agents-skill/agent-scaffolder)
Your own site
<a href="https://agentmods.dev/skills/xuanhieu2611/build-your-own-agents-skill/agent-scaffolder"><img src="https://agentmods.dev/badge/skills/xuanhieu2611/build-your-own-agents-skill/agent-scaffolder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-scaffolder

Your own site · 80×15
<a href="https://agentmods.dev/skills/xuanhieu2611/build-your-own-agents-skill/agent-scaffolder"><img src="https://agentmods.dev/badge/skills/xuanhieu2611/build-your-own-agents-skill/agent-scaffolder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,337 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01337
Opus 5.5 $0.00016 $0.00535
Sonnet 5.5 $0.00008 $0.00267
Haiku 4.5 $0.00004 $0.00134

Measured 1mo ago against content hash 32fd77dae6b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-scaffolder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agent-scaffolder/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Scaffolder

When To Use This Skill

Use this skill when:

  • You have an Agent Build Spec (from the production agent architecture skill or written by hand).
  • You want to turn that spec into a runnable Python project, not just documentation.
  • You want a starting point that already has the right architecture: loop, tools, permissions, state, logging.

Prerequisites

The input should be an Agent Build Spec with at least these sections:

  • Domain and user goal
  • Tools (names and descriptions)
  • Session state (fields)
  • Permissions and approvals (which tools are auto-allow, ask-first, deny)
  • Controller loop (steps)

Output Structure

Generate a Python project with this layout:

your-agent/
  src/
    __init__.py
    agent.py          # Controller loop
    tools.py          # Tool contracts and executor stubs
    state.py          # Session state dataclass
    permissions.py    # Runtime permission policy
    observability.py  # Structured JSON logging
    main.py           # CLI entry point
  requirements.txt
  README.md

File-By-File Instructions

src/state.py

Define a SessionState dataclass with:

  • Every field from the spec's "Session state" section, typed appropriately.
  • A session_id field (auto-generated UUID).
  • A turn_count integer.
  • A tool_history list for recording every tool call.
  • A completed boolean and failure_reason optional string.
  • Token tracking: total_input_tokens and total_output_tokens.
  • A record_tool_call() method and a summary() method.

Use dataclasses.dataclass with field(default_factory=...) for mutable defaults.

src/tools.py

For each tool in the spec:

  1. Define a tool contract dict with: name, description, input_schema (JSON Schema), permission (from the spec), timeout_seconds, and side_effects.
  2. Define a mock executor function _exec_{tool_name}(inp: dict) -> dict that returns realistic placeholder data.
  3. Collect all contracts in a TOOL_CONTRACTS list.
  4. Provide a _anthropic_tools() function that converts contracts to Anthropic API format.
  5. Provide an execute_tool(tool_name, raw_input) -> (json_result, latency_ms) function.

Read the full file on GitHub · 146 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 146 lines · 41 tokens per session scan A 32fd77dae6b7

Subscribe to this mod's changes

agent-scaffolder is a skill published in the GitHub repository xuanhieu2611/build-your-own-agents-skill (23 stars, last pushed 6mo ago), licensed MIT. It adds 41 tokens to every session and 1,337 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

istio-traffic-management

Configure Istio traffic management including routing, load balancing, circuit breakers, and canary deployments. Use when implementing service mesh traffic policies, progressive delivery, or resilience patterns.

wshobson/agents · 40 tokens

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

workflow-orchestration-patterns

Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.

wshobson/agents · 49 tokens

explain-for

Explain a topic, code, error or design decision for one named audience (a 5-year-old, a manager, a designer, a grad student, a parent). Resolves who it is for, pins the ground truth first, then tunes vocabulary, analogy, tone and depth to that audience. Use when an audience is named.

kirodotdev/KiroCrew · 71 tokens

papyrus-latex-suggestions

Propose inline replacement text (old -> new) as accept/reject suggestions, LaTeX 'suggesting mode' / track changes, rendered in the PDF. Use when the author wants concrete edit proposals to accept or reject. For remarks ABOUT the text rather than replacements, use papyrus-latex-comments.

kirodotdev/KiroCrew · 69 tokens