generate-plan

A command for producing a detailed requirements document for a proposed software feature, based on codebase research and outside documentation.

In plain words
What is it for?
Use it before implementing a feature to document relevant files, project conventions, tests, library references, implementation examples, and open questions.
Why use it?
It collects the context an implementing AI agent needs, reducing guesswork about existing patterns, dependencies, examples, and validation requirements.

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/wmeints/context-engineering/generate-plan
Clone the repo
git clone --depth 1 https://github.com/wmeints/context-engineering

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 486 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.00486
Opus 5 $0.00000 $0.00243
Sonnet 5 $0.00000 $0.00097
Haiku 4.5 $0.00000 $0.00049

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

Security

Grade A, and why

generate-plan 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.

claude-code/.claude/commands/generate-plan.md · 79 lines

How it starts

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

Create requirements document

Feature: $ARGUMENTS

Generate a complete requirements document for feature implementation based on thorough research. Ensure context is passed to the agent to enable self-validation and iterative improvements. Read the requirements file first to understand what needs to be done, how examples provided help, and any other considerations.

The agent only gets access to the context you're appending to the requirements document. Assume that the agent has access to the code base and the same knowledge cut-off as you, so it's important that your research is included or referenced in the requirements document. The agent has websearch capabilities, so pass URLs to documentation and examples.

Research process

  1. Codebase analysis
  • Search for similar patterns/features in the code base
  • Identify files to reference in the requirements document
  • Note existing conventions to follow
  • Check test patterns for validation
  1. External research
  • Search for similar features/patterns online
  • Library documentation (include specific URLs)
  • Implementation examples (Github/blogs)
  • Best practices and common pitfalls
  1. User clarification
  • Specific patterns to mirror and where to find them
  • Integration requirements and where to find them

Requirements document generation

Critical context to pass

  • Documentation: URLs to specific sections
  • Code Examples: Real snippets from the code base
  • Gotchas: Library quirks, version issues
  • Patterns: Existing approaches to follow

Implementation blueprint

  • Start with pseudocode showing the approach
  • Reference real files for patterns
  • Include error handling strategies
  • List tasks to be completed to fulfill the requirements in order of completion

Validation gates

dotnet test

It's important to verify the requirements and plan your approach before writing the requirements document.

Output

Save the requirements as docs/implementation-plans/{feature-name}.md

Read the full file on GitHub · 79 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 · 79 lines · 0 tokens per session scan A b95dd2d77e5b

Subscribe to this mod's changes

generate-plan is a command published in the GitHub repository wmeints/context-engineering (37 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 486 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.