agentleFS
PradnyeshpPradnyeshp/Claude-Skills/.claude/skills/api-docs/SKILL.md

api-docs

Skill2 starsChanged 4 months agoMITView on GitHub

Generate API documentation for the project's HTTP endpoints — an OpenAPI spec or a readable markdown reference — by reading the route handlers. Use when the user says "document the API", "generate OpenAPI", "write API docs", "list the endpoints", "create a Swagger spec", or "document these routes".

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use code-review and frontend-design.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Document the real contract,: not an idealized one. If validation or types define the schema (zod, pydantic, DTOs, JSON schema), reflect …

    line 21
  2. Distinctive:

    Document only endpoints that exist in the code.

    line 29
  3. Distinctive:

    After writing, list how many endpoints were documented and any handlers you skipped (and why).

    line 32

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Route discovery

!grep -rniE "@(Get|Post|Put|Patch|Delete|RequestMapping)|app\.(get|post|put|patch|delete)|router\.(get|post|put|patch|delete)|@app\.route|@router\.(get|post|put|patch|delete)|fastapi|express|flask" --include='*.*' -l . 2>/dev/null | grep -vE 'node_modules|\.git|dist|build|vendor|test|spec' | head -30

Instructions

Generate API documentation for the endpoints in this project (use the format and scope in $ARGUMENTS; default to markdown unless an OpenAPI/Swagger spec already exists or is requested).

Method

  1. Find the routes. From the files above, locate every endpoint definition. Identify the framework (Express, Fastify, FastAPI, Flask, Django REST, Spring, etc.) so you read handlers correctly.
  2. For each endpoint, extract: HTTP method and path (including path params), purpose, request shape (path/query params, headers, body schema), response shape and status codes, auth requirement, and notable errors. Read the handler body and any validation schema/DTO/serializer — don't guess the contract.
  3. Document the real contract, not an idealized one. If validation or types define the schema (zod, pydantic, DTOs, JSON schema), reflect those exactly. Note required vs optional fields and defaults.
  4. Choose the format:
    • OpenAPI (openapi.yaml/.json) when the project already has one, uses a spec-driven tool, or the user asks. Produce valid OpenAPI 3.x with shared component schemas for reused models.
    • Markdown otherwise — group endpoints by resource, with a request/response example per endpoint.
  5. Write to a sensible path (docs/api.md or openapi.yaml) unless the user names one. If a spec already exists, update it rather than replacing it.

Rules

  1. Document only endpoints that exist in the code. Don't invent routes, fields, or status codes.
  2. Mark anything you couldn't determine from the code (e.g. a response shape built dynamically) as "TBD — verify" rather than fabricating it.
  3. Include at least one concrete example request and response per endpoint or resource group.
  4. After writing, list how many endpoints were documented and any handlers you skipped (and why).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.