Code Documenter
zebbern/claude-code-guide
A skill your agent uses when adding docstrings, creating API documentation, or building documentation sites.
Generate a working CLI from any API, then wrap it in a Claude Code skill.
$ npx skills add alexknowshtml/api2cli --skill api2cli -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install alexknowshtml/api2cli api2cli --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/alexknowshtml/api2cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skill .claude/skills/api2cli && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "api2cli" agent skill from https://github.com/alexknowshtml/api2cli/tree/main/skill into .claude/skills/api2cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api2cli", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/alexknowshtml/api2cli/tree/main/skillType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add alexknowshtml/api2cli --skill api2cli -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install alexknowshtml/api2cli api2cli --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alexknowshtml/api2cli.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skill .agents/skills/api2cli && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "api2cli" agent skill from https://github.com/alexknowshtml/api2cli/tree/main/skill into .agents/skills/api2cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api2cli", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alexknowshtml/api2cli --skill api2cli -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install alexknowshtml/api2cli api2cli --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alexknowshtml/api2cli.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skill .cursor/skills/api2cli && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "api2cli" agent skill from https://github.com/alexknowshtml/api2cli/tree/main/skill into .cursor/skills/api2cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api2cli", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/alexknowshtml/api2cli.git --path skill--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add alexknowshtml/api2cli --skill api2cli -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install alexknowshtml/api2cli api2cli --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alexknowshtml/api2cli.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skill .gemini/skills/api2cli && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "api2cli" agent skill from https://github.com/alexknowshtml/api2cli/tree/main/skill into .gemini/skills/api2cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api2cli", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install alexknowshtml/api2cli api2cliInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add alexknowshtml/api2cli --skill api2cli -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/alexknowshtml/api2cli.git skills-src && mkdir -p .github/skills && cp -r skills-src/skill .github/skills/api2cli && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "api2cli" agent skill from https://github.com/alexknowshtml/api2cli/tree/main/skill into .github/skills/api2cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api2cli", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alexknowshtml/api2cli --skill api2cli -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install alexknowshtml/api2cli api2cli --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alexknowshtml/api2cli.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skill .opencode/skills/api2cli && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "api2cli" agent skill from https://github.com/alexknowshtml/api2cli/tree/main/skill into .opencode/skills/api2cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api2cli", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
api2cliGenerate a working CLI from any API, then wrap it in a Claude Code skill.
Api2cli is an agent skill from alexknowshtml/api2cli. Generate a working CLI from any API, then wrap it in a Claude Code skill. Point it at API docs, a live URL, or a peek-api capture and get a dual-mode Commander.js CLI (human + agent output) plus a ready-to-use skill folder. Use when user wants to wrap an API in a CLI, generate a CLI from API docs, turn an API into a command-line tool, scaffold a CLI from discovered endpoints, or create a skill for an API.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/agent-first-patterns.md`, `references/api-client-template.md` and `references/commander-patterns.md`).
It sits in Backend & APIs, covering Technical documentation, Skill authoring and OpenAPI specifications. It works with OpenAPI, Node.js and TypeScript. The repository describes itself as: Audience-aware CLI patterns for Node.js + Commander.js. Build CLIs for humans, AI agents, or both. The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit fde6f88. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npxgitnpmnodeclaudeFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
docs.stripe.comgithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
STRIPE_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Api2cli loads about 2.9k tokens when it runs, and up to ~7.3k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 913 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from alexknowshtml/api2cli at commit fde6f88, republished under its MIT licence (© alexknowshtml). 913 words, ~2,944 tokens.
.claude/skills/api2cli/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Generate a working Node.js CLI from any API, then wrap it in a Claude Code skill. Discovers endpoints, scaffolds a dual-mode Commander.js CLI with a full-featured API client, and creates a skill folder so Claude knows how to use it.
Ask the user:
Determine which discovery paths to use based on what they provide:
| Input | Discovery Path |
|---|---|
Docs URL (e.g., https://docs.stripe.com/api) | Docs parsing + active probing |
Base URL (e.g., https://api.example.com/v1) | Active probing |
peek-api capture dir (e.g., ./peek-api-linkedin/) | Read existing catalog |
| Live website URL | Suggest running peek-api first, then active probing |
Also ask:
Use all applicable discovery paths. Combine results into a single catalog.
/.well-known/openapi.json, /.well-known/openapi.yaml/openapi.json, /openapi.yaml, /swagger.json, /swagger.yaml/api-docs, /docs, /api/docs/graphql (with introspection query)OPTIONS on the base URL and common resource paths/api/v1/, /api/v2/, /v1/, /v2/GET /resources, GET /resources/:id, POST /resources, etc.X-RateLimit-*, Retry-After)next, cursor, page, offset)See references/discovery-strategies.md for detailed probing patterns.
endpoints.json, auth.json, CAPTURE.mdauth.jsonIf peek-api is not installed or no capture exists, tell the user:
To capture endpoints from a live site, install peek-api:
git clone https://github.com/alexknowshtml/peek-api
cd peek-api && npm install
node bin/cli.js https://example.comNormalize all discovered endpoints into this format:
interface EndpointCatalog {
service: string; // e.g., "stripe", "nexudus"
baseUrl: string;
auth: {
type: 'api-key' | 'bearer' | 'cookies' | 'oauth' | 'none';
headerName?: string; // e.g., "Authorization", "X-API-Key"
envVar: string; // e.g., "STRIPE_API_KEY"
};
pagination?: {
style: 'cursor' | 'offset' | 'page' | 'link-header';
paramName: string; // e.g., "starting_after", "offset", "page"
responseField: string; // e.g., "has_more", "next", "next_page_url"
};
rateLimit?: {
requests: number;
window: string; // e.g., "1m", "1h"
};
resources: ResourceGroup[];
}
interface ResourceGroup {
name: string; // e.g., "customers", "invoices"
description: string;
endpoints: Endpoint[];
}
interface Endpoint {
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
path: string; // e.g., "/v1/customers/:id"
description: string;
parameters: Parameter[];
requestBody?: object; // JSON schema or example
responseExample?: object;
}
interface Parameter {
name: string;
in: 'path' | 'query' | 'header';
required: boolean;
type: string;
description: string;
}Present the catalog to the user for review before generating:
Found 24 endpoints across 5 resources:
customers (6 endpoints): list, get, create, update, delete, search
invoices (5 endpoints): list, get, create, send, void
...
Ready to generate the CLI?Generate a dual-mode CLI using Commander.js. The CLI auto-detects human vs agent output via process.stdout.isTTY.
In-project scaffold:
scripts/
{service}.ts # Entry point with shebang
{service}/
lib/
client.ts # API client (auth, pagination, retry, caching)
envelope.ts # Agent JSON envelope helpers
commands/
{resource}.ts # One file per resource groupStandalone project:
{service}-cli/
package.json
tsconfig.json
bin/
{service}.ts # Entry point with shebang
src/
lib/
client.ts
envelope.ts
commands/
{resource}.tsSee these references for the patterns to apply during generation:
references/api-client-template.md -- API client class with pagination, retry, rate limiting, cachingreferences/agent-first-patterns.md -- JSON envelope, HATEOAS next_actions, context-safe output, error fix suggestionsreferences/commander-patterns.md -- Commander.js subcommands, global options, interactive prompts, colored outputEntry point ({service}.ts):
#!/usr/bin/env npx tsx--json (force JSON output), --verbose, --config <path>API client (lib/client.ts):
catalog.auth.envVar)Envelope helpers (lib/envelope.ts):
const isAgent = !process.stdout.isTTY;
function respond(command: string, result: any, nextActions: Action[] = []) {
if (isAgent) {
console.log(JSON.stringify({ ok: true, command, result, next_actions: nextActions }));
} else {
return result; // caller handles human rendering
}
}
function respondError(command: string, message: string, code: string, fix: string, nextActions: Action[] = []) {
if (isAgent) {
console.log(JSON.stringify({ ok: false, command, error: { message, code }, fix, next_actions: nextActions }));
} else {
console.error(`Error: ${message}`);
console.error(`Fix: ${fix}`);
}
process.exit(1);
}Command files (commands/{resource}.ts):
mycli customers list, mycli customers get <id>list commands: support --limit, --offset/--cursor, --status (if filterable)get commands: take ID as argumentcreate/update commands: accept --data <json> or individual --field flagsnext_actions for agent modefix suggestionsStandalone project extras:
package.json with commander, tsx as dependencies, bin field pointing to entrytsconfig.json for TypeScript.env.example with the required env varAfter generating the CLI:
Create a Claude Code skill folder that teaches Claude how to use the generated CLI. This is the final step -- it turns the CLI into something any Claude session can pick up and use without reading the code.
.claude/skills/{service}/
SKILL.md # Skill instructionsGenerate a SKILL.md with this structure:
---
name: {service}
description: Interact with the {Service} API via CLI. Use when user wants to
{list of actions based on discovered resources, e.g., "list customers,
create invoices, check order status"}. Commands: {service} {resource} {action}.
---
# {Service} CLI
CLI wrapper for the {Service} API.
## Setup
Set the `{SERVICE_ENV_VAR}` environment variable:
\`\`\`bash
export {SERVICE_ENV_VAR}=your-api-key-here
\`\`\`
## Commands
{For each resource group, list commands with examples:}
### {Resource}
\`\`\`bash
# List {resources}
npx tsx {path/to/cli}.ts {resource} list
# Get a specific {resource}
npx tsx {path/to/cli}.ts {resource} get <id>
# Create a {resource}
npx tsx {path/to/cli}.ts {resource} create --field value
\`\`\`
## Common Workflows
{Generate 2-3 practical workflows combining multiple commands:}
### Example: {Workflow name}
\`\`\`bash
# Step 1: Find the customer
npx tsx {path/to/cli}.ts customers list --status=active
# Step 2: Get their invoices
npx tsx {path/to/cli}.ts invoices list --customer-id=abc123
\`\`\`
## Agent Usage
When piped, all commands return JSON with `next_actions`:
\`\`\`bash
npx tsx {path/to/cli}.ts {resource} list | cat
\`\`\`--help. Focus on what Claude needs to know that it can't infer.After generating both the CLI and the skill:
CLI generated at {cli_path}
Skill generated at .claude/skills/{service}/SKILL.md
To use the CLI directly:
npx tsx {cli_path} # See all commands
npx tsx {cli_path} customers list # List customers
Claude will now automatically use this skill when you ask about {service}.references/discovery-strategies.md -- Detailed probing patterns, well-known paths, GraphQL introspection, response parsingreferences/api-client-template.md -- Full API client class with pagination, retry, rate limiting, cachingreferences/agent-first-patterns.md -- Agent JSON envelope, HATEOAS, context-safe output, error handlingreferences/commander-patterns.md -- Commander.js subcommands, nested commands, interactive prompts, colored output, config files, testing© alexknowshtml, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references) in skill of alexknowshtml/api2cli.
Open the folder on GitHubat commit fde6f88
Api2cli next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Api2cli this skillalexknowshtml/api2cli | 455 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Code Documenterzebbern/claude-code-guide | 4.7k | — | ~1k | Automated safety check: Pass | MIT | |
| Spiceflowremorses/spiceflow | 167 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Code DocumenterJeffallan/claude-skills | 12k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Generating Documentationancoleman/ai-design-components | 526 | — | ~3k | Automated safety check: Pass | MIT | |
| CLI Creatorhuangruiteng/CS-Notes | 4k | 2 repos | ~2.7k | Automated safety check: Pass | Apache-2.0 |
zebbern/claude-code-guide
A skill your agent uses when adding docstrings, creating API documentation, or building documentation sites.
remorses/spiceflow
Spiceflow is a super simple, fast, and type-safe API and React Server Components framework for TypeScript.
Jeffallan/claude-skills
Generates and validates docstrings, OpenAPI specs, JSDoc annotations and user guides, running every code example through a real compiler or linter before reporting coverage.
ancoleman/ai-design-components
Generate comprehensive technical documentation including API docs (OpenAPI/Swagger), code documentation (TypeDoc/Sphinx), documentation sites (Docusaurus/MkDocs), Architecture Decision Records…
huangruiteng/CS-Notes
Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script.
wshobson/agents
Create, validate and maintain OpenAPI 3.1 specs for REST APIs, whether designed first or generated from existing code, and use them for docs and client SDKs.
Works with
Categories
Generate a working CLI from any API, then wrap it in a Claude Code skill. Api2cli is an agent skill from alexknowshtml/api2cli. Generate a working CLI from any API, then wrap it in a Claude Code skill.
Api2cli fits situations like: user wants to wrap an API in a CLI; generate a CLI from API docs; turn an API into a command-line tool; scaffold a CLI from discovered endpoints.
Run `npx skills add alexknowshtml/api2cli --skill api2cli -a claude-code`. Or copy the skill folder (skill in alexknowshtml/api2cli) into .claude/skills/api2cli in your project. Claude Code loads it when a task matches its description.
Run `npx skills add alexknowshtml/api2cli --skill api2cli -a codex`. Or copy the skill folder (skill in alexknowshtml/api2cli) into .agents/skills/api2cli in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alexknowshtml/api2cli --skill api2cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api2cli, .gemini/skills/api2cli, .github/skills/api2cli and .opencode/skills/api2cli in your project.
Going by SKILL.md and its folder, Api2cli needs the command-line tools its instructions call (npx, git, npm, node and claude) and credentials named STRIPE_API_KEY. Our summary lists: Node.js; A credential in STRIPE_API_KEY.
SKILL.md names 2 domains. In commands or code: docs.stripe.com and github.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Api2cli is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Api2cli: Code Documenter (zebbern/claude-code-guide, 4.7k stars), Spiceflow (remorses/spiceflow, 167 stars), Code Documenter (Jeffallan/claude-skills, 12k stars) and Generating Documentation (ancoleman/ai-design-components, 526 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
alexknowshtml (a GitHub user) maintains it in alexknowshtml/api2cli, which has 455 GitHub stars. The repository was last updated on February 20, 2026.
Source: alexknowshtml/api2cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.