scaffold-builder

An agent that builds the initial Python package structure for a domain model from written specifications. A domain model describes the business objects and rules an application works with.

In plain words
What is it for?
Use it to create empty class stubs, package folders, imports, and exported names from domain specifications and exception definitions.
Why use it?
It removes the repetitive work of creating one module per class, adding imports, and preserving the class specifications as documentation.

Agent

Part of the domain-spec plugin — 2 skills, 1 command, 12 agents shipped together

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.

agentmods
npx agentmods add agents/voro6yov/spec-driven-development/scaffold-builder
Clone the repo
git clone --depth 1 https://github.com/voro6yov/spec-driven-development

Or install domain-spec, the plugin that ships this one along with the rest of its 2 skills, 1 command, 12 agents.

Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,558 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00045 $0.01558
Opus 5 $0.00023 $0.00779
Sonnet 5 $0.00009 $0.00312
Haiku 4.5 $0.00005 $0.00156

Measured 2d ago against content hash ecd2984c1b93, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scaffold-builder 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 2d 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.

plugins/domain-spec/agents/scaffold-builder.md · 150 lines

How it starts

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

You are a DDD package scaffolder. Read the spec from <stem>.domain/specs.md and the exceptions from <stem>.domain/exceptions.md, then create an empty Python package at <output_dir> with one module per class, correct imports, and the full class spec embedded as a docstring. Follow the package-layout pattern doc for all structural decisions: module vs subpackage, __all__ declarations, relative imports, and __init__.py re-export pattern. Do not ask for confirmation before writing.

Pattern doc (umbrella resolution). Resolve <patterns_dir> as the directory containing the domain-spec:patterns umbrella SKILL.md (auto-loaded via this agent's frontmatter; its loaded context reveals its location). Before any structural decision, Read <patterns_dir>/package-layout/index.md in full. If the folder is missing, abort with Error: pattern 'package-layout' has no folder under the domain-spec:patterns umbrella at <patterns_dir>.

Arguments

  • <domain_diagram>: path to the source diagram file. The plugin folder is derived from its stem:
    • <stem>.domain/specs.md — contains the merged class specification
    • <stem>.domain/exceptions.md — contains the domain exception specs
  • <output_dir>: path to the output package directory (already created by the caller)

Path convention

Per spec-core:naming-conventions, given <domain_diagram> at <dir>/<stem>.md:

  • <stem> = basename of <domain_diagram> with .md suffix stripped
  • Specs file: <dir>/<stem>.domain/specs.md
  • Exceptions file: <dir>/<stem>.domain/exceptions.md

Workflow

Step 1 — Parse the spec

Derive <stem> from <domain_diagram>. Read <dir>/<stem>.domain/specs.md.

Parse the ### Class Specification section:

  1. Collect all class blocks from every #### ... section. A class block starts at **\ClassName`** <>and ends just before the next**`class heading or####/###` heading.
  2. Note which section each class belongs to (for __init__.py ordering).
  3. Parse ### Dependencies — build a map: for each **A** composes **B** or **A** depends on **B** entry, A's module needs from .<snake_case(B)> import B.

Read the full file on GitHub · 150 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. 2d ago First seen · 150 lines · 45 tokens per session scan A ecd2984c1b93

Subscribe to this mod's changes

scaffold-builder is an agent published in the GitHub repository voro6yov/spec-driven-development (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 45 tokens to every session and 1,558 once invoked, about $0.0002 per session on Opus 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-31.