sw-init

A setup process for Specwright, a system that organizes coding work and quality standards. It detects the project's programming tools, asks about working practices, and creates configuration and guiding documents.

In plain words
What is it for?
Use it when adding Specwright to a project for the first time, configuring its quality gates and hooks, and creating the project charter, constitution, and work areas.
Why use it?
It gives future coding sessions a shared understanding of the project, its standards, and its work records. It also creates the initial shared and local state needed to use the workflow.

Skill for Claude CodeCodex

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 skills/obsidian-owl/specwright/sw-init
Any agent
npx skills add Obsidian-Owl/specwright --skill sw-init
Clone the repo
git clone --depth 1 https://github.com/Obsidian-Owl/specwright

Made for: Claude Code, Codex.

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,524 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.00031 $0.02524
Opus 5 $0.00015 $0.01262
Sonnet 5 $0.00006 $0.00505
Haiku 4.5 $0.00003 $0.00252

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

Security

Grade A, and why

sw-init 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 3d 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-init/SKILL.md · 194 lines

How it starts

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

Specwright Init

Goal

Set up Specwright in this project by understanding how the user works, what they're building, and what quality standards they expect. Produce configuration and anchor documents that will guide all future work. Tracked project artifacts should be shared across developers and agent sessions via Git; runtime session state stays local to each clone or worktree. New interactive installs should prefer project-visible runtime roots under .specwright-local/, while git-admin roots under .git/specwright/ remain compatibility-only.

Inputs

  • The codebase (scan for language, framework, dependencies, test runner)
  • The user (ask about practices, vision, quality expectations)

Outputs

When complete, ALL of the following exist:

  • {projectArtifactsRoot}/config.json -- detected + configured project settings
  • {projectArtifactsRoot}/CONSTITUTION.md -- development practices the AI must follow
  • {projectArtifactsRoot}/CHARTER.md -- technology vision and project identity
  • {repoStateRoot}/work/ -- shared work root, initialized and empty
  • {worktreeStateRoot}/session.json -- initialized detached top-level session for the current worktree

Optional (created if the user opts in):

  • {projectArtifactsRoot}/TESTING.md -- testing strategy: boundaries, infrastructure, mock allowances
  • Hooks set up if the user wants them
  • Operator follow-up: tell the user to run /sw-status to confirm the active runtime roots and detached session state.

Quality gates are configured in config (all six default to enabled; user may disable).

Constraints

Worktree context (LOW freedom):

  • Check worktreeContext per protocols/context.md.
  • If linked, explain that tracked project artifacts under {projectArtifactsRoot} are shared across developers and agent sessions via Git, while runtime session state stays local to each clone or worktree under {repoStateRoot} and {worktreeStateRoot}.
  • If the shared layout already exists, reuse the tracked project artifacts and shared runtime roots, then create or repair only this worktree's {worktreeStateRoot}/session.json.
  • If the shared layout does not exist yet, say that /sw-init will create the tracked project-artifact root plus repo-level runtime state under the Git common dir and a session root for the current worktree. This is a warning, not a block.

Read the full file on GitHub · 194 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. 3d ago First seen · 194 lines · 31 tokens per session scan A 5e02989fed2e

Subscribe to this mod's changes

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

Related

Other skills, from other repositories

ai-spec-project-start

Install or upgrade SDAD; migrate an existing SDAD project; recover or repair sdad-state.yaml, INDEX, ledger, or handoff consistency; run or interpret SDAD Doctor; or diagnose the SDAD control plane. Use only for SDAD-specific bootstrap, migration, repair, and Doctor operations.

LiveTrack-X/spec-driven-ai-development · 67 tokens

phase-7-testing

Phase 7 — Test Strategy with pyramid, coverage gates, load tests, and Critical User Journeys.

exchanet/method_enterprise_builder_planning · 25 tokens

gsd-audit-milestone

Audit milestone completion against original intent before archiving.

open-gsd/gsd-core · 17 tokens

create-mcp-server

Build, iterate, and evaluate Model Context Protocol (MCP) servers that expose external services as tools an LLM can call. Covers schema/tool design, error handling, pagination, MCP Inspector testing, and an eval set. Use when asked to "build an MCP server", "create an MCP tool", "wrap this API as MCP", "expose X to…

open-gsd/gsd-pi · 90 tokens

spk-team-auth

Handle Spec Kitty team authentication, hosted credentials, account selection, and auth-related recovery.

Priivacy-ai/spec-kitty · 22 tokens

session-retrospective

Analyzes the current implementation run — evaluates schema effectiveness, delegation alignment, note quality, and plan-to-execution fit. Captures cross-session trends and proposes improvements when patterns repeat. Use after implementation runs, or when user says 'retrospective', 'session review', 'what did we learn'…

jpicklyk/task-orchestrator · 107 tokens