specmanager-init

A project setup command for SpecManager, a system that keeps software specifications organized in a repository. It creates specification folders, an index file, managed instructions in CLAUDE.md, and a design document inferred from the existing user interface.

In plain words
What is it for?
Use it to initialize .claude/specs/, create feature folders and manifest.json, add the managed SpecManager block to CLAUDE.md, and generate or refresh docs/DESIGN.md from UI source files.
Why use it?
It gives the project a repeatable place for specifications and design tokens while preserving text outside its managed sections. Re-running it is intended to refresh the setup without changing the user's other instructions.

Command

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 commands/joanseg/specmanager/specmanager-init
Clone the repo
git clone --depth 1 https://github.com/joanseg/specmanager
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 871 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.00025 $0.00871
Opus 5 $0.00013 $0.00436
Sonnet 5 $0.00005 $0.00174
Haiku 4.5 $0.00003 $0.00087

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

Security

Grade A, and why

specmanager-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 2d 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.

plugins/specmanager/commands/specmanager-init.md · 65 lines

How it starts

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

Initialize this project for SpecManager.

What this does

  1. Creates .claude/specs/ (and features/) if missing.
  2. Writes/refreshes manifest.json (the rebuildable board index).
  3. Writes a managed block into the project's CLAUDE.md between <!-- specmanager:start --> and <!-- specmanager:end -->. Content outside those markers is never touched. If CLAUDE.md does not exist it is created with just the managed block.
  4. Creates or refreshes ./docs/DESIGN.md — the repo-level design-system spec, following the Google Stitch DESIGN.md spec. Tokens (colors, typography, spacing, components) are inferred from the existing UI source files (CSS custom properties, sample component files, Tailwind config). The managed region lives between <!-- specmanager:design:start --> / <!-- specmanager:design:end -->; anything outside is the user's territory. Re-runs are idempotent and non-destructive.

Steps

  1. Call the specmanager_init MCP tool first (idempotent — safe to re-run). This creates .claude/specs/ + manifest.json, writes the managed CLAUDE.md block between the <!-- specmanager:start --> / <!-- specmanager:end --> markers, and creates/refreshes ./docs/DESIGN.md.
  2. After it returns, run the native /init slash command in-session to populate CLAUDE.md's general codebase-doc region. /init is a native interactive command the agent runs in-session — it is not a server/MCP call. It writes only outside the SpecManager markers, so it never clobbers the managed block (the marker-merge in core/claude-md.ts is line-anchored, so the regions are disjoint). Running specmanager_init first means the markers already exist when /init fills the surrounding codebase docs.
  3. Report what changed across both regions:
    • From specmanager_init: which directories were created, whether the managed CLAUDE.md block was created/updated, and whether ./docs/DESIGN.md was created/updated.
    • From /init: that the general codebase docs in CLAUDE.md (outside the markers) were (re)generated — so the user need not run /init separately.

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

Subscribe to this mod's changes

specmanager-init is a command published in the GitHub repository joanseg/specmanager (19 stars, last pushed 18d ago), licensed MIT. It adds 25 tokens to every session and 871 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-30.