SDD-Pro: Command for Claude Code

.claude/commands/spec-book.md

spec-book is a command for Claude Code from zekiriabd/SDD-Pro. It costs 19 tokens per session (1,241 once invoked), scanned A, original, Apache-2.0.

A command that creates or updates a functional requirements document in Word and Markdown. It describes software features in plain language for non-technical readers.

In plain words
What is it for?
Documenting project requirements, humanising feature descriptions, and rebuilding the requirements files after changes.
Why use it?
It turns technical feature definitions into a document that business owners and decision-makers can read and review.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is zekiriabd/SDD-Pro's own configuration. It tells Claude Code how to work on SDD-Pro itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything SDD-Pro configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python .sdd/python/sdd_scripts/generate_specbook.py \.

Reuse

Borrowing it

Nothing to install: this file belongs to zekiriabd/SDD-Pro. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/zekiriabd/SDD-Pro/main/.claude/commands/spec-book.md
Clone the repo
git clone --depth 1 https://github.com/zekiriabd/SDD-Pro

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/spec-book.svg)](https://agentmods.dev/commands/zekiriabd/sdd-pro/spec-book)
Your own site
<a href="https://agentmods.dev/commands/zekiriabd/sdd-pro/spec-book"><img src="https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/spec-book.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,241 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.00019 $0.01241
Opus 5 $0.00010 $0.00620
Sonnet 5 $0.00004 $0.00248
Haiku 4.5 $0.00002 $0.00124

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

Security

Grade A, and why

spec-book 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.

.claude/commands/spec-book.md · 106 lines

How it starts

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

/spec-book — Cahier des charges fonctionnel (.docx + .md)

Génère / met à jour le cahier des charges du projet : un document Word décrivant toutes les fonctionnalités (FEATs) en langage humain simple, lisible par un gérant ou un décideur non-technique. Régénéré à chaque nouvelle fonctionnalité ou analyse. Sortie : workspace/docs/cahier-des-charges.docx (+ miroir .md pour diff/review).

Deux moitiés (pattern SDD_Pro) : l'agent specbook-writer (LLM) rédige la prose humaine par FEAT ; le script déterministe generate_specbook.py (0 token) assemble le .docx. Le document est toujours régénérable même si l'étape LLM n'a pas tourné (mode brut « à humaniser »).

Usage

/spec-book              # tout le projet (humanise les FEATs nouvelles/modifiées)
/spec-book {n}          # (ré)humanise uniquement la FEAT {n}, puis réassemble
/spec-book --assemble   # réassemble seulement (0 token, pas d'agent LLM)

Pré-conditions

  • Au moins une FEAT sous workspace/feats/{n}-*.md. Sinon [FEAT_NOT_FOUND] → suggérer /feat-generate.
  • Dossier de sortie workspace/docs/ (créé automatiquement).

STEP 1 — Détecter ce qui doit être (ré)humanisé

Lire le manifeste précédent s'il existe : workspace/docs/.sys/specbook-manifest.json. Pour chaque FEAT workspace/feats/*.md, comparer son hash courant (generate_specbook.py --print-hash <feat>) au hash du manifeste et à la présence d'une section fraîche workspace/docs/.sys/sections/{feat-id}.md.

Est « à humaniser » toute FEAT dont : la section cache est absente, OU son feat_hash diffère du hash courant (FEAT modifiée depuis), OU --assemble n'est pas passé et {n} la cible explicitement.

Read the full file on GitHub · 106 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 · 106 lines · 19 tokens per session scan A 84313c55e435

Subscribe to this mod's changes

spec-book is a command published in the GitHub repository zekiriabd/SDD-Pro (191 stars, last pushed 4d ago), licensed Apache-2.0. It adds 19 tokens to every session and 1,241 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-09-03.