sw-build

sw-build is a skill for Claude Code from Obsidian-Owl/specwright. It costs 31 tokens per session (2,186 once invoked), scanned A, original, MIT.

A test-driven implementation workflow for one unit of coding work. Test-driven development (TDD) means writing a failing test first, making it pass, and then improving the code without changing its behavior.

In plain words
What is it for?
Use it to write tests, implement the planned changes, refactor them, run integration and regression checks, and commit each completed task.
Why use it?
It breaks implementation into smaller verified steps and records progress after each task. This makes failures easier to locate and leaves the work ready for a separate verification stage.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code.

Good fit Use it to write tests, implement the planned changes, refactor them, run integration and regression checks, and commit each completed task.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/obsidian-owl/specwright/sw-build
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 Obsidian-Owl/specwright --skill sw-build
Clone the repo
git clone --depth 1 https://github.com/Obsidian-Owl/specwright

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-build

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/obsidian-owl/specwright/sw-build"><img src="https://agentmods.dev/badge/skills/obsidian-owl/specwright/sw-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,186 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.00031 $0.02186
Opus 5.5 $0.00012 $0.00874
Sonnet 5.5 $0.00006 $0.00437
Haiku 4.5 $0.00003 $0.00219

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

Security

Grade A, and why

sw-build 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 3mo 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.

core/skills/sw-build/SKILL.md · 116 lines

How it starts

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

Specwright Build

Goal

Implement the current work unit with TDD. The per-task loop is RED → GREEN → REFACTOR; end-of-unit integration and regression checks live in one optional after-build phase.

Inputs

  • {worktreeStateRoot}/session.json -- selected work for this worktree
  • {repoStateRoot}/work/{selectedWork.id}/workflow.json, {workDir}/spec.md, {workDir}/plan.md
  • {workArtifactsRoot}/{selectedWork.id}/design.md, {workDir}/context.md
  • {workArtifactsRoot}/{selectedWork.id}/approvals.md -- durable design and unit approval ledger when present
  • {projectArtifactsRoot}/CONSTITUTION.md, {projectArtifactsRoot}/config.json

Outputs

  • After each task: failing tests, passing implementation, task commit, workflow progress, updated {workDir}/implementation-rationale.md, refreshed {repoStateRoot}/work/{selectedWork.id}/units/{selectedWork.unitId}/stage-report.md
  • After all tasks: as-built notes in plan.md, three-line handoff to /sw-verify, ready-to-verify build state; the handoff points at Artifacts: {repoStateRoot}/work/{selectedWork.id}/units/{selectedWork.unitId}/stage-report.md

Constraints

Execution model (LOW freedom): Run in the foreground in the current turn. "Autonomous" means unattended decisions inside this build, not background execution.

Stage boundary (LOW freedom): Follow protocols/stage-boundary.md. Implement only the active unit; never create pull requests, run gh pr create, or invoke /sw-ship. Before the terminal handoff, write {repoStateRoot}/work/{selectedWork.id}/units/{selectedWork.unitId}/stage-report.md; the handoff points at it and the Next line is Next: /sw-verify.

Branch setup (LOW freedom): First action before coding: resolve the session-selected work from the current worktree, verify that no other live top-level worktree owns it, then check out the feature branch from config.git.branchPrefix and sync it per protocols/git.md. The selected work's recorded targetRef, when present, is the first branch-resolution input via protocols/git.md; repo config defaults and the baseBranch compatibility alias are fallbacks only. Use {git.branchPrefix}{selectedWork.unitId} for multi-unit work and never commit to the base branch. If the selected work is already owned elsewhere, STOP with explicit /sw-adopt guidance instead of mutating it silently; do not fall back to implicit adopt/takeover behavior.

Read the full file on GitHub · 116 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. 3mo ago First seen · 116 lines · 31 tokens per session scan A c8e4b67ecc4a

Subscribe to this mod's changes

sw-build is a skill published in the GitHub repository Obsidian-Owl/specwright (10 stars, last pushed 7mo ago), licensed MIT. It adds 31 tokens to every session and 2,186 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-08-31.

Related

sw-build compared with skills from other repositories

sw-build next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sw-buildObsidian-Owl/specwrightSkill107mo agoMITA31Claude Code
testing-principlesshinpr/claude-code-workflowsSkill725yesterdayMITA49Claude Code
plangreglas75/zuvoSkill7todayMITA53Claude Code
engineering-craftmickeyyaya/evolve-loopSkill8todayApache-2.0A40Claude Code
rust-skillsmartineserios/thebranaSkill38d agoMITA23Claude Code
tddmickeyyaya/evolve-loopSkill8todayApache-2.0A47Claude Code
unbiased-reviewkarsten-s-nielsen/mad-scientist-skillsSkill31mo agoMITA84Claude Code