[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AW1KGPFA4AKY47SFASRFSZ":3,"skill-same:01M7AW1KGPFA4AKY47SFASRFSZ":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":46},"01M7AW1KGPFA4AKY47SFASRFSZ","api2cli",null,"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.","barkleesanders\u002Fclaude-code-starter","barkleesanders","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F30680901?v=4","01M7AW019CGBYWDA8MFJEN1JXC","Barklee Sanders","01M7AW01A5H994ASJ2QZPW67AV",4,"MIT","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fapi2cli\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: api2cli\nuser-invocable: true\ndescription: 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.\n---\n\n# api2cli\n\nGenerate 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.\n\n## Workflow\n\n1. **Identify the API** -- user provides a docs URL, a live API base URL, or a peek-api capture\n2. **Discover endpoints** -- parse docs, probe the API, or read a peek-api catalog\n3. **Build endpoint catalog** -- normalize all discovered endpoints into a standard format\n4. **Generate CLI** -- scaffold Commander.js CLI from the catalog\n5. **User chooses destination** -- scaffold into current project or create standalone project\n6. **Generate skill** -- create a SKILL.md that teaches Claude how to use the generated CLI\n\n## Step 1: Identify the API\n\nAsk the user:\n- \"What API do you want to wrap? Share a docs URL, a base URL, or point me at a peek-api capture.\"\n\nDetermine which discovery paths to use based on what they provide:\n\n| Input | Discovery Path |\n|-------|---------------|\n| Docs URL (e.g., `https:\u002F\u002Fdocs.stripe.com\u002Fapi`) | Docs parsing + active probing |\n| Base URL (e.g., `https:\u002F\u002Fapi.example.com\u002Fv1`) | Active probing |\n| peek-api capture dir (e.g., `.\u002Fpeek-api-linkedin\u002F`) | Read existing catalog |\n| Live website URL | Suggest running peek-api first, then active probing |\n\nAlso ask:\n- \"What auth does this API use?\" (API key, Bearer token, cookies, OAuth, none)\n- \"Do you want this CLI in your current project or as a standalone project?\"\n\n## Step 2: Discover Endpoints\n\nUse all applicable discovery paths. Combine results into a single catalog.\n\n### Path A: Docs Parsing\n\n1. Fetch the docs URL with WebFetch\n2. Extract endpoint information: method, path, description, parameters, request\u002Fresponse examples\n3. Look for pagination patterns, auth requirements, rate limit info\n4. Follow links to sub-pages for individual endpoint docs if the main page is an index\n\n### Path B: Active Probing\n\n1. Check well-known paths for API specs:\n   - `\u002F.well-known\u002Fopenapi.json`, `\u002F.well-known\u002Fopenapi.yaml`\n   - `\u002Fopenapi.json`, `\u002Fopenapi.yaml`, `\u002Fswagger.json`, `\u002Fswagger.yaml`\n   - `\u002Fapi-docs`, `\u002Fdocs`, `\u002Fapi\u002Fdocs`\n   - `\u002Fgraphql` (with introspection query)\n2. Try `OPTIONS` on the base URL and common resource paths\n3. Probe common REST patterns: `\u002Fapi\u002Fv1\u002F`, `\u002Fapi\u002Fv2\u002F`, `\u002Fv1\u002F`, `\u002Fv2\u002F`\n4. For each discovered resource, try standard CRUD: `GET \u002Fresources`, `GET \u002Fresources\u002F:id`, `POST \u002Fresources`, etc.\n5. Parse response shapes to understand data models\n6. Check response headers for rate limit info (`X-RateLimit-*`, `Retry-After`)\n7. Check for pagination patterns in responses (`next`, `cursor`, `page`, `offset`)\n\nSee `references\u002Fdiscovery-strategies.md` for detailed probing patterns.\n\n### Path C: peek-api Capture\n\n1. Read the capture directory: `endpoints.json`, `auth.json`, `CAPTURE.md`\n2. Parse endpoints into the standard catalog format\n3. Extract auth headers and cookies from `auth.json`\n\nIf peek-api is not installed or no capture exists, tell the user:\n```\nTo capture endpoints from a live site, install peek-api:\n  git clone https:\u002F\u002Fgithub.com\u002Falexknowshtml\u002Fpeek-api\n  cd peek-api && npm install\n  node bin\u002Fcli.js https:\u002F\u002Fexample.com\n```\n\n## Step 3: Build Endpoint Catalog\n\nNormalize all discovered endpoints into this format:\n\n```typescript\ninterface EndpointCatalog {\n  service: string;           \u002F\u002F e.g., \"stripe\", \"nexudus\"\n  baseUrl: string;\n  auth: {\n    type: 'api-key' | 'bearer' | 'cookies' | 'oauth' | 'none';\n    headerName?: string;     \u002F\u002F e.g., \"Authorization\", \"X-API-Key\"\n    envVar: string;          \u002F\u002F e.g., \"STRIPE_API_KEY\"\n  };\n  pagination?: {\n    style: 'cursor' | 'offset' | 'page' | 'link-header';\n    paramName: string;       \u002F\u002F e.g., \"starting_after\", \"offset\", \"page\"\n    responseField: string;   \u002F\u002F e.g., \"has_more\", \"next\", \"next_page_url\"\n  };\n  rateLimit?: {\n    requests: number;\n    window: string;          \u002F\u002F e.g., \"1m\", \"1h\"\n  };\n  resources: ResourceGroup[];\n}\n\ninterface ResourceGroup {\n  name: string;              \u002F\u002F e.g., \"customers\", \"invoices\"\n  description: string;\n  endpoints: Endpoint[];\n}\n\ninterface Endpoint {\n  method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n  path: string;              \u002F\u002F e.g., \"\u002Fv1\u002Fcustomers\u002F:id\"\n  description: string;\n  parameters: Parameter[];\n  requestBody?: object;      \u002F\u002F JSON schema or example\n  responseExample?: object;\n}\n\ninterface Parameter {\n  name: string;\n  in: 'path' | 'query' | 'header';\n  required: boolean;\n  type: string;\n  description: string;\n}\n```\n\nPresent the catalog to the user for review before generating:\n```\nFound 24 endpoints across 5 resources:\n  customers (6 endpoints): list, get, create, update, delete, search\n  invoices (5 endpoints): list, get, create, send, void\n  ...\nReady to generate the CLI?\n```\n\n## Step 4: Generate CLI\n\nGenerate a dual-mode CLI using Commander.js. The CLI auto-detects human vs agent output via `process.stdout.isTTY`.\n\n### File Structure\n\n**In-project scaffold:**\n```\nscripts\u002F\n  {service}.ts                    # Entry point with shebang\n  {service}\u002F\n    lib\u002F\n      client.ts                   # API client (auth, pagination, retry, caching)\n      envelope.ts                 # Agent JSON envelope helpers\n    commands\u002F\n      {resource}.ts               # One file per resource group\n```\n\n**Standalone project:**\n```\n{service}-cli\u002F\n  package.json\n  tsconfig.json\n  bin\u002F\n    {service}.ts                  # Entry point with shebang\n  src\u002F\n    lib\u002F\n      client.ts\n      envelope.ts\n    commands\u002F\n      {resource}.ts\n```\n\n### Code Generation Patterns\n\nSee these references for the patterns to apply during generation:\n\n- `references\u002Fapi-client-template.md` -- API client class with pagination, retry, rate limiting, caching\n- `references\u002Fagent-first-patterns.md` -- JSON envelope, HATEOAS next_actions, context-safe output, error fix suggestions\n- `references\u002Fcommander-patterns.md` -- Commander.js subcommands, global options, interactive prompts, colored output\n\n### Key Generation Rules\n\n**Entry point (`{service}.ts`):**\n- Shebang: `#!\u002Fusr\u002Fbin\u002Fenv npx tsx`\n- Self-documenting root command (no args → prints full command tree as JSON)\n- Global options: `--json` (force JSON output), `--verbose`, `--config \u003Cpath>`\n\n**API client (`lib\u002Fclient.ts`):**\n- Constructor takes base URL + auth config\n- Auth from env var (name based on `catalog.auth.envVar`)\n- Built-in pagination matching the API's pattern\n- Retry with exponential backoff for 5xx and 429 errors\n- Rate limiting based on discovered limits\n- Optional response caching\n\n**Envelope helpers (`lib\u002Fenvelope.ts`):**\n```typescript\nconst isAgent = !process.stdout.isTTY;\n\nfunction respond(command: string, result: any, nextActions: Action[] = []) {\n  if (isAgent) {\n    console.log(JSON.stringify({ ok: true, command, result, next_actions: nextActions }));\n  } else {\n    return result; \u002F\u002F caller handles human rendering\n  }\n}\n\nfunction respondError(command: string, message: string, code: string, fix: string, nextActions: Action[] = []) {\n  if (isAgent) {\n    console.log(JSON.stringify({ ok: false, command, error: { message, code }, fix, next_actions: nextActions }));\n  } else {\n    console.error(`Error: ${message}`);\n    console.error(`Fix: ${fix}`);\n  }\n  process.exit(1);\n}\n```\n\n**Command files (`commands\u002F{resource}.ts`):**\n- One file per resource group\n- Each endpoint becomes a subcommand: `mycli customers list`, `mycli customers get \u003Cid>`\n- `list` commands: support `--limit`, `--offset`\u002F`--cursor`, `--status` (if filterable)\n- `get` commands: take ID as argument\n- `create`\u002F`update` commands: accept `--data \u003Cjson>` or individual `--field` flags\n- Every command includes contextual `next_actions` for agent mode\n- Errors include `fix` suggestions\n\n**Standalone project extras:**\n- `package.json` with `commander`, `tsx` as dependencies, `bin` field pointing to entry\n- `tsconfig.json` for TypeScript\n- `.env.example` with the required env var\n\n## Step 5: Verify\n\nAfter generating the CLI:\n\n1. **Verify it runs:** Execute with no args, confirm the self-documenting root works\n2. **Test one endpoint:** Pick a simple GET endpoint, run it, verify output\n3. **Move on to Step 6** to wrap the CLI in a skill\n\n## Step 6: Generate Skill\n\nCreate 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.\n\n### Skill Structure\n\n```\n.claude\u002Fskills\u002F{service}\u002F\n  SKILL.md                    # Skill instructions\n```\n\n### SKILL.md Template\n\nGenerate a SKILL.md with this structure:\n\n```markdown\n---\nname: {service}\ndescription: Interact with the {Service} API via CLI. Use when user wants to\n  {list of actions based on discovered resources, e.g., \"list customers,\n  create invoices, check order status\"}. Commands: {service} {resource} {action}.\n---\n\n# {Service} CLI\n\nCLI wrapper for the {Service} API.\n\n## Setup\n\nSet the `{SERVICE_ENV_VAR}` environment variable:\n\\`\\`\\`bash\nexport {SERVICE_ENV_VAR}=your-api-key-here\n\\`\\`\\`\n\n## Commands\n\n{For each resource group, list commands with examples:}\n\n### {Resource}\n\n\\`\\`\\`bash\n# List {resources}\nnpx tsx {path\u002Fto\u002Fcli}.ts {resource} list\n\n# Get a specific {resource}\nnpx tsx {path\u002Fto\u002Fcli}.ts {resource} get \u003Cid>\n\n# Create a {resource}\nnpx tsx {path\u002Fto\u002Fcli}.ts {resource} create --field value\n\\`\\`\\`\n\n## Common Workflows\n\n{Generate 2-3 practical workflows combining multiple commands:}\n\n### Example: {Workflow name}\n\\`\\`\\`bash\n# Step 1: Find the customer\nnpx tsx {path\u002Fto\u002Fcli}.ts customers list --status=active\n\n# Step 2: Get their invoices\nnpx tsx {path\u002Fto\u002Fcli}.ts invoices list --customer-id=abc123\n\\`\\`\\`\n\n## Agent Usage\n\nWhen piped, all commands return JSON with `next_actions`:\n\\`\\`\\`bash\nnpx tsx {path\u002Fto\u002Fcli}.ts {resource} list | cat\n\\`\\`\\`\n```\n\n### Key Rules for Skill Generation\n\n1. **Description is critical** -- include specific trigger phrases and list the actions the CLI supports. This is what Claude reads to decide when to use the skill.\n2. **Include real command examples** -- use the actual CLI path and real subcommand names from the generated CLI.\n3. **Generate practical workflows** -- combine multiple commands into realistic multi-step scenarios based on how the API's resources relate to each other.\n4. **Keep it lean** -- the skill should be a quick reference, not a restatement of `--help`. Focus on what Claude needs to know that it can't infer.\n\n### Tell the User\n\nAfter generating both the CLI and the skill:\n\n```\nCLI generated at {cli_path}\nSkill generated at .claude\u002Fskills\u002F{service}\u002FSKILL.md\n\nTo use the CLI directly:\n  npx tsx {cli_path}                           # See all commands\n  npx tsx {cli_path} customers list            # List customers\n\nClaude will now automatically use this skill when you ask about {service}.\n```\n\n## Reference Files\n\n- `references\u002Fdiscovery-strategies.md` -- Detailed probing patterns, well-known paths, GraphQL introspection, response parsing\n- `references\u002Fapi-client-template.md` -- Full API client class with pagination, retry, rate limiting, caching\n- `references\u002Fagent-first-patterns.md` -- Agent JSON envelope, HATEOAS, context-safe output, error handling\n- `references\u002Fcommander-patterns.md` -- Commander.js subcommands, nested commands, interactive prompts, colored output, config files, testing\n","# api2cli\n\nGenerate 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.\n\n## Workflow\n\n1. **Identify the API** -- user provides a docs URL, a live API base URL, or a peek-api capture\n2. **Discover endpoints** -- parse docs, probe the API, or read a peek-api catalog\n3. **Build endpoint catalog** -- normalize all discovered endpoints into a standard format\n4. **Generate CLI** -- scaffold Commander.js CLI from the catalog\n5. **User chooses destination** -- scaffold into current project or create standalone project\n6. **Generate skill** -- create a SKILL.md that teaches Claude how to use the generated CLI\n\n## Step 1: Identify the API\n\nAsk the user:\n- \"What API do you want to wrap? Share a docs URL, a base URL, or point me at a peek-api capture.\"\n\nDetermine which discovery paths to use based on what they provide:\n\n| Input | Discovery Path |\n|-------|---------------|\n| Docs URL (e.g., `https:\u002F\u002Fdocs.stripe.com\u002Fapi`) | Docs parsing + active probing |\n| Base URL (e.g., `https:\u002F\u002Fapi.example.com\u002Fv1`) | Active probing |\n| peek-api capture dir (e.g., `.\u002Fpeek-api-linkedin\u002F`) | Read existing catalog |\n| Live website URL | Suggest running peek-api first, then active probing |\n\nAlso ask:\n- \"What auth does this API use?\" (API key, Bearer token, cookies, OAuth, none)\n- \"Do you want this CLI in your current project or as a standalone project?\"\n\n## Step 2: Discover Endpoints\n\nUse all applicable discovery paths. Combine results into a single catalog.\n\n### Path A: Docs Parsing\n\n1. Fetch the docs URL with WebFetch\n2. Extract endpoint information: method, path, description, parameters, request\u002Fresponse examples\n3. Look for pagination patterns, auth requirements, rate limit info\n4. Follow links to sub-pages for individual endpoint docs if the main page is an index\n\n### Path B: Active Probing\n\n1. Check well-known paths for API specs:\n   - `\u002F.well-known\u002Fopenapi.json`, `\u002F.well-known\u002Fopenapi.yaml`\n   - `\u002Fopenapi.json`, `\u002Fopenapi.yaml`, `\u002Fswagger.json`, `\u002Fswagger.yaml`\n   - `\u002Fapi-docs`, `\u002Fdocs`, `\u002Fapi\u002Fdocs`\n   - `\u002Fgraphql` (with introspection query)\n2. Try `OPTIONS` on the base URL and common resource paths\n3. Probe common REST patterns: `\u002Fapi\u002Fv1\u002F`, `\u002Fapi\u002Fv2\u002F`, `\u002Fv1\u002F`, `\u002Fv2\u002F`\n4. For each discovered resource, try standard CRUD: `GET \u002Fresources`, `GET \u002Fresources\u002F:id`, `POST \u002Fresources`, etc.\n5. Parse response shapes to understand data models\n6. Check response headers for rate limit info (`X-RateLimit-*`, `Retry-After`)\n7. Check for pagination patterns in responses (`next`, `cursor`, `page`, `offset`)\n\nSee `references\u002Fdiscovery-strategies.md` for detailed probing patterns.\n\n### Path C: peek-api Capture\n\n1. Read the capture directory: `endpoints.json`, `auth.json`, `CAPTURE.md`\n2. Parse endpoints into the standard catalog format\n3. Extract auth headers and cookies from `auth.json`\n\nIf peek-api is not installed or no capture exists, tell the user:\n```\nTo capture endpoints from a live site, install peek-api:\n  git clone https:\u002F\u002Fgithub.com\u002Falexknowshtml\u002Fpeek-api\n  cd peek-api && npm install\n  node bin\u002Fcli.js https:\u002F\u002Fexample.com\n```\n\n## Step 3: Build Endpoint Catalog\n\nNormalize all discovered endpoints into this format:\n\n```typescript\ninterface EndpointCatalog {\n  service: string;           \u002F\u002F e.g., \"stripe\", \"nexudus\"\n  baseUrl: string;\n  auth: {\n    type: 'api-key' | 'bearer' | 'cookies' | 'oauth' | 'none';\n    headerName?: string;     \u002F\u002F e.g., \"Authorization\", \"X-API-Key\"\n    envVar: string;          \u002F\u002F e.g., \"STRIPE_API_KEY\"\n  };\n  pagination?: {\n    style: 'cursor' | 'offset' | 'page' | 'link-header';\n    paramName: string;       \u002F\u002F e.g., \"starting_after\", \"offset\", \"page\"\n    responseField: string;   \u002F\u002F e.g., \"has_more\", \"next\", \"next_page_url\"\n  };\n  rateLimit?: {\n    requests: number;\n    window: string;          \u002F\u002F e.g., \"1m\", \"1h\"\n  };\n  resources: ResourceGroup[];\n}\n\ninterface ResourceGroup {\n  name: string;              \u002F\u002F e.g., \"customers\", \"invoices\"\n  description: string;\n  endpoints: Endpoint[];\n}\n\ninterface Endpoint {\n  method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n  path: string;              \u002F\u002F e.g., \"\u002Fv1\u002Fcustomers\u002F:id\"\n  description: string;\n  parameters: Parameter[];\n  requestBody?: object;      \u002F\u002F JSON schema or example\n  responseExample?: object;\n}\n\ninterface Parameter {\n  name: string;\n  in: 'path' | 'query' | 'header';\n  required: boolean;\n  type: string;\n  description: string;\n}\n```\n\nPresent the catalog to the user for review before generating:\n```\nFound 24 endpoints across 5 resources:\n  customers (6 endpoints): list, get, create, update, delete, search\n  invoices (5 endpoints): list, get, create, send, void\n  ...\nReady to generate the CLI?\n```\n\n## Step 4: Generate CLI\n\nGenerate a dual-mode CLI using Commander.js. The CLI auto-detects human vs agent output via `process.stdout.isTTY`.\n\n### File Structure\n\n**In-project scaffold:**\n```\nscripts\u002F\n  {service}.ts                    # Entry point with shebang\n  {service}\u002F\n    lib\u002F\n      client.ts                   # API client (auth, pagination, retry, caching)\n      envelope.ts                 # Agent JSON envelope helpers\n    commands\u002F\n      {resource}.ts               # One file per resource group\n```\n\n**Standalone project:**\n```\n{service}-cli\u002F\n  package.json\n  tsconfig.json\n  bin\u002F\n    {service}.ts                  # Entry point with shebang\n  src\u002F\n    lib\u002F\n      client.ts\n      envelope.ts\n    commands\u002F\n      {resource}.ts\n```\n\n### Code Generation Patterns\n\nSee these references for the patterns to apply during generation:\n\n- `references\u002Fapi-client-template.md` -- API client class with pagination, retry, rate limiting, caching\n- `references\u002Fagent-first-patterns.md` -- JSON envelope, HATEOAS next_actions, context-safe output, error fix suggestions\n- `references\u002Fcommander-patterns.md` -- Commander.js subcommands, global options, interactive prompts, colored output\n\n### Key Generation Rules\n\n**Entry point (`{service}.ts`):**\n- Shebang: `#!\u002Fusr\u002Fbin\u002Fenv npx tsx`\n- Self-documenting root command (no args → prints full command tree as JSON)\n- Global options: `--json` (force JSON output), `--verbose`, `--config \u003Cpath>`\n\n**API client (`lib\u002Fclient.ts`):**\n- Constructor takes base URL + auth config\n- Auth from env var (name based on `catalog.auth.envVar`)\n- Built-in pagination matching the API's pattern\n- Retry with exponential backoff for 5xx and 429 errors\n- Rate limiting based on discovered limits\n- Optional response caching\n\n**Envelope helpers (`lib\u002Fenvelope.ts`):**\n```typescript\nconst isAgent = !process.stdout.isTTY;\n\nfunction respond(command: string, result: any, nextActions: Action[] = []) {\n  if (isAgent) {\n    console.log(JSON.stringify({ ok: true, command, result, next_actions: nextActions }));\n  } else {\n    return result; \u002F\u002F caller handles human rendering\n  }\n}\n\nfunction respondError(command: string, message: string, code: string, fix: string, nextActions: Action[] = []) {\n  if (isAgent) {\n    console.log(JSON.stringify({ ok: false, command, error: { message, code }, fix, next_actions: nextActions }));\n  } else {\n    console.error(`Error: ${message}`);\n    console.error(`Fix: ${fix}`);\n  }\n  process.exit(1);\n}\n```\n\n**Command files (`commands\u002F{resource}.ts`):**\n- One file per resource group\n- Each endpoint becomes a subcommand: `mycli customers list`, `mycli customers get \u003Cid>`\n- `list` commands: support `--limit`, `--offset`\u002F`--cursor`, `--status` (if filterable)\n- `get` commands: take ID as argument\n- `create`\u002F`update` commands: accept `--data \u003Cjson>` or individual `--field` flags\n- Every command includes contextual `next_actions` for agent mode\n- Errors include `fix` suggestions\n\n**Standalone project extras:**\n- `package.json` with `commander`, `tsx` as dependencies, `bin` field pointing to entry\n- `tsconfig.json` for TypeScript\n- `.env.example` with the required env var\n\n## Step 5: Verify\n\nAfter generating the CLI:\n\n1. **Verify it runs:** Execute with no args, confirm the self-documenting root works\n2. **Test one endpoint:** Pick a simple GET endpoint, run it, verify output\n3. **Move on to Step 6** to wrap the CLI in a skill\n\n## Step 6: Generate Skill\n\nCreate 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.\n\n### Skill Structure\n\n```\n.claude\u002Fskills\u002F{service}\u002F\n  SKILL.md                    # Skill instructions\n```\n\n### SKILL.md Template\n\nGenerate a SKILL.md with this structure:\n\n```markdown\n---\nname: {service}\ndescription: Interact with the {Service} API via CLI. Use when user wants to\n  {list of actions based on discovered resources, e.g., \"list customers,\n  create invoices, check order status\"}. Commands: {service} {resource} {action}.\n---\n\n# {Service} CLI\n\nCLI wrapper for the {Service} API.\n\n## Setup\n\nSet the `{SERVICE_ENV_VAR}` environment variable:\n\\`\\`\\`bash\nexport {SERVICE_ENV_VAR}=your-api-key-here\n\\`\\`\\`\n\n## Commands\n\n{For each resource group, list commands with examples:}\n\n### {Resource}\n\n\\`\\`\\`bash\n# List {resources}\nnpx tsx {path\u002Fto\u002Fcli}.ts {resource} list\n\n# Get a specific {resource}\nnpx tsx {path\u002Fto\u002Fcli}.ts {resource} get \u003Cid>\n\n# Create a {resource}\nnpx tsx {path\u002Fto\u002Fcli}.ts {resource} create --field value\n\\`\\`\\`\n\n## Common Workflows\n\n{Generate 2-3 practical workflows combining multiple commands:}\n\n### Example: {Workflow name}\n\\`\\`\\`bash\n# Step 1: Find the customer\nnpx tsx {path\u002Fto\u002Fcli}.ts customers list --status=active\n\n# Step 2: Get their invoices\nnpx tsx {path\u002Fto\u002Fcli}.ts invoices list --customer-id=abc123\n\\`\\`\\`\n\n## Agent Usage\n\nWhen piped, all commands return JSON with `next_actions`:\n\\`\\`\\`bash\nnpx tsx {path\u002Fto\u002Fcli}.ts {resource} list | cat\n\\`\\`\\`\n```\n\n### Key Rules for Skill Generation\n\n1. **Description is critical** -- include specific trigger phrases and list the actions the CLI supports. This is what Claude reads to decide when to use the skill.\n2. **Include real command examples** -- use the actual CLI path and real subcommand names from the generated CLI.\n3. **Generate practical workflows** -- combine multiple commands into realistic multi-step scenarios based on how the API's resources relate to each other.\n4. **Keep it lean** -- the skill should be a quick reference, not a restatement of `--help`. Focus on what Claude needs to know that it can't infer.\n\n### Tell the User\n\nAfter generating both the CLI and the skill:\n\n```\nCLI generated at {cli_path}\nSkill generated at .claude\u002Fskills\u002F{service}\u002FSKILL.md\n\nTo use the CLI directly:\n  npx tsx {cli_path}                           # See all commands\n  npx tsx {cli_path} customers list            # List customers\n\nClaude will now automatically use this skill when you ask about {service}.\n```\n\n## Reference Files\n\n- `references\u002Fdiscovery-strategies.md` -- Detailed probing patterns, well-known paths, GraphQL introspection, response parsing\n- `references\u002Fapi-client-template.md` -- Full API client class with pagination, retry, rate limiting, caching\n- `references\u002Fagent-first-patterns.md` -- Agent JSON envelope, HATEOAS, context-safe output, error handling\n- `references\u002Fcommander-patterns.md` -- Commander.js subcommands, nested commands, interactive prompts, colored output, config files, testing\n",{"name":5,"description":7,"user-invocable":24},true,"main","e7b39d448c7d905feed2b044d3ccdf60822596ab","skills\u002Fapi2cli",0,"https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter","https:\u002F\u002Fgithub.com\u002Fbarkleesanders","barkleesanders.com","Stay Hungry, Stay Foolish","2026-11-06 08:47:06",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":24},[36,39,42],{"tool":37,"command":38},"npx","npx skills add barkleesanders\u002Fclaude-code-starter --skill api2cli",{"tool":40,"command":41},"bunx","bunx skills add barkleesanders\u002Fclaude-code-starter --skill api2cli",{"tool":43,"command":44},"pnpm","pnpm dlx skills add barkleesanders\u002Fclaude-code-starter --skill api2cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fapi2cli\u002FSKILL.md",[47,53,57,61],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fagent-first-patterns.md","REFERENCE","参考文档",5256,"https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fapi2cli\u002Freferences\u002Fagent-first-patterns.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fapi-client-template.md",4577,"https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fapi2cli\u002Freferences\u002Fapi-client-template.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fcommander-patterns.md",3120,"https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fapi2cli\u002Freferences\u002Fcommander-patterns.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fdiscovery-strategies.md",4511,"https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fapi2cli\u002Freferences\u002Fdiscovery-strategies.md",[66,72,79,86,93,100],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7AWV75B37B6YKG7ZKGZ783F","zi-search","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fzi-search\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7AWTZA3JGK1T7V1HS543FG7","visualise","Render inline interactive visuals — SVG diagrams, HTML widgets, charts, and explainers — directly in the conversation. Use this skill whenever the user asks to visualize, diagram, chart, illustrate, or explain something visually, or when an explanation would genuinely benefit from a spatial\u002Finteractive diagram rather than text. Also triggers for: flowcharts, architecture diagrams, data visualizations, interactive explainers, comparison layouts, UI mockups, and any request containing 'show me', 'draw', 'map out', 'visualize', or 'diagram'. Even when the user doesn't explicitly ask for a visual, use this skill proactively when the topic has spatial, sequential, or systemic relationships that a diagram would clarify better than prose.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvisualise\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7AWTR056C3P9R3VS8YVM2WX","video","When the user wants to create, generate, or produce video content using AI tools or programmatic frameworks. Also use when the user mentions 'video production,' 'AI video,' 'Remotion,' 'Hyperframes,' 'HeyGen,' 'Synthesia,' 'Veo,' 'Runway,' 'Kling,' 'Pika,' 'video generation,' 'AI avatar,' 'talking head video,' 'programmatic video,' 'video template,' 'explainer video,' 'product demo video,' 'video pipeline,' or 'make me a video.' Use this for video creation, generation, and production workflows. For video content strategy and what to post, see social-content. For paid video ad creative, see ad-creative.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7AWTHTWBMTYZPMHHEYX3TTG","manim-video","Production pipeline for mathematical and technical animations using Manim Community Edition. Creates 3Blue1Brown-style explainer videos, algorithm visualizations, equation derivations, architecture diagrams, and data stories. Use when users request: animated explanations, math animations, concept visualizations, algorithm walkthroughs, technical explainers, 3Blue1Brown style videos, or any programmatic animation with geometric\u002Fmathematical content.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-use\u002Fskills\u002Fmanim-video\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7AWTCXDJ9NWFQW51ENM8A2Z","video-use","Edit any video by conversation. Transcribe, cut, color grade, generate overlay animations, burn subtitles — for talking heads, montages, tutorials, travel, interviews. No presets, no menus. Ask questions, confirm the plan, execute, iterate, persist. Production-correctness rules are hard; everything else is artistic freedom.","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-use\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7AWTA1D5FP895S33GHSA2G5","ui-improver","https:\u002F\u002Fgithub.com\u002Fbarkleesanders\u002Fclaude-code-starter\u002Fblob\u002Fmain\u002Fskills\u002Fui-improver\u002FSKILL.md",[],[]]