spec-loop

spec-loop is a skill for Claude Code from martinffx/atelier. It costs 66 tokens per session (1,196 once invoked), scanned A, original, MIT.

An automated workflow that follows an already approved software plan through implementation and creates a draft pull request. A pull request is a proposed code change for review before it is merged.

In plain words
What is it for?
Use it when a design and task plan are already approved and you want the work carried through in batches to a draft pull request. It commits each batch, pushes the branch and performs a final review.
Why use it?
It removes the need to manually coordinate repeated implementation, review, testing, commits and final branch review for a prepared plan. It stops when the plan is missing, the working tree is dirty, tests fail, or authorization is not given.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Part of the atelier plugin — 16 skills shipped together

Good fit Use it when a design and task plan are already approved and you want the work carried through in batches to a draft pull request. It commits each batch, pushes the branch and performs a final review.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/martinffx/atelier/spec-loop
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 martinffx/atelier --skill spec-loop
Clone the repo
git clone --depth 1 https://github.com/martinffx/atelier

Made for: Claude Code.

Or install atelier, the plugin that ships this one along with the rest of its 16 skills.

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 spec-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/martinffx/atelier/spec-loop/github.svg)](https://agentmods.dev/skills/martinffx/atelier/spec-loop)
Your own site
<a href="https://agentmods.dev/skills/martinffx/atelier/spec-loop"><img src="https://agentmods.dev/badge/skills/martinffx/atelier/spec-loop/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 spec-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/martinffx/atelier/spec-loop"><img src="https://agentmods.dev/badge/skills/martinffx/atelier/spec-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,196 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.00066 $0.01196
Opus 5.5 $0.00026 $0.00478
Sonnet 5.5 $0.00013 $0.00239
Haiku 4.5 $0.00007 $0.00120

Measured yesterday against content hash aed084577361, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spec-loop 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 yesterday.

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/spec-loop/SKILL.md · 92 lines

How it starts

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

Spec Loop

Drive an approved Spec-backed Plan to a draft PR without stopping for the human. The main agent only drives; fresh subagents implement and review. Never run code-review rs in this loop.

Announce at start: "I'm using the spec-loop skill to run this plan to a draft PR."

This skill makes no design decisions. A finding or blocker that needs a plan change goes back to spec-plan; a design change goes back to spec-brainstorm.

Start

Runs on every invocation, including a resume.

  1. If design.md or plan.json is missing, stop and use spec-implement. Otherwise follow spec-implement Prerequisites and "Load and Review the Plan" while the human is present.
  2. Stop if the tree is dirty or the test suite is not green.
  3. Ask one authorization question naming each action. The answer is the explicit authorization code-commit and code-pull-request require.
    • commit after every batch and after the final fix
    • push to <remote>/<branch>, without force
    • open a draft PR with code-pull-request's Create flow
    • budget: at most N batches (plan task count / 3, rounded up, plus 1); stop when the same task or test fails twice
    • cost: one batch reviewer per batch plus one whole-branch debate review at the end (about 8-12 subagents)
    • excluded: merge, marking the PR ready, rewriting history

Resume

Progress lives in the tracker. After each batch commit, mark its tasks done as spec-implement does; on re-invocation the closed entries are the done tasks. With no tracker, say at Start that a stopped run cannot resume and that spec-implement can continue it by hand.

Loop

Repeat until every task is done or the budget runs out.

  1. Select up to 5 tasks in plan.json order whose depends_on are done or earlier in the same batch.
  2. Implement each task in its own fresh subagent, one at a time, using code-subagents Sequential mode and references/implementor-prompt.md. Set OWNED_FILES from the task's files. Select the agent per Delegation in atelier-orchestrator. Add these rules: do not stage, commit, push, or install anything the plan does not name; never add or edit review-decision: comments; never delete, skip, or weaken tests; return BLOCKED instead of asking a question.
  3. Gate. Run code-subagents Batch Review as written. Validate each task's tests, the full suite, lint, and type check. Stop if anything fails twice (see "When Subagents Fail").
  4. Commit with code-commit once the diff has no out-of-scope paths and no added review-decision: lines. Put the reviewer's Minor issues in the commit body. Then update the tracker.
  5. Report one line, for example Batch 2/5: T4, T7 done. Keep only condensed results in context. On BLOCKED, git stash push the blocked task's paths, give the stash ref in the report, and stop. Commit nothing from a partial batch.

Read the full file on GitHub · 92 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. yesterday First seen · 92 lines · 66 tokens per session scan A aed084577361

Subscribe to this mod's changes

spec-loop is a skill published in the GitHub repository martinffx/atelier (48 stars, last pushed 2d ago), licensed MIT. It adds 66 tokens to every session and 1,196 once invoked, about $0.0003 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-10-19.