init-openspec

A command that initializes OpenSpec, a tool for organizing software work around written specifications, in a project directory. It installs or checks the command-line tool and creates the required files and folders.

In plain words
What is it for?
Use it to start OpenSpec in the current or specified project, create the scaffolding directories, install the custom schema, and validate the setup.
Why use it?
It sets up the project's specification workflow consistently, including its customized scaffolding schema and Claude command files.

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/komluk/scaffolding/init-openspec
Clone the repo
git clone --depth 1 https://github.com/komluk/scaffolding
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 592 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.00020 $0.00592
Opus 5 $0.00010 $0.00296
Sonnet 5 $0.00004 $0.00118
Haiku 4.5 $0.00002 $0.00059

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

Security

Grade A, and why

init-openspec 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.

commands/init-openspec.md · 82 lines

How it starts

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

/init-openspec Command

Initialize OpenSpec in a project directory with the scaffolding-workflow schema.

Usage

/init-openspec [project-path]

If no path is provided, initializes in the current working directory.

What It Does

Sets up OpenSpec spec-driven development tooling in a project:

  1. Installs/verifies OpenSpec CLI
  2. Initializes OpenSpec directory structure
  3. Copies the scaffolding-workflow custom schema

Steps

  1. Verify OpenSpec CLI is available

    openspec --version || npm install -g @fission-ai/openspec@latest
    
  2. Initialize OpenSpec in target directory

    openspec init --tools claude [project-path]
    

    This creates .scaffolding/openspec/ directory and .claude/commands/specs/ command files.

  3. Copy the scaffolding-workflow schema

    openspec schema fork spec-driven scaffolding-workflow
    

    Then replace the generated schema with the customized version from: ./schemas/scaffolding-workflow/schema.yaml

  4. Create the conversations directory

    mkdir -p .scaffolding/conversations/
    
  5. Verify installation

    openspec schemas
    openspec schema validate scaffolding-workflow
    

Output

After completion, confirm:

  • OpenSpec version installed
  • Directory structure created (.scaffolding/openspec/specs/, .scaffolding/openspec/schemas/, .scaffolding/conversations/)
  • Commands available (/specs:new, /specs:ff, /specs:apply, etc.)
  • Custom schema scaffolding-workflow validated and available

Available OpenSpec Commands After Init

Command Purpose
/specs:new Start a new spec-driven change
/specs:ff Fast-forward: generate all artifacts at once
/specs:apply Implement tasks from specs
/specs:continue Create the next artifact
/specs:verify Verify implementation matches specs
/specs:archive Archive completed change

Notes

  • Requires Node.js >= 20.19.0
  • Does not modify existing .claude/commands/ files
  • Specs in .scaffolding/openspec/specs/ and schemas in .scaffolding/openspec/schemas/ are tracked in git
  • Conversation specs live in .scaffolding/conversations/{conversation_id}/specs/

Read the full file on GitHub · 82 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 · 82 lines · 20 tokens per session scan A c2d59877f2cb

Subscribe to this mod's changes

init-openspec is a command published in the GitHub repository komluk/scaffolding (15 stars, last pushed 26d ago), licensed MIT. It adds 20 tokens to every session and 592 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.