Documentation Prompts That Produce Docs People Read
Task-shaped headings, one runnable example, and the failure modes.
writing
documentation
developer-experience
Keywords:
documentation
technical writing
examples
Generated documentation defaults to a tour of the API surface, organised by class. Nobody reads that. People arrive with a task.
Prompt for the shape you want:
"Write docs for this module. Structure:
• One paragraph: what this is for and when NOT to use it
• Then sections titled as tasks ('Upload an image', 'Delete an image'), not as classes
• Each section: the shortest runnable example, then the parameters that example did not use
• A 'When this fails' section: the three most likely errors, what causes each, what to do
• No section that only restates the function signature
Examples must be copy-pasteable and complete — imports included."
"When NOT to use it" is the most valuable paragraph and it is never in generated docs unless you ask. Half of support questions are people using the wrong tool, and that paragraph answers them before they ask.
6119
Generated Outputs (1)
1 weeks ago
Claude
claude-sonnet-4
1 weeks ago
Generated Output
Upload an image
import { cloudinaryService } from "./services/cloudinary.service"