# API Docs From Code

> Generates endpoint docs from the actual routes, validators and serializers, so the docs match what the code does. Endpoint, headers, params, request and response examples, error cases and notes for frontend devs.

API Docs From Code is a free AI agent skill on Agensi by William, in Technical Documentation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [William](https://www.agensi.io/creators/william-1)
- Category: [Technical Documentation](https://www.agensi.io/skills/technical-documentation)
- Version: 1.0
- Last updated: 2026-11-24
- Security: scan passed (2026-11-24); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/api-docs-from-code
- Tags: technical-documentation, apis-backend, code-quality-review, api-docs, documentation, rest

## About this skill

Docs written from memory drift; docs written from the code don't. For each endpoint it reads the route, the request validation, the service behaviour, the serializer and the error rendering, then writes Markdown with header and parameter tables, request and response examples, an error table with real HTTP statuses, and notes for frontend developers.

It follows your repo's existing docs style when there is one. Bugs it spots are reported to you in chat, not written into the docs.

**Works with:** Rails, Express/Nest/Fastify, FastAPI/Flask/Django, Go, Spring, Laravel.

## Requires

Nothing beyond your AI agent.

## Known limitations

Outputs Markdown files in your repo. Documents what the code does today; it doesn't change application code.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the API Docs From Code skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does API Docs From Code do?

Generates endpoint docs from the actual routes, validators and serializers, so the docs match what the code does. Endpoint, headers, params, request and response examples, error cases and notes for frontend devs.

### Which AI agents support API Docs From Code?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use API Docs From Code?

Connect your AI agent to Agensi through MCP, then ask it to use API Docs From Code on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
