Skip to content
Skills Library
Programming · Building & coding

api-kit-cli

/api-kit-cli

Use when giving an API built on the Escalay api-kit its command line, naming its MCP tools as commands, writing a job (one command for a playbook step), or fixing what cliGaps reports. Covers kit sdk / kit cli, names, examples, jobs, the snapshot and sign-in.

Repository
api-kit ↗
Licence
MIT
Last repository change
13.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when giving an API built on the Escalay api-kit its command line, naming its MCP tools as commands, writing a job (one command for a playbook step), or fixing what cliGaps reports. Covers kit sdk / kit cli, names, examples, jobs, the snapshot and sign-in.

Original author description

Use when giving an API built on the Escalay api-kit its command line, naming its MCP tools as commands, writing a job (one command for a playbook step), or fixing what cliGaps reports. Covers kit sdk / kit cli, names, examples, jobs, the snapshot and sign-in.

How it works

  1. Add it
  2. Name every tool
  3. Write a job
  4. Checks
  5. Try it
  6. Done when
Original SKILL.md headings · 111 lines, 820 words
SKILL.md preview
---
name: api-kit-cli
description: Use when giving an API built on the Escalay api-kit its command line, naming its MCP tools as commands, writing a job (one command for a playbook step), or fixing what cliGaps reports. Covers kit sdk / kit cli, names, examples, jobs, the snapshot and sign-in.
---

# The app's command line

Every kit app gets a CLI derived from its MCP tools: `<app> <noun> <verb>`, help with examples, `--json`, stable
exit codes, device-code sign-in. The engine is the kit's; the app names its tools and writes its jobs. Standard:
`docs/STANDARD.md` §19, design: `docs/decisions/0003-the-command-line.md`.

## Add it

1. An app without `sdk/`: `npx @escalay/kit sdk` (the client and the CLI together). An app with `sdk/`:
   `npx @escalay/kit cli [--bin <name>]`, then paste the lines it prints into `scripts/openapi.ts`.
2. `pnpm sdk:types` writes `sdk/cli/commands.json` (the commands before sign-in).
3. `pnpm test`: `sdk/test/cli.test.ts` checks the names (`cliGaps`), that `commands.json` is current, and that the
   live commands match it. Done when it passes.

What is whose: `sdk/cli/engine/` is the kit's (take a newer one with `npx @escalay/kit cli --update`, never edit
it); `sdk/cli/bin.ts`, `sdk/cli/jobs/` and `sdk/cli/commands.json` are the app's.

## Name every tool

Each `mcpTool` (and `mcpResource`) gets `cli`, with at least one example run without the bin:

```ts
mcpTool({
  name: 'wait_for_message',
  cli: { name: 'mail wait', examples: [{ run: 'mail wait adr_123 --timeout 30', about: 'The next mail to an address' }] },
  …
})
```

Rules:

- `<noun> <verb>`, lowercase kebab-case, as `gh` writes them. The noun is singular (`address`, `mail`, `webhook`).
- Verbs are `gh`'s where one fits: `list`, `view`, `create`, `edit`, `delete`. Otherwise the task's own word:
  `wait`, `reply`, `mark-read`, `set-role`.
- Never a built-in as a noun (`help`, `commands`, `api`, `tool`, `doctor`, `completion`, `version`), never a job's
  name. `auth` is shared: `auth login|logout|token|switch` are built in, and a tool may fill another verb (the
  kit's `who_am_i` is `auth status`).
- The input keys the call puts in its path are positional, in path order (`cli.positional` overrides, rarely); every
  argument is also a `--kebab-case` flag. Name inputs for flags people type (`--timeout`), describe every one, and
  never name one `json`, `yes`, `input`, `profile`, `help` or `dry-run` (the CLI's own flags).
- An example uses only flags the tool takes and a plausible id (`adr_123`). `about` says what it does.

| Good | Bad | Why |
|---|---|---|
| `mail wait` | `messages wait-for-message` | singular noun; the verb is the task, not the tool name again |
| `address delete` | `address remove-address` | `gh`'s verb fits |
| `team set-role` | `team-role change` | the noun is the thing; the verb is the change |

The MCP names stay hidden aliases (`<app> wait_for_message …` works), so agents that know them are never stuck.

## Write a job

A job is earned when the agent test shows agents making the same few calls for one playbook step (make an address,
wait, read the code). Not before: a job nobody repeats is a second name for the same tools.

```ts
// sdk/cli/jobs/signup.ts
import { defineJob } from '../engine/job.js'

export const signup = defineJob({
  name: 'signup',
  summary: 'Make an address, wait for its code, print the code',
  args: { label: { type: 'string', description: 'What the address is for.', default: 'signup' }, timeout: { type: 'number', description: 'Seconds to wait.', default: 120 } },
  examples: [{ run: 'signup --label shop', about: 'An address for a shop, then its code' }],
  run: async (ctx, { label, timeout }) => {
    const made = await ctx.call('create_address', { label })
    if (made.isError) ctx.fail(made)
    ctx.progress(`Waiting for mail to ${made.json.address}`)
    const code = await ctx.call('get_verification', { address: made.json.id, timeout })
    if (code.isError) ctx.fail(code)
    if (ctx.jsonMode) ctx.json(code.json)
    else ctx.print(code.json.code)
  },
})
```

List it in `sdk/cli/jobs/index.ts`, run `pnpm sdk:types`, then name the job in the playbook it replaces.

- One task per job, one lowercase word. Jobs are listed first by `<app>` alone.
- `ctx.print` / `ctx.json` write the answer (stdout); `ctx.progress` writes everything else (stderr).
- `ctx.call` never throws for a failed call: check `isError` and `ctx.fail(result)` (its status picks the exit code).
  Anything else a job throws exits with its numeric `exitCode` (`6` when nothing came in time), else its
  `problem.status`'s code, else 1; its message is the one line on stderr.
- No prompts: `ctx.interactive` is false for agents. Mark a job `destructive: true` when it deletes things.

## Checks

| Rule | Verified by |
|---|---|
| Every tool and resource is named well, every argument described, every tool has an example | `cliGaps({ tools, resources, jobs })` returns `[]` in `sdk/test/cli.test.ts` |
| `commands.json` is current | the byte compare in `sdk/test/cli.test.ts`; fix with `pnpm sdk:types` |
| The live commands match the package | `<app> doctor` prints `ok drift` |
| The copied engine is current | `npx @escalay/kit cli --update`, then `pnpm test` |

`npx @escalay/kit doctor` also runs `cliGaps` when the app's dependencies are installed.

## Try it

```sh
pnpm dev
export APP_URL=http://localhost:8787 APP_API_KEY=…   # the bin's prefix: MAILROOM_URL for mailroom
pnpm exec tsx sdk/cli/bin.ts                          # jobs, then nouns
pnpm exec tsx sdk/cli/bin.ts help agents
```

## Done when

`pnpm test` passes with `cliGaps` empty, `commands.json` current, and each playbook names its command beside its
tools.

Versions

The database has no other skills named api-kit-cli.

Database snapshot: 13.11.2026 · package version 0ad7aeeb18d3 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100api-kit-feature
    Use when adding a feature (a resource with routes, data and MCP tools) to an API built on the Escalay api-kit, or reshaping existing routes into the kit's feature folder. Covers schema, repo, routes, handlers, tools and the feature's test.
  • 100api-kit-review
    Use when checking whether an API built on the Escalay api-kit is ready for agents, before a release, after a refactor, or when an agent stalled on it. Lists the commands and tests to run and what each failure means.
  • 100dev-kit-setup
    First-use bootstrap for the dev kit. Detects the team's issue tracker, discovers what it can via MCP/CLI, asks only what cannot be discovered, and persists the result to .claude/dev-kit.json in the consuming repo. Use when that file is missing, when the user asks to set up or…
  • 100cli-commands
    Use when adding or modifying CLI command (`but` commands) under `crates/but/src`.
  • 100kit-setup
    「Claude Code × 完全自動化キット」の初期設定をするスキル。道具の点検(OS・Python・ffmpeg・Pillow・Chrome/Edge)→足りないものを公式の入れ方で案内→作業フォルダ作成→キットのスキルをスキル置き場へコピー→各スキルの試し運転→「次にやること」の順で進める。 「キットの初期設定をして」「キットのセットアップをして」「キットを使えるようにして」「スキルを入れて」「環境チェックして」「動くか確かめて」と言われたときに使う。 Use when the user says "set up the kit",…
  • 90the-i18n-kit
    Manage translations with the-i18n-kit MCP tools — find missing or dead keys, translate, rename across locales. Use when working with i18n, translations, locale files, or translation keys in a project configured for the-i18n-kit.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.