The prompt
I want to add rate limiting to the public API but haven't thought it through yet. Interview me until you could write the spec, then write it to SPEC.md. What it is
From the "Brainstorm with Claude first" section of the Claude Code best-practices page. When you don't know exactly what you want yet, you don't have to work it out before prompting: ask Claude to interview you instead. In the source example (rate limiting for a public API), Claude asks about per-user versus per-key limits, what happens to requests over the limit, and what is out of scope, then writes the result to SPEC.md.
Who it's for
- Developers starting a feature they have not fully thought through
- Product-minded engineers who want a written spec first
Requirements
Requirements
- Claude Code
طلب لـ Claude Code يجعله يطرح عليك الأسئلة حتى يستطيع كتابة مواصفات كاملة للميزة ثم يحفظها في SPEC.md.
Examples
From the source
PromptI want to add rate limiting to the public API but haven't thought it through yet. Interview me until you could write the spec, then write it to SPEC.md.Expected output: Exact prompt from Anthropic docs.
Pros & cons
Pros
- Pro:Surfaces edge cases and tradeoffs before any code is written
- Pro:Produces a written SPEC.md you can hand to a fresh session
Cons
- Con:Takes time up front; overkill for small changes
Tips
- Swap in your own feature; the source says Claude comes back with multiple-choice questions about the parts you haven't pinned down and keeps asking until the answers add up to a spec