Skip to content

Guide · Agent skill

How to use the API Doc Generator agent skill (doc-generator)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The doc-generator skill is an agent skill from the claude-howto project that tells an AI agent how to write API documentation from your source code. It is aimed at backend developers who need endpoint reference docs, a first draft of OpenAPI specs, or SDK and authentication guides. After reading this guide you will know how to install the skill, how to ask for documentation in plain language, and which results to check by hand before publishing.

API Doc Generatorluongnv89/claude-howto · MIT

Quick start

  1. 1Download the ZIP. Get the doc-generator ZIP from this page.
  2. 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder.
  3. 3Or upload in the Claude apps. Go to Settings → Capabilities → Skills and upload the skill.
  4. 4Ask for docs in plain language. Name the endpoints or files and ask for API documentation or an OpenAPI spec.
  5. 5Check the draft against the code. Verify routes, parameters, responses and error codes before sharing.

What the doc-generator skill makes the agent do

Once the skill is loaded, the agent writes API documentation following a fixed template. For each endpoint it produces a description, a parameter table, success and error responses with JSON examples, and cURL, JavaScript and Python examples.

The skill also covers OpenAPI/Swagger specifications, SDK usage examples, integration guides, error code references and authentication guides.

  • Endpoint docs: description, parameters, responses, examples
  • OpenAPI/Swagger specifications
  • SDK usage examples and integration guides
  • Error code references and authentication guides

Install the doc-generator skill

Download the ZIP for this skill from this page and unzip it. You can put the skill in your personal skills folder at ~/.claude/skills/, or in a single project's .claude/skills/ folder if you want it only for that project.

If you use the Claude apps instead, upload the skill under Settings → Capabilities → Skills.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into the project's .claude/skills/
  • Claude apps: Settings → Capabilities → Skills, then upload

Trigger the skill with natural requests

You do not need a special command. The skill's description tells the agent to use it when you create or update API documentation, generate OpenAPI specs, or mention API docs, endpoints or documentation. Ask in plain language and name the code you want documented.

Good requests name the files or endpoints involved, for example the handlers in a particular folder or one route you want an example for.

  • "Write API docs for the endpoints in src/api/users.py"
  • "Generate an OpenAPI spec for our REST endpoints"
  • "Document the error codes returned by the orders service"

Run the bundled script (optional)

The skill includes generate-docs.py. It uses Python's built-in ast module to parse source files and look for functions whose names start with get_ or post_. It collects their docstrings, parameters and return annotations and writes a basic Markdown document.

The script needs Python 3. You do not need it if you only want the agent to write the docs from its own reading of the code.

  • Requires Python 3
  • Only parses Python files
  • Only picks up functions named get_ or post_, so most endpoints in other frameworks will be missed

Safety notes: scripts and network

The skill runs scripts, so read generate-docs.py before running it on code you care about. According to the listing, the skill does not use the network.

The example requests in the template use placeholder values such as YOUR_TOKEN and api.example.com. Replace them with real values yourself and do not paste real credentials into the docs.

  • Runs scripts: yes (generate-docs.py)
  • Uses network: no
  • Check placeholders and remove any real secrets before publishing

Review the output before you publish

The template examples are illustrative. The agent may invent response shapes or routes that are not in your code, so compare every endpoint, field and status code against the source. Treat the output as a first draft you edit by hand.

  • Check every route and HTTP method against the code
  • Check response fields and error codes
  • Edit the OpenAPI draft before using it with tools

What people use it for

  • Drafting reference docs for a internal REST API's endpoints
  • Producing a first-draft OpenAPI spec to edit by hand
  • Writing cURL, JavaScript and Python examples for an SDK guide
  • Creating an error code reference for a service
  • Writing an authentication guide with example Bearer token requests

Frequently asked questions

How do I install the doc-generator agent skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.

Is the doc-generator skill free?

The skill is released under the MIT licence, as listed on this page. The source does not mention pricing, so check the Claude product you use for its own terms.

What do I need to run doc-generator?

The agent skill itself needs no special setup. Python 3 is only required if you run the bundled generate-docs.py script.

Does doc-generator work with non-Python code?

The bundled script only parses Python and only finds functions named get_ or post_, so it will miss most endpoints in other languages or frameworks. The agent can still write docs from code it reads, but you must verify the output.

Does the skill use the internet or run scripts?

The listing says the skill runs scripts and does not use the network. Read generate-docs.py before running it on sensitive code.

Can I trust the generated API docs without review?

No. The template examples are illustrative and the agent may invent response shapes or routes that are not in the code, so review every endpoint before publishing.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use doc-generator if you are a backend developer who wants a consistent first draft of endpoint docs, OpenAPI specs or SDK examples to edit by hand. Pick another tool if you need accurate, publish-ready docs without review, or if your codebase is mainly not Python, since the bundled script will miss most endpoints.

Download the skill