cli-creator
What it does
This skill helps build a durable command-line tool from an API, a web app or an existing script, so it can be run from any folder. It is for people who repeat the same tasks and want a reliable tool for them.
When to use it
- ✓When you want a command-line tool that reads or writes data from an API you use often.
- ✓When you have curl examples or an OpenAPI spec and want them turned into a reusable command.
- ✓When you want a tool that an AI agent can run from any project with stable JSON output.
Skill link
https://github.com/openai/skills/blob/main/skills/.curated/cli-creator/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you build me a command-line tool that lists my failed CI jobs, using the API docs I am sharing?”
5 new skills a week. 1 minute to read.
How it works
The agent checks which tools are installed, picks a suitable language, scaffolds the commands, handles login and installs the tool under a short command name.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
CLI Creator
Create a real CLI that future Codex threads can run by command name from any working directory.
This skill is for durable tools, not one-off scripts. If a short script in the current repo solves the task, write the script there instead.
Start
Name the target tool, its source, and the first real jobs it should do:
- Source: API docs, OpenAPI JSON, SDK docs, curl examples, browser app, existing internal script, article, or working shell history.
- Jobs: literal reads/writes such as
list drafts,download failed job logs,search messages,upload media,read queue schedule. - Install name: a short binary name such as
ci-logs,slack-cli,sentry-cli, orbuildkite-logs.
Prefer a new folder under ~/code/clis/<tool-name> when the user wants a personal tool and has not named a repo.
Before scaffolding, check whether the proposed command already exists:
command -v <tool-name> || true
If it exists, choose a clearer install name or ask the user.
Choose the Runtime
Before choosing, inspect the user's machine and source material:
command -v cargo rustc node pnpm npm python3 uv || true
Then choose the least surprising toolchain:
- Default to Rust for a durable CLI Codex should run from any repo: one fast binary, strong argument parsing, good JSON handling, easy copy/install into
~/.local/bin. - Use TypeScript/Node when the official SDK, auth helper, browser automation library, or existing repo tooling is the reason the CLI can be better.
- Use Python when the source is data science, local file transforms, notebooks, SQLite/CSV/JSON analysis, or Python-heavy admin tooling that can still be installed as a durable command.
Do not pick a language that adds setup friction unless it materially improves the CLI. If the best language is not installed, either install the missing toolchain with the user's approval or choose the next-best installed option.
State the choice in one sentence before scaffolding, including the reason and the installed toolchain you found.
Command Contract
Sketch the command surface in chat before coding. Include the binary name, discovery commands, resolve or ID-lookup commands, read commands, write commands, raw escape hatch, auth/config choice, and PATH/install command.
When designing the command surface, read references/agent-cli-patterns.md for the expected composable CLI shape.
Build toward this surface:
tool-name --helpshows every major capability.tool-name --json doctorverifies config, auth, version, endpoint reachability, and missing setup.tool-name init ...stores local config when env-only auth is painful.- Discovery commands find accounts, projects, workspaces, teams, queues, channels, repos, dashboards, or other top-level containers.
- Resolve commands turn names, URLs, slugs, permalinks, customer input, or build links into stable IDs so future commands do not repeat broad searches.
- Read commands fetch exact objects and list/search collections. Paginated lists support a bounded
--limit, cursor, offset, or clearly documented default. - Write commands do one named action each: create, update, delete, upload, schedule, retry, comment, draft. They accept the narrowest stable resource ID, support
--dry-run,draft, orpreviewfirst when the service allows it, and do not hide writes inside broad commands such asfix,debug, orauto. --jsonreturns stable machine-readable output.- A raw escape hatch exists:
request,tool-call,api, or the nearest honest name.
Do not expose only a generic request command. Give Codex high-level verbs for the repeated jobs.
Document the JSON policy in the CLI README or equivalent: API pass-through versus CLI envelope, success shape, error shape, and one example for each command family. Under --json, errors must be machine-readable and must not contain credentials.
Auth and Config
Support the boring paths first, in this precedence order:
- Environment variable using the service's standard name, such as
GITHUB_TOKEN. - User config under
~/.<tool-name>/config.tomlor another simple documented path. --api-keyor a tool-specific token flag only for explicit one-off tests. Prefer env/config for normal use because flags can leak into shell history or process listings.
Never print full tokens. doctor --json should say whether a token is available, the auth source category (flag, `env
FAQ
Why not just write a script?
The skill says a short script in the current project is fine for one-off work, but this skill is for durable tools.
Which language does it use?
The skill defaults to Rust for a single fast binary, though it can choose another toolchain that fits the machine.
How are logins handled?
The skill says it manages authentication as part of building the tool.
Details
Original description by the author
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. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read/write commands, return stable JSON, manage auth, and pair with a companion skill.
repo: openai/skills
Popularity
- GitHub stars
- 28k
- Ranking position
- #9846
- License
- —
- Updated
- 10/28/2026
Comments
- …
More skills from this repository
aspnet-core
28kHelps your agent build, review or upgrade ASP.NET Core web apps, choosing the right app type and following current Microsoft guidance for .NET.
chatgpt-apps
28kHelps your agent build a ChatGPT app that pairs an MCP server with a widget UI, covering tool design, UI resources, metadata and local setup.
define-goal
28kHelps your agent turn a vague intention into a clear, measurable goal with success criteria, scope and a stop condition before work begins.
figma-code-connect-components
28kHelps your agent link Figma design components to their code versions with Code Connect, so designs and code stay consistent.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.