bootstrap-agent-cli
Use this skill when starting a NEW command-line tool meant to be driven by AI agents — a code reviewer, fixer, sweeper, sandbox runner, codegen tool, or anything an agent invokes and parses. Triggers on "build a new CLI", "scaffold an agent CLI", "bootstrap a tool for agents", "new agent tool", "start a CLI project for agents". Walks spec to one-shot scaffold (with tests + CI) to dogfood to honest v0.1, pausing at decision gates. TS/Node-first.
What this skill does
# Bootstrap an agent CLI
Stand up a new CLI that an AI agent will both **drive** (invoke + parse) and later
help **extend**. Method distilled from `openclaw/clawpatch` (built zero→v0.4 in 8
days). Phases 0–4 are one focused session; 5–9 hand off to the other agent-cli
skills.
**Core idea:** design for the agent-driver (JSON contract, exit codes, resumable
state, deterministic core) and you get agent-extensibility for free. Read
[`references/contract.md`](references/contract.md) for the invariants this scaffold
must satisfy, and [`references/scaffold.md`](references/scaffold.md) for the actual
TS code patterns to generate.
## Phase 0 — Stake the claim
One commit: `LICENSE` only, plus the chosen name + registry scope. Reserve the npm
name. (clawpatch & crabbox both: commit 1 = LICENSE only.)
## Phase 1 — Spec as generator 🔶 DECISION GATE
Write ONE design doc precise enough to *generate* the code. Use
[`templates/SPEC.template.md`](templates/SPEC.template.md). It must specify: goals,
**hard non-goals**, the full CLI contract (every flag, every exit code, output
shape), every persisted record schema, pipeline stages, the provider/adapter
interface, safety posture, testing + release criteria, open questions.
Before writing the spec, **ask the human the decision-gate questions** (one
`AskUserQuestion`, multiple questions) — these are choices only they can make and
they shape everything downstream:
1. **Non-goals / scope** — what will v0 deliberately NOT do? (Push for a ruthless
list; this is what keeps you and future agents on-scope.)
2. **Safety posture** — is the tool read-only/report-only by default with mutation
behind an explicit subcommand? (Almost always yes for agent CLIs. Confirm.)
3. **State location** — where does persisted state live, and is it gitignored /
separated from code? (`.{tool}/` dirs, gitignored runtime subdirs.)
4. **First provider/adapter** — which single agent provider or backend ships first?
(One path proven before any matrix — a hard non-goal.)
Gate: every command's I/O and every record schema is written down. The spec is a
*prompt*, not scripture — expect the code to diverge later (clawpatch's shipped
tree diverged from its own spec skeleton; that's fine).
## Phase 2 — One-shot scaffold
Generate the WHOLE skeleton in one commit from
[`references/scaffold.md`](references/scaffold.md): CLI entry with the flag table +
dispatch + stdout/stderr discipline + top-level error→exit-code catch; `errors.ts`
with the typed error class (string `code` + numeric `exitCode`); zod schemas for
every record; atomic state I/O + lock files; the provider interface + ONE provider
(start with a `mock` provider for tests + your real one); the plugin/mapper
interface with one example; contract tests; CI (`typecheck + lint + format:check +
test + build + pack:smoke`); README stating limits honestly.
**Tests and CI ship in THIS commit — never "later."** (clawpatch commit 2 = 5,866
LOC including a 636-line workflow test + CI.)
Gate: CI green; `--json` output snapshot stable.
## Phase 3 — Dogfood immediately
Point the tool at its own repo; let its output drive the first refactor.
Gate: the tool produces valid state on itself.
## Phase 4 — Ship honest v0.1 🔶 DECISION GATE (publish)
Publish. **Version reflects maturity** — don't oversell (clawpatch shipped 0.9.1
then *corrected down* to 0.1.0). README says "early." Start `CHANGELOG.md`
(see [`templates/AGENTS-and-changelog.md`](templates/AGENTS-and-changelog.md)).
Confirm with the human before publishing to a public registry.
Gate: installs from registry, exposes the bin, release-criteria met.
## Phases 5–9 — hand off
- Adding features / refactoring / adding providers → **evolve-agent-cli**.
- Reviewing against the contract + safety model → **audit-agent-cli**.
- Externalizing prompts/policies/schema or standing up an autonomous loop →
**agent-spec-kit**.
## Definition of done (v0.1)
- [ ] LICENSE committed first; name reserved
- [ ] Spec doc with explicit non-goals
- [ ] Scaffold: CLI contract + zod schemas + atomic state + locks + one provider +
one plugin/adapter example + tests + CI, all in one commit
- [ ] `--json` / `--no-input` / enumerated exit codes / stdout=result, stderr=progress
- [ ] State gitignored / separated from code
- [ ] AGENTS.md + CHANGELOG.md + honest README
- [ ] Dogfooded on itself; CI green
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.