docs-init

A command that performs an initial scan of a codebase and creates a documentation skeleton. It inventories source files, entry points, configuration, modules, services, components, routes, database models, and integrations.

In plain words
What is it for?
Use it once during project setup to create an overview, module index, API reference stubs, and setup guide.
Why use it?
It gives a new project a starting documentation structure instead of requiring every section to be written from scratch.

Command for Claude Code

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/ngocsangyem/meowkit/docs-init
Clone the repo
git clone --depth 1 https://github.com/ngocsangyem/MeowKit

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 439 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.00000 $0.00439
Opus 5 $0.00000 $0.00219
Sonnet 5 $0.00000 $0.00088
Haiku 4.5 $0.00000 $0.00044

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

Security

Grade A, and why

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

.claude/commands/mk/docs-init.md · 55 lines

What it actually says

/docs:init — Initial Documentation Scan

Usage

/docs:init

Behavior

Performs a one-time initial documentation scan of the entire codebase and generates a documentation skeleton. Run once at project setup, then use /docs:sync for incremental updates.

Execution Steps

  1. Scan entire codebase structure. Walk the project directory tree and catalog:

    • All source files, grouped by module/service/component
    • Entry points (main files, route definitions, controllers)
    • Configuration files
    • Existing documentation (if any)
  2. Identify modules, services, components, routes. Build an inventory:

    • Backend services and their responsibilities
    • Frontend components and their hierarchy
    • API routes/endpoints with HTTP methods
    • Database models/schemas
    • Shared utilities and libraries
    • Third-party integrations
  3. Generate documentation skeleton with the following sections:

    • Project Overview: what the project does, tech stack, high-level architecture
    • Module Index: list of all modules/services with one-line descriptions
    • API Reference Stubs: endpoint list with method, path, and placeholder for description
    • Setup Guide: detected prerequisites, environment variables needed, build/run commands
    • Component Index (if frontend): component tree with props/events stubs
  4. Write to docs/ directory. Create:

    docs/
    ├── overview.md
    ├── modules.md
    ├── api-reference.md
    ├── setup.md
    └── components.md  (if frontend detected)
    

When to Use

  • First time setting up the toolkit on an existing project
  • When joining a new codebase and need to understand the structure
  • After a major restructuring that invalidated previous docs

Output

Documentation skeleton in docs/ directory. Each file contains accurate structure with placeholder content where details need to be filled in. Use /docs:sync going forward to keep docs up to date with code changes.

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 · 55 lines · 0 tokens per session scan A 96cfb462d136

Subscribe to this mod's changes

docs-init is a command published in the GitHub repository ngocsangyem/MeowKit (14 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 439 tokens. 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.