sw-auto

sw-auto is a skill for Claude Code from anton-abyzov/specweave. It costs 36 tokens per session (589 once invoked), scanned A, original, MIT.

An unattended process that repeatedly claims, implements, tests and records tasks in a SpecWeave increment until the work is finished or blocked. It can then verify and close the increment.

In plain words
What is it for?
Use it for an increment with a complete specification when you want the agent to continue through the remaining tasks without asking between turns.
Why use it?
Manual agent runs stop between turns and may leave tasks unclaimed or incomplete. This process keeps the task loop going while still requiring tests, task claims and verification, and it stops when a task needs outside input.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Claude Code.

Good fit Use it for an increment with a complete specification when you want the agent to continue through the remaining tasks without asking between turns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anton-abyzov/specweave/sw-auto
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 anton-abyzov/specweave --skill sw-auto
Clone the repo
git clone --depth 1 https://github.com/anton-abyzov/specweave

Made for: Claude Code.

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 sw-auto

README.md
[![agentmods](https://agentmods.dev/badge/skills/anton-abyzov/specweave/sw-auto/github.svg)](https://agentmods.dev/skills/anton-abyzov/specweave/sw-auto)
Your own site
<a href="https://agentmods.dev/skills/anton-abyzov/specweave/sw-auto"><img src="https://agentmods.dev/badge/skills/anton-abyzov/specweave/sw-auto/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 sw-auto

Your own site · 80×15
<a href="https://agentmods.dev/skills/anton-abyzov/specweave/sw-auto"><img src="https://agentmods.dev/badge/skills/anton-abyzov/specweave/sw-auto.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 589 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.00036 $0.00589
Opus 5.5 $0.00014 $0.00236
Sonnet 5.5 $0.00007 $0.00118
Haiku 4.5 $0.00004 $0.00059

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

Security

Grade A, and why

sw-auto 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 20d 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/sw-auto/SKILL.md · 48 lines

What it actually says

sw-auto: run until done

Auto mode is the sw-do loop without stopping to ask. The bar does not drop: claim before editing, a passing test for every done, verify before closing.

Start

  1. The spec has no open questions and every task has Files and a Test. If not, fix the spec first.
  2. specweave auto 0042 records the session (--dry-run previews it, --reset clears stale state). In a tool that runs SpecWeave's Stop hook (Claude Code with the sw plugin) the hook hands you the remaining work after every turn until nothing is left. In any other tool, nothing feeds you back: keep looping yourself.
  3. specweave auto-status shows progress; specweave cancel-auto stops it.

Each turn

  1. specweave task next → specweave task claim T-NN → implement inside its Files → commit 0042: ... → specweave task done T-NN --run "<Test>".
  2. A failing test is fixed in the next turn, never marked done.
  3. Genuinely blocked (missing secret, ambiguous spec, external dependency): specweave task block T-NN --reason "<what is missing>" and move on. Blocked tasks still count as work left: when only blocked tasks remain, run specweave cancel-auto and tell the user what each one needs, instead of looping until the turn limit.
  4. Nothing claimable left: run sw-done (verify, review, complete).

Running out of budget

Before the session ends for tokens or time: specweave handoff --reason "auto: out of tokens". The next session, in any tool or account, says "pick up" and continues.

Manual path (no CLI)

Without the CLI there is no hook and no session file: follow the manual path of sw-do in a loop until every task in spec.md has a done or skip line, then sw-done.

Rules

  • Never edit .specweave/state/auto-mode.json by hand; specweave auto --reset clears it.
  • One auto session per project; check specweave auto-status before starting another.
  • Never widen a task's Files or weaken a test to keep the loop moving.
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. 20d ago First seen · 48 lines · 36 tokens per session scan A be39e2abaa3a

Subscribe to this mod's changes

sw-auto is a skill published in the GitHub repository anton-abyzov/specweave (165 stars, last pushed today), licensed MIT. It adds 36 tokens to every session and 589 once invoked, about $0.0001 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-09-26.