requirements-mcp-server: Command for Claude Code

.claude/commands/generate-docs.md

generate-docs is a command for Claude Code from sawadari/requirements-mcp-server. It costs 9 tokens per session (3,442 once invoked), scanned C, original, MIT.

A command that creates project documentation from TypeScript code, including API reference pages, a README, architecture diagrams, and a changelog.

In plain words
What is it for?
Use it to generate API documentation, update README.md, create an architecture diagram, or produce a CHANGELOG.md.
Why use it?
It reduces the manual work of keeping technical documentation aligned with the code.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is sawadari/requirements-mcp-server's own configuration. It tells Claude Code how to work on requirements-mcp-server 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 requirements-mcp-server configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Full API documentation: [docs/api/](./docs/api/index.html).

Reuse

Borrowing it

Nothing to install: this file belongs to sawadari/requirements-mcp-server. 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/sawadari/requirements-mcp-server/main/.claude/commands/generate-docs.md
Clone the repo
git clone --depth 1 https://github.com/sawadari/requirements-mcp-server

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 generate-docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/sawadari/requirements-mcp-server/generate-docs/github.svg)](https://agentmods.dev/commands/sawadari/requirements-mcp-server/generate-docs)
Your own site
<a href="https://agentmods.dev/commands/sawadari/requirements-mcp-server/generate-docs"><img src="https://agentmods.dev/badge/commands/sawadari/requirements-mcp-server/generate-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 generate-docs

Your own site · 80×15
<a href="https://agentmods.dev/commands/sawadari/requirements-mcp-server/generate-docs"><img src="https://agentmods.dev/badge/commands/sawadari/requirements-mcp-server/generate-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,442 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00009 $0.03442
Opus 5.5 $0.00004 $0.01377
Sonnet 5.5 $0.00002 $0.00688
Haiku 4.5 $0.00001 $0.00344

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

Security

Grade C, and why

generate-docs scanned grade C 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf node_modules/.cache
.claude/commands/generate-docs.md · 632 lines

How it starts

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

Generate Docs Command

TypeScriptコードからAPIドキュメント、README、アーキテクチャ図を自動生成します。

使用方法

/generate-docs [type]

パラメータ

  • type (オプション): 生成するドキュメントタイプ
    • all (デフォルト): すべてのドキュメント生成
    • api: API リファレンス (TypeDoc)
    • readme: README.md 更新
    • architecture: アーキテクチャ図生成
    • changelog: CHANGELOG.md 生成

実行内容

1. API リファレンス生成 (TypeDoc)

npx typedoc --out docs/api src/

生成されるドキュメント:

docs/api/
├── index.html              # エントリーポイント
├── classes/
│   ├── BaseAgent.html
│   ├── CoordinatorAgent.html
│   └── CodeGenAgent.html
├── interfaces/
│   ├── Task.html
│   ├── AgentResult.html
│   └── QualityReport.html
├── modules/
│   └── types.html
└── assets/
    ├── style.css
    └── search.js

アクセス: open docs/api/index.html

2. README.md 自動更新

コードベースを分析し、README.mdを更新:

# Project Name

## 📊 Project Stats

- **Total Files**: 234
- **Lines of Code**: 12,450
- **Test Coverage**: 85%
- **TypeScript**: 100%
- **Dependencies**: 258

## 🏗️ Architecture

<architecture-diagram>

## 📦 Modules

### Core Agents (agents/)

#### CoordinatorAgent
Orchestrates task decomposition and agent assignment.

**Methods**:
- `decomposeIssue(issue: Issue): Promise<TaskDecomposition>`
- `buildDAG(tasks: Task[]): Promise<DAG>`
- `assignAgent(task: Task): Promise<AgentType>`

**Dependencies**:
- Octokit (GitHub API)
- Anthropic SDK

#### CodeGenAgent
Generates code using Claude Sonnet 4.

**Methods**:
- `execute(task: Task): Promise<AgentResult>`
- `generateCode(spec: CodeSpec): Promise<GeneratedCode>`

...

## 📚 API Documentation

Full API documentation: [docs/api/](./docs/api/index.html)

## 🧪 Testing

```bash
npm test              # Run tests
npm run test:coverage # With coverage

📝 Contributing

See CONTRIBUTING.md


### 3. アーキテクチャ図生成

Mermaid記法でアーキテクチャ図を生成:

#### システム構成図

```mermaid
graph TB
    subgraph "User Layer"
        U[Human Developer]
    end

    subgraph "Coordinator Layer"
        C[CoordinatorAgent]
    end

    subgraph "Specialist Layer"
        CG[CodeGenAgent]
        R[ReviewAgent]
        I[IssueAgent]
        P[PRAgent]
        D[DeploymentAgent]
    end

    subgraph "External Services"
        GH[GitHub]
        AN[Anthropic API]
        FB[Firebase]
    end

    U -->|Issue| GH
    GH -->|Webhook| C
    C -->|Decompose| CG
    C -->|Assign| R
    C -->|Assign| I
    C -->|Assign| P
    C -->|Assign| D
    CG -->|Generate| AN
    D -->|Deploy| FB
    P -->|Create PR| GH

Read the full file on GitHub · 632 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. 2mo ago First seen · 632 lines · 9 tokens per session scan C c4653bff78a4

Subscribe to this mod's changes

generate-docs is a command published in the GitHub repository sawadari/requirements-mcp-server (2 stars, last pushed 12mo ago), licensed MIT. It adds 9 tokens to every session and 3,442 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

generate-docs compared with commands from other repositories

generate-docs next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
generate-docssawadari/requirements-mcp-serverCommand212mo agoMITC9Claude Code
checklistgithub/spec-kitCommand148kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand148kyesterdayMITA27Claude Code
specifygithub/spec-kitCommand148kyesterdayMITA13Claude Code
analyzegithub/spec-kitCommand148kyesterdayMITA26Claude Code
convergegithub/spec-kitCommand148kyesterdayMITA35Claude Code
implementgithub/spec-kitCommand148kyesterdayMITA14Claude Code