# Write documentation, a README, or API docs

Generates clear technical documentation from your code or notes.

- Topic: Software Development
- Framework: RCTF
- Level: Standard
- Tags: Coding, Writing, Write, Code, Fill-in Template
- Source: https://www.thinkwithprompt.com/prompts/write-documentation-a-readme-or-api-docs

## Prompt

```text
Role: Act as an engineer writing clear developer documentation.

Context: The API / module (code or signatures): [CODE]. Who will use it and their level: [AUDIENCE]. Common tasks they need to accomplish: [COMMON_TASKS]. Conventions / doc style: [DOC_STYLE]. Things that trip people up: [GOTCHAS].

Task: Produce: a reference section (each endpoint/function: purpose, parameters with types and constraints, return value, errors, and one example); a short how-to guide covering the common tasks with runnable examples; and a 'gotchas' section. Keep it accurate to the code provided.

Format: Sections: Reference | How-to guide | Gotchas. Code and examples in fenced blocks.
```

## What to fill in

- CODE
- AUDIENCE
- COMMON_TASKS
- DOC_STYLE
- GOTCHAS

Free to copy and use. From ThinkWithPrompt (https://www.thinkwithprompt.com/), a library of 2,663 curated AI prompts.
