swe-spec

swe-spec is a skill for Claude Code from SNIKO/agent-skills. It costs 25 tokens per session (3,859 once invoked), scanned A, original, MIT.

A workflow for creating and progressively refining one specification document for a software change. The specification grows from a high-level structure into exact details that developers can implement.

In plain words
What is it for?
Use it to shape a change into an evolving spec, covering its structure and domain areas through confirmed steps before planning or implementation.
Why use it?
It keeps the intended behavior, boundaries, and technical contracts in one coherent document instead of scattering decisions across notes or producing detail before it is needed.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to shape a change into an evolving spec, covering its structure and domain areas through confirmed steps before planning or implementation.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/sniko/agent-skills/swe-spec.svg)](https://agentmods.dev/skills/sniko/agent-skills/swe-spec)
Your own site
<a href="https://agentmods.dev/skills/sniko/agent-skills/swe-spec"><img src="https://agentmods.dev/badge/skills/sniko/agent-skills/swe-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,859 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.00025 $0.03859
Opus 5 $0.00013 $0.01929
Sonnet 5 $0.00005 $0.00772
Haiku 4.5 $0.00003 $0.00386

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

Security

Grade A, and why

swe-spec 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 7d 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/swe-spec/SKILL.md · 177 lines

How it starts

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

Inputs

CHANGE_DIR - the directory for the current change, typically .swe/<change>, infer from the conversation if not explicitly named. BRIEF_FILE: {CHANGE_DIR}/brief.md SPEC_FILE: {CHANGE_DIR}/spec.html MOCKUPS_DIR: {CHANGE_DIR}/mockups/ RESEARCH_DIR: .swe/research/ — shared across all changes, indexed by INDEX.md

Purpose

This swe-spec stage is part of the SDLC pipeline for a single change, following the path:

swe-shapeswe-spec → [swe-plan] → [swe-worktree] → swe-executeswe-review, with swe-research available at any point.

Maintain one {SPEC_FILE} per change that always reads like a properly written spec: top-down from the overall idea down to exact, implementable detail, organized by logical/domain area the way a human architect would lay it out, and never bigger than the change actually warrants. Depth is earned one user-confirmed step at a time and is never produced further ahead than requested. Every pass rewrites the section(s) it belongs to in place and the document is reshaped as needed so it always reads as freshly authored, never as a log of edits.

Engineering Stance

You and the user are peer engineers on this document; neither outranks the other, and being asked for something is not authorization to write it down unexamined.

  • Evaluate every request against Design Principles, the brief, repository conventions, and any evidence already gathered before it goes into the document.
  • When a request would produce an unsound, insecure, inconsistent, or unmaintainable design, or conflicts with evidence already gathered, say so plainly in the same pass: state the concern, the reasoning or evidence behind it, and the alternative you'd recommend. Do not silently comply, and do not bury the objection as a footnote.
  • Raise it once, with your reasoning. Do not repeat an objection the user has already heard and decided on, and do not withhold the requested content while waiting for agreement.
  • The user has the final call. Once they've heard the concern and confirm a direction, write the spec to that direction, record the decision and its rationale where a future reader needs it (a callout, not a silent overwrite of your objection), and move on without relitigating it.
  • This does not license inventing scope, second-guessing an already-settled brief decision (Brief Revision Rule still governs infeasibility), or turning Ask only what's blocking's narrow question budget into open-ended debate.

Read the full file on GitHub · 177 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. 7d ago First seen · 177 lines · 25 tokens per session scan A f440658d4368

Subscribe to this mod's changes

swe-spec is a skill published in the GitHub repository SNIKO/agent-skills (2 stars, last pushed 15d ago), licensed MIT. It adds 25 tokens to every session and 3,859 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

html-artifacts

Author the HTML for a plan artifact, dashboard iframe, or Slack attachment — structure, design plan, available runtime, theming, and craft. Read this before writing HTML for saveplan, outputiframe, or slackattachhtml.

langchain-ai/open-swe · 51 tokens

bootstrap-repo-analysis

First-time analysis of a repository with no prior reviewer outcomes. Crawl historical merged-PR review feedback with the gh CLI (plus any preloaded samples), extract the team's review norms, and synthesize the initial per-repo review-style prompt. Use this for a cold-start repo; use continual-learning instead once the…

langchain-ai/open-swe · 73 tokens

baby-sit

Monitor a GitHub pull request until CI is green, diagnose failures, and rerun only evidence-backed flaky GitHub Actions jobs.

langchain-ai/open-swe · 30 tokens

continual-learning

Nightly refinement of an existing per-repo review-style prompt using this reviewer's own finding outcomes. Read confirmed (resolved-by-commit / thumbs-up) and dismissed (thumbs-down) findings, promote the bug patterns the team actually fixes, demote the false-positive patterns, reconcile against the current prompt…

langchain-ai/open-swe · 89 tokens

oracle

Oracle second-model review: bundle prompts/files, debug, refactor, design.

steipete/oracle · 18 tokens

latent-potential

First-principles, team-of-experts assessment of a software project that surfaces latent potential; underexploited assets, a sharper north star, missing high-leverage capabilities, better framing and messaging. Produces a prioritized, evidence-grounded report with cheap probes, a reframe candidate, a stop-doing list…

petekp/claude-code-setup · 191 tokens