Skip to content

Guide · Agent skill

How to use the API Documentation Generator agent skill

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

The API Documentation Generator (skill name doc-generator) is an agent skill that tells an AI agent how to write structured API documentation from your source code. This guide is for developers who have not used agent skills before; it explains what the skill does, how to install it, how to ask for it in plain language, and what to check before publishing the output. By the end you will be able to add the skill to Claude Code or the Claude apps and request endpoint docs, example requests and OpenAPI specs.

API Documentation Generatorluongnv89/claude-howto · MIT

Quick start

  1. 1Check requirements. Confirm Python 3 is installed and that you are using Claude Code or another agent that can read SKILL.md and run local scripts.
  2. 2Download the ZIP. Download the doc-generator ZIP from the skill's page on this directory.
  3. 3Unzip into a skills folder. Unzip into ~/.claude/skills/ for personal use, or into the project's .claude/skills/ folder for one project.
  4. 4Or upload in the Claude apps. In the Claude apps, open Settings → Capabilities → Skills and upload the skill.
  5. 5Ask in plain language. Request API docs, an OpenAPI spec or endpoint examples, naming the files or endpoints in scope.
  6. 6Verify the output. Compare the generated endpoints, responses and error codes with the running code before you publish.

What does the doc-generator skill make the agent do?

Once installed, the agent produces structured API documentation from your code. For each endpoint, the documentation template covers a description, a parameter table, sample success and error responses, and copy-paste examples. The skill's outputs include OpenAPI/Swagger specifications, endpoint documentation, SDK usage examples, integration guides, error code references and authentication guides.

The package also includes a small Python helper, generate-docs.py. It reads a Python source file's syntax tree and pulls out functions whose names start with get_ or post_, along with their docstrings, parameters and return types, so they can be turned into a Markdown outline.

  • Endpoint descriptions and parameter tables
  • Sample 200 success and 404 error JSON responses
  • cURL, JavaScript and Python request examples
  • OpenAPI/Swagger specifications
  • Markdown outline from get_ and post_ functions via generate-docs.py

What do you need before you install it?

The skill needs Python 3 for generate-docs.py, which uses only the standard library ast module, so there are no packages to install for the helper. You also need Claude Code or another agent that can read SKILL.md and run local scripts. The package contains two files: generate-docs.py and SKILL.md.

  • Python 3
  • Claude Code, or another agent that can read SKILL.md and run local scripts
  • Package files: generate-docs.py and SKILL.md

How do you install the skill?

Download the ZIP from the skill's page on this directory and unzip it. Then place the folder in one of two locations: your personal skills folder, or a project-specific folder so that only that project uses the skill.

You can also upload the skill through the Claude apps. Open Settings, go to Capabilities, then Skills, and upload it there.

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

How do you trigger the skill with a natural request?

You do not need to type the skill name. 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.

Be specific about scope. Naming the files, endpoints or output format (for example, an OpenAPI spec) helps the agent pick the right parts of your code.

  • Document the REST endpoints in src/api/users.py with parameter tables and examples.
  • Generate an OpenAPI spec for the orders endpoints in this project.
  • Write an integration guide with cURL and Python examples for the get_ and post_ functions in billing.py.
  • Update the API docs for the endpoints I changed in this branch.
curl -X GET "https://api.example.com/api/v1/users/usr_123" \ -H "Authorization: Bearer YOUR_TOKEN"

What about safety, scripts and network access?

The skill runs scripts: generate-docs.py is a local Python script. According to the listing, it does not use the network. Review the script before you run it on sensitive code, as you would with any script an agent executes.

Treat the output as a draft. The example responses and endpoints are templates the agent writes, so they can drift from real behaviour. Check them against running code before publishing, especially the error codes and authentication details.

  • Runs local scripts: yes (generate-docs.py)
  • Uses network: no
  • Verify example responses and endpoints against the running API

What tips help you get better output?

The bundled helper only detects functions whose names start with get_ or post_, and only handles Python files. If your endpoints use other naming, or your project is not in Python, ask the agent to document the endpoints directly from the code and expect the helper to contribute less.

Give the agent the context it cannot see in the code, such as the authentication scheme or the base URL, and ask it to flag anything it could not confirm.

  • Name the file or folder to limit the scope
  • Say which outputs you want: endpoint docs, OpenAPI, or examples
  • Ask the agent to list any assumptions it made

What people use it for

  • Backend developers producing up-to-date documentation for REST endpoints after code changes.
  • Teams drafting an OpenAPI spec or integration guide for an API they maintain.
  • Developers onboarding SDK users who need copy-paste cURL, JavaScript or Python request examples.
  • Generating a Markdown outline of get_ and post_ functions in a Python codebase as a starting point.

Frequently asked questions

Is the API Documentation Generator skill free?

The skill is listed under the MIT licence, which is a permissive open-source licence. The listing does not state any price, so check the licence file in the package for the exact terms.

What do I need to run the doc-generator skill?

You need Python 3 for the bundled generate-docs.py script, which uses only the standard library. You also need Claude Code or another agent that can read SKILL.md and run local scripts.

Where do I install an agent skill like doc-generator?

For personal use, unzip the skill into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder. In the Claude apps, you can upload it under Settings → Capabilities → Skills.

Does the skill use the internet?

According to the listing, the skill does not use the network. It does run a local script, so review generate-docs.py before running it on sensitive code.

Why does the script not find all my endpoints?

The bundled helper only detects functions whose names start with get_ or post_, and only handles Python files. Endpoints with other naming or in other languages will not be picked up by that script.

Can I trust the generated examples without checking?

No. The example responses and endpoints are templates the agent writes, so they can differ from real behaviour. Verify them against running code 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

Choose doc-generator if you are a backend developer or a team that needs consistent REST endpoint docs, OpenAPI specs or copy-paste request examples for code you maintain, and you can check the output against the running API. Pick something else if you need verified reference docs with no manual review, your endpoints do not follow get_/post_ naming in Python, or you want a general-purpose writing tool.

Download the skill