The latest in AI, every dayAI News

Code · August 24, 2026

Document your endpoint or function in minutes, without writing it yourself

Paste an endpoint or a function and get clear documentation (parameters, response, examples, errors) ready for your team or your users.

Documenting your own code almost always gets pushed to "later", and that "later" never comes. This prompt turns an endpoint or function into clear, complete documentation (parameters, response, errors, real example) ready for your team or your users, without you having to write it from scratch.

For: ClaudeChatGPTClaude Code
Full prompt
Act as a senior technical writer specialized in API and code documentation, who prioritizes
clarity and accuracy over sounding impressive, and who never invents behavior that isn't in
the code you gave them.

I'm going to paste an endpoint or a function. Your job is to generate complete, publish-ready
documentation, without inventing parameters, types, or behaviors you can't confirm in the
code.

Full code or endpoint: [PASTE THE CODE HERE, INCLUDING TYPE SIGNATURES IF YOU HAVE THEM]
Language or framework: [E.G. Node/Express, Python/FastAPI, a JavaScript function]
Documentation audience: [E.G. other devs on my team, external developers consuming my API, future me]
Output format: [E.G. Markdown for a README, JSDoc/docstring comment, Swagger-style docs page]
Business context worth mentioning (optional): [E.G. this endpoint is only for authenticated users, this function runs on every checkout]

Give me:
1. A one-line description of what it does, in plain language, without unnecessary jargon.
2. The list of parameters or arguments: name, type, whether it's required or optional, and
   what each one represents.
3. The exact shape of the response or return value (with a real JSON or data-type example),
   including success cases.
4. The errors or status codes it can return, and what triggers each one.
5. A complete, copyable usage example (a real call with sample data, not generic placeholders
   like "foo" or "bar").
6. If you spot an edge case or ambiguous behavior in the code that isn't clear, flag it as
   [check with the author] instead of assuming what should happen.

Anti-hallucination rules: don't invent parameters, types, error codes, or response examples
you can't derive directly from the code I gave you. If something isn't clear in the code (for
example what happens if a field arrives empty), flag it as [data to verify] instead of making
it up.
Short link: wandabuilds.ai/p/wqZa

Come back tomorrow for another, or see all prompts.