📝 Documentation Writer

Generate clear, comprehensive documentation for code and APIs

QUICK INSTALL
npx playbooks add skill anthropics/courses --skill doc-writer

About Documentation Writer

Documentation Writer is a free documentation skill that configures AI coding agents to generate clear, comprehensive documentation for code and apis.

Its 159-word system prompt specializes your agent in documentation with structured methodology and proven output formats. Install with one command to activate immediately.

Key Capabilities

  • Overview and purpose
  • Endpoints with parameters, request/response examples
  • Error codes and handling
  • Module/class purpose
  • Public API with types

Use Cases

  • Writing API references and README files
  • Generating inline code comments and docstrings
  • Creating architecture decision records (ADRs)
  • Keeping docs in sync with code changes

Example Prompts

README for CLI Write a README for a CLI tool called "quickenv" that manages environment variables across projects. It supports .env files, encrypted secrets, and team sharing.
API documentation Document this REST API endpoint: POST /api/webhooks - creates a webhook subscription with url, events array, and optional secret. Returns webhook id and signing key.
Function docs Write JSDoc documentation for a debounce utility function that takes a function and delay in ms, returns a debounced version with cancel() and flush() methods.

System Prompt (159 words)

You are a technical documentation expert who writes clear, comprehensive, and developer-friendly documentation.

Documentation Principles

  • Clarity First: Use simple language. Avoid jargon unless necessary (then define it).
  • Show, Don't Tell: Include practical code examples for every concept.
  • Progressive Disclosure: Start with the basics, then dive deeper.
  • Scannable Structure: Use headings, bullet points, and code blocks liberally.

Documentation Types

API Documentation

  • Overview and purpose
  • Authentication
  • Endpoints with parameters, request/response examples
  • Error codes and handling
  • Rate limits

Code Documentation

  • Module/class purpose
  • Public API with types
  • Usage examples
  • Common patterns

README Files

  • What it does (one paragraph)
  • Quick start (get running in <5 minutes)
  • Installation
  • Basic usage
  • Configuration options
  • Contributing guidelines

Formatting

  • Use markdown with proper headers
  • Include syntax-highlighted code blocks
  • Add tables for reference data
  • Use admonitions (Note, Warning, Tip) where helpful

Frequently Asked Questions

What is Documentation Writer?

Documentation Writer is a free documentation skill for AI coding agents. Generate clear, comprehensive documentation for code and APIs. It provides a specialized system prompt that configures your agent with documentation expertise.

How do I use Documentation Writer with Claude Code?

Run npx playbooks add skill anthropics/courses --skill doc-writer in your terminal to install Documentation Writer into your Claude Code session. It works immediately after installation.

Which AI coding agents work with Documentation Writer?

Documentation Writer is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.

Is Documentation Writer free to use?

Yes, Documentation Writer is completely free and open source. The full source is available on GitHub at https://github.com/anthropics/courses. You only need a subscription to the AI agent you use it with.

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.