Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/alexknowshtml/api2cli/skillnpx skills add alexknowshtml/api2cli --skill skillgit clone --depth 1 https://github.com/alexknowshtml/api2cliWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00101 | $0.02948 |
| Opus 5 | $0.00051 | $0.01474 |
| Sonnet 5 | $0.00020 | $0.00590 |
| Haiku 4.5 | $0.00010 | $0.00295 |
Grade A, and why
api2cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 337 lines — stays where its author put it; the contents beside it link to each section on GitHub.
api2cli
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.
Workflow
- Identify the API -- user provides a docs URL, a live API base URL, or a peek-api capture
- Discover endpoints -- parse docs, probe the API, or read a peek-api catalog
- Build endpoint catalog -- normalize all discovered endpoints into a standard format
- Generate CLI -- scaffold Commander.js CLI from the catalog
- User chooses destination -- scaffold into current project or create standalone project
- Generate skill -- create a SKILL.md that teaches Claude how to use the generated CLI
Step 1: Identify the API
Ask the user:
- "What API do you want to wrap? Share a docs URL, a base URL, or point me at a peek-api capture."
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:
- "What auth does this API use?" (API key, Bearer token, cookies, OAuth, none)
- "Do you want this CLI in your current project or as a standalone project?"
Step 2: Discover Endpoints
Use all applicable discovery paths. Combine results into a single catalog.
Path A: Docs Parsing
- Fetch the docs URL with WebFetch
- Extract endpoint information: method, path, description, parameters, request/response examples
- Look for pagination patterns, auth requirements, rate limit info
- Follow links to sub-pages for individual endpoint docs if the main page is an index
Path B: Active Probing
- Check well-known paths for API specs:
/.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)
- Try
OPTIONSon the base URL and common resource paths - Probe common REST patterns:
/api/v1/,/api/v2/,/v1/,/v2/ - For each discovered resource, try standard CRUD:
GET /resources,GET /resources/:id,POST /resources, etc. - Parse response shapes to understand data models
- Check response headers for rate limit info (
X-RateLimit-*,Retry-After) - Check for pagination patterns in responses (
next,cursor,page,offset)
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 337 lines · 101 tokens per session scan A 92918ec1d1ef
api2cli is a skill published in the GitHub repository alexknowshtml/api2cli (452 stars, last pushed 6mo ago), licensed MIT. It adds 101 tokens to every session and 2,948 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
completion-rule
大模型代码生成任务的自动自检与纠错规则。 在代码输出后强制执行功能自测、单元测试设计和 Linter 检查。 未通过则自动修正并循环,直到全部通过或达到最大迭代次数。 适用于大模型生成或修改代码且要求正确、可测试、规范的场景。 支持 Python、TypeScript、Go、Java,语言规则通过 references 加载。.
easy-api-mcp
Teaches AI agents how to connect to the open-wa hosted MCP surface via Easy API.
core-runtime
Teaches AI agents about open-wa session lifecycle, readiness expectations, and safe operation patterns.
express-docs
Comprehensive Express.js reference covering getting started, routing, middleware, error handling, the Application/Request/Response/Router API objects, template engines, debugging, database integration, security, performance, production patterns, and migration guides. Use whenever the user mentions Express, Express.js…
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI).…
medusa-development
Extend the open-source Medusa commerce platform with custom services, event subscribers, and API endpoints for unique business requirements.