Claude · Writing

Technical writing

Build docs around real reader tasks, write for a named reader, define jargon, and open with an example that runs.

Technical writing with Claude

Give it the real material

A technical doc has to match the product, and Claude can't know your product unless you show it. Attach the reference, source file or changelog, and tell Claude to use only that for facts. Anthropic's guide to reducing hallucinations suggests having Claude find a supporting quote for every claim, and remove what it can't support. For code, ask it to run the example where it can, and to tell you when it can't. Its sandbox has limited network access, which varies by plan.

Start from the reader

The cards here all begin with a named reader and their task. Say who's reading and what they'll do next. Use support tickets or search terms to find out what they need, lead with an example that works, and define terms at first use.

Frequently asked
Can Claude write documentation from my code?

Yes, if you give it the code. Paste the source or upload the file and describe the reader and their task. Tell it not to use any function or parameter that isn't in what you gave it, then run the examples yourself before publishing.

Does Claude test the code examples it writes?

Only if it actually runs them. With Code execution and file creation on, it can run code in a sandbox, but private packages and your internal systems usually aren't reachable from there. Treat a code block with no shown output as untested.

How do I get Claude to write for non-technical readers?

Describe the reader's job, what they already know and what they'll do after reading, rather than saying keep it simple. Ask for terms to be defined at first use. In Claude for Word, you can select one section and ask to simplify it for a non-technical audience.

Can Claude keep terminology consistent across a document?

Ask it to check. Anthropic's Word page gives prompts such as flagging inconsistent defined terms, and asking whether the same party is called different names. Keep a glossary in project knowledge, so that Claude uses your definitions.