api-docs — Claude Code skill: what it does, how to install
Skill that turns TypeScript and JavaScript source into documentation: it finds public exports, reads existing JSDoc, writes the missing comments and emits OpenAPI 3.0 for HTTP endpoints.
npx skills add ruvnet/ruflo --skill api-docs -a claude-codeWhat api-docs does
The skill walks a TypeScript or JavaScript source tree and collects the public surface: functions, classes, interfaces. Then it reads the JSDoc already in the code (@param, @returns, @throws, @example) and fills in what is missing. HTTP endpoints get a separate pass that produces OpenAPI 3.0 definitions.
Four steps: scan exports, parse JSDoc, generate the gaps, build the spec. The conventions are strict. Every public export must carry a comment, @param and @returns need a type and a description, known error conditions go into @throws, and non-obvious usage gets an @example. Document things differently in your codebase and the skill will rewrite files to match its own style.
The source path is passed as the argument. Dispatch runs through the MCP tool mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch with the document trigger, and npx * is the only Bash command allowed. No connected MCP server means that step never fires, so check it first when a run looks stuck.
What it helps with
- map every public export in an unfamiliar package
- write JSDoc for functions that have none
- turn existing HTTP routes into an OpenAPI 3.0 spec
- verify that
@paramand@returnscarry a type and a description - document thrown errors and non-obvious usage examples
Example prompts for the agent
- Run api-docs on `src/api` and list the exports that have no JSDoc.
- Generate an OpenAPI 3.0 spec for the HTTP endpoints under `src/routes`.
- Add `@throws` to every function in `packages/core/src` that can throw.
How to install api-docs
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill api-docs -a claude-code2Manually: put the files in place
~/.claude/skills/api-docs/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/api-docs/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill api-docs -a codex2Manually: put the files in place
.agents/skills/api-docs/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill api-docs -a cursor2Manually: put the files in place
.cursor/skills/api-docs/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo api-docs2Manually: put the files in place
.github/skills/api-docs/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill api-docs -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-docs/skills/api-docsManually: put the files in place
.devin/skills/api-docs/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill api-docs -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about api-docs
How do I install api-docs in Claude Code?
Run npx skills add ruvnet/ruflo --skill api-docs -a claude-code. The skill lands at ~/.claude/skills/api-docs/SKILL.md.
What does api-docs do?
It scans exports in TypeScript and JavaScript source, parses the JSDoc annotations already there, adds the missing ones, and generates OpenAPI 3.0 definitions for HTTP endpoints.
What does it need to work?
The dispatch step calls the MCP tool mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch with the document trigger, so that MCP server has to be connected. The skill itself ships in the ruvnet/ruflo repository under the MIT license.
Source text
SKILL.md · MIT
---
name: api-docs
description: Generate API documentation from source code with JSDoc and OpenAPI support
argument-hint: "<source-path>"
allowed-tools: Bash(npx *) mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch Read Write Grep
---
Generate API documentation from TypeScript/JavaScript source:
1. **Scan exports**: Find all public functions, classes, and interfaces
2. **Extract JSDoc**: Parse `@param`, `@returns`, `@throws`, `@example` annotations
3. **Generate missing docs**: Add JSDoc for undocumented public APIs
4. **OpenAPI spec**: For HTTP endpoints, generate OpenAPI 3.0 definitions
Dispatch via MCP: `mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch({ trigger: "document", context: "api" })`
Conventions:
- Every public export must have a JSDoc comment
- Include `@param` with type and description
- Include `@returns` with type and description
- Include `@throws` for known error conditions
- Include `@example` for non-obvious usage
© ruvnet · MIT · ruvnet/ruflo