document-project

A command for creating structured documentation of an existing software project so an AI coding agent can understand its layout, conventions, and patterns. It first checks whether a product requirements document, or PRD, is available to focus the work.

In plain words
What is it for?
It is for documenting relevant modules, services, and coding patterns before making changes to an existing project.
Why use it?
It reduces the time an agent spends figuring out an unfamiliar codebase and helps keep documentation focused on the planned change.

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/cakemail/cakemail-api-documentation-mcp/document-project
Clone the repo
git clone --depth 1 https://github.com/cakemail/cakemail-api-documentation-mcp

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 2,938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% copy Near-identical to another mod 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.02938
Opus 5 $0.00000 $0.01469
Sonnet 5 $0.00000 $0.00588
Haiku 4.5 $0.00000 $0.00294

Measured yesterday against content hash 762a3ee0448e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

document-project 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 yesterday.

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.

Origin

This is a copy

94% identical to document-project — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/BMad/tasks/document-project.md · 350 lines

How it starts

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

/document-project Task

When this command is used, execute the following task:

Document an Existing Project

Purpose

Generate comprehensive documentation for existing projects optimized for AI development agents. This task creates structured reference materials that enable AI agents to understand project context, conventions, and patterns for effective contribution to any codebase.

Task Instructions

1. Initial Project Analysis

CRITICAL: First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.

IF PRD EXISTS:

  • Review the PRD to understand what enhancement/feature is planned
  • Identify which modules, services, or areas will be affected
  • Focus documentation ONLY on these relevant areas
  • Skip unrelated parts of the codebase to keep docs lean

IF NO PRD EXISTS: Ask the user:

"I notice you haven't provided a PRD or requirements document. To create more focused and useful documentation, I recommend one of these options:

  1. Create a PRD first - Would you like me to help create a brownfield PRD before documenting? This helps focus documentation on relevant areas.

  2. Provide existing requirements - Do you have a requirements document, epic, or feature description you can share?

  3. Describe the focus - Can you briefly describe what enhancement or feature you're planning? For example:

    • 'Adding payment processing to the user service'
    • 'Refactoring the authentication module'
    • 'Integrating with a new third-party API'
  4. Document everything - Or should I proceed with comprehensive documentation of the entire codebase? (Note: This may create excessive documentation for large projects)

Please let me know your preference, or I can proceed with full documentation if you prefer."

Based on their response:

  • If they choose option 1-3: Use that context to focus documentation
  • If they choose option 4 or decline: Proceed with comprehensive analysis below

Read the full file on GitHub · 350 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. yesterday First seen · 350 lines · 0 tokens per session scan A 762a3ee0448e

Subscribe to this mod's changes

document-project is a command published in the GitHub repository cakemail/cakemail-api-documentation-mcp (0 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,938 tokens. A static security scan graded it A with 0 findings. It is 94% identical to document-project, differing in 2 lines, and is treated as a copy.