spec-driven-claude-code: Command for Claude Code

.claude/commands/docs.md

docs is a command for Claude Code from dinhnguyenngoc/spec-driven-claude-code. It costs 6 tokens per session (4,273 once invoked), scanned A, original, MIT.

A command that gathers and completes a project's technical documentation before deployment. It links existing specifications, architecture, security, and infrastructure records instead of copying them unnecessarily.

In plain words
What is it for?
Use it to organize project documentation, fill missing sections, connect earlier technical artifacts, and generate API documentation from the project's framework tools.
Why use it?
It exposes missing documentation and makes the project's technical information easier to find. Linking existing records helps prevent conflicting duplicate versions.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions subagents.

This is dinhnguyenngoc/spec-driven-claude-code's own configuration. It tells Claude Code how to work on spec-driven-claude-code 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 spec-driven-claude-code configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Stack Profile note:** read `Project Profile` first. **Core = Node.js** → generate API docs from the framework's OpenAPI tooling (`@nestjs/swagger`, Fastify sc.

Reuse

Borrowing it

Nothing to install: this file belongs to dinhnguyenngoc/spec-driven-claude-code. 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/dinhnguyenngoc/spec-driven-claude-code/main/.claude/commands/docs.md
Clone the repo
git clone --depth 1 https://github.com/dinhnguyenngoc/spec-driven-claude-code

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 docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/docs/github.svg)](https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/docs)
Your own site
<a href="https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/docs"><img src="https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/docs/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 docs

Your own site · 80×15
<a href="https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/docs"><img src="https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,273 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00006 $0.04273
Opus 5.5 $0.00002 $0.01709
Sonnet 5.5 $0.00001 $0.00855
Haiku 4.5 $0.00001 $0.00427

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

Security

Grade A, and why

docs scanned grade A 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:5000/swagger/v1/swagger.json > docs/api/openapi.json
.claude/commands/docs.md · 410 lines

How it starts

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

/docs — Documentation

"If it's not documented, it doesn't exist."

Purpose

Consolidate existing documentation and complete missing pieces before deployment. Ensure all technical artifacts from previous phases are properly linked and accessible.

Workspace Mode: if the session root declares Mode: workspace → resolve the target repo per CLAUDE.md §Workspace Mode before anything else; every path, probe, and gate below is relative to the target repo, and the workspace disk-check applies at the gate.

Principle: Don't duplicate — link and reference existing artifacts from /spec, /arch, /secure, /infra.

Stack Profile note: read Project Profile first. Core = Node.js → generate API docs from the framework's OpenAPI tooling (@nestjs/swagger, Fastify schema-first — see rules/overrides/framework-nodejs-web.md), and the dotnet/DocFX commands in Phase 4 & §Auto-Generation Tools map to their npm equivalents. Core = PHP → API docs come from the Laravel tooling (scribe or l5-swagger, or php artisan route:list cross-checked against architecture/api/openapi.yaml), not Swashbuckle/DocFX; the dotnet command blocks in Phase 2 (Quick Start) and Phase 6 (Deployment Guide) map to composer install --no-dev --optimize-autoloader, php artisan migrate --force, and php artisan serve / the fpm-nginx or Octane container shape from rules/overrides/framework-php-laravel.md §J. The templates stay default-stack illustration — their "example only" disclaimers apply; DB/observability lines follow the Profile + rules/overrides/*.

Prerequisites

  • Implementation complete (/build done)
  • Infrastructure setup (/infra done)
  • API contracts defined (architecture/api/)

Workflow

Run mode — first-run vs incremental.

  • docs/ largely absent → first-run: generate the full set (Phases 1-6).
  • docs/ already exists → incremental: update only the docs the change touched + CHANGELOG.md; leave unchanged docs alone. Delta → doc map:
    • new/changed endpoint → docs/api/ + CHANGELOG.md
    • new env var → configuration.md
    • fixed bug (BUG-### in TEST_REPORT.md) → troubleshooting.md
    • setup / run / deploy steps changed → getting-started.md + deployment.md
    • any release → CHANGELOG.md
  • When unsure whether a doc is affected → regenerate it (don't risk staleness).
  • Before a major release, do a full-set pass (treat as first-run) to catch drift.

Read the full file on GitHub · 410 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. 1mo ago First seen · 410 lines · 6 tokens per session scan A e0a3c5c17231

Subscribe to this mod's changes

docs is a command published in the GitHub repository dinhnguyenngoc/spec-driven-claude-code (21 stars, last pushed 2mo ago), licensed MIT. It adds 6 tokens to every session and 4,273 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.