init

init is a command for Claude Code from MartyBonacci/specswarm. It costs 49 tokens per session (29,888 once invoked), scanned B, original, MIT.

A project setup command that creates or refreshes SpecSwarm guide files describing a project's rules, technologies, quality standards, references, and coding conventions.

In plain words
What is it for?
Use it when starting a project or sprint, or when checking whether existing project documentation has drifted from the current code and tooling.
Why use it?
It keeps written project guidance aligned with the codebase and preserves developer additions and backups when guidance changes.

Command for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ss plugin — 10 skills, 34 commands, 6 agents, 4 hooks shipped together

Good fit Use it when starting a project or sprint, or when checking whether existing project documentation has drifted from the current code and tooling.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add MartyBonacci/specswarm
Claude Code
/plugin install ss

Made for: Claude Code.

Or install ss, the plugin that ships this one along with the rest of its 10 skills, 34 commands, 6 agents, 4 hooks.

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 init

README.md
[![agentmods](https://agentmods.dev/badge/commands/martybonacci/specswarm/init/github.svg)](https://agentmods.dev/commands/martybonacci/specswarm/init)
Your own site
<a href="https://agentmods.dev/commands/martybonacci/specswarm/init"><img src="https://agentmods.dev/badge/commands/martybonacci/specswarm/init/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 init

Your own site · 80×15
<a href="https://agentmods.dev/commands/martybonacci/specswarm/init"><img src="https://agentmods.dev/badge/commands/martybonacci/specswarm/init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 29,888 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00049 $0.29888
Opus 5.5 $0.00020 $0.11955
Sonnet 5.5 $0.00010 $0.05978
Haiku 4.5 $0.00005 $0.02989

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

Security

Grade B, and why

init scanned grade B with 1 finding 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.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

EXISTING_MCP=$(cat "$REPO_ROOT/.mcp.json")
plugins/ss/commands/init.md · 2,500 lines

How it starts

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

User Input

$ARGUMENTS

Goal

Establish or refresh the SpecSwarm guides under .specswarm/:

  1. constitution.md - Project governance and coding principles
  2. tech-stack.md - Approved technologies and prohibited patterns
  3. quality-standards.md - Quality gates and performance budgets
  4. references.md - External authoritative sources (spec corpus, reference codebases, memory dirs)
  5. conventions.md - Detected code style and patterns
  6. laws.md + laws/ - Stack laws (v7.20.0): the owner's rules in their own words, each with a check in the repo that fails when the rule is broken, a ledger of old sites that may only shrink, and a planted mistake that proves the check works (Step 6.9)

/ss:init is designed to run at two points in a project's life:

  • At project / sprint kickoff — to create the guides from scratch by detecting the tech stack, discovering external references, and proposing principles from memory.
  • Mid-development, any time — to reconcile the guides against project reality. On re-run, the command reads both (a) the existing guide files and (b) current project state (package.json, CI, memory dirs, …), surfaces drift between the two, and only updates a guide after the developer accepts the proposed delta. Developer-authored content inside <!-- ss:user-additions --> blocks is always preserved verbatim. A full backup of all .specswarm/*.md is taken on every run as a safety net.

Pass --reset if you want to discard existing guides and regenerate from scratch (the backup is still taken; nothing is permanently lost).


Execution Steps

Laws only. If $ARGUMENTS contains --laws, do Step 6.9 (Stack laws) and nothing else: no backup, no detection, no guides. A session start that says "Stack laws need a look" is asking for exactly this.

Step 1: Snapshot existing guides (unconditional)

Always back up every .specswarm/*.md file present at the start of the run. This is cheap, always safe, and protects the developer against any reconciliation bug downstream. No "Update / Backup / Cancel" prompt — re-running /ss:init is meant to be safe.

Read the full file on GitHub · 2,500 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 Changed · +129 lines · +37 tokens per session fd73d3533659
  2. 3mo ago First seen · 2,371 lines · 12 tokens per session scan B 7e36a7591f5f

Subscribe to this mod's changes

init is a command published in the GitHub repository MartyBonacci/specswarm (67 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 29,888 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

init compared with commands from other repositories

init next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
initMartyBonacci/specswarmCommand67yesterdayMITB49Claude Code
checklistgithub/spec-kitCommand153ktodayMITA13Claude Code
clarifygithub/spec-kitCommand153ktodayMITA27Claude Code
specifygithub/spec-kitCommand153ktodayMITA13Claude Code
analyzegithub/spec-kitCommand153ktodayMITA26Claude Code
convergegithub/spec-kitCommand153ktodayMITA35Claude Code
implementgithub/spec-kitCommand153ktodayMITA14Claude Code