cli-creator 是什么?
将API文档、OpenAPI、SDK或已有脚本做成可在任意目录调用的持久命令行工具。重点是稳定JSON、资源发现与ID解析、有限分页、认证诊断和明确读写命令,并为未来Agent配套简明使用Skill。
中文说明由本站依据来源整理;英文原文保留在页面下方。
适合用在
- 团队反复调用某个 API、管理后台或现有脚本,希望把它整理成可安装、能在任意仓库运行并输出稳定 JSON 的命令行工具。
这些情况不适合
- 只想执行一次 API 请求、并不需要可复用命令或跨目录安装的场景;本 Skill 的目标是构建持久 CLI。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
cli-creator,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 cli-creator
请在 Codex 的当前工作环境中安装并检查 cli-creator 这个 Skill。
项目身份:openai/skills / cli-creator
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/cli-creator/SKILL.md
已定位的源文件:skills/.curated/cli-creator/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 cli-creator
请在 Claude Code 的当前工作环境中安装并检查 cli-creator 这个 Skill。
项目身份:openai/skills / cli-creator
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/cli-creator/SKILL.md
已定位的源文件:skills/.curated/cli-creator/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 cli-creator
请在 Cursor Agent 的当前工作环境中安装并检查 cli-creator 这个 Skill。
项目身份:openai/skills / cli-creator
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/cli-creator/SKILL.md
已定位的源文件:skills/.curated/cli-creator/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 cli-creator
请在 当前 Agent 的当前工作环境中安装并检查 cli-creator 这个 Skill。
项目身份:openai/skills / cli-creator
来源:https://github.com/openai/skills/blob/49f948faa9258a0c61caceaf225e179651397431/skills/.curated/cli-creator/SKILL.md
已定位的源文件:skills/.curated/cli-creator/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 提供真实接口资料、首批具体读写任务和希望安装的命令名;检查本机可用工具链及命令名冲突。
会得到什么
- 可安装CLI、认证与JSON契约文档、相关验证结果和配套Skill。
实际使用顺序
- 盘点认证、资源ID、分页、错误和文件上传流程,再按已安装环境选Rust、Node或Python。
- 先明确help、doctor、发现、resolve、读操作和窄范围写操作契约;JSON错误也应稳定且不含凭证,不能只暴露万能request。
- 实现并安装到PATH,从另一个目录运行帮助、doctor及fixture或真实只读调用;必要时分别验证上传、轮询和附加资源阶段,再写配套Skill。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
教学示例:用 cli-creator,依据我提供的OpenAPI为内部构建系统做buildlog命令。先检查命令名和本机工具链,设计doctor、projects list、jobs get及logs download,全部只读;认证走环境变量。先给命令契约,再实现并安装,在另一个目录验证help和fixture读取,不实现重试或删除任务。预期得到离开源码目录仍可运行的CLI和只读验证记录;本站未创建该工具。
使用条件与边界
- 截图只能帮助理解界面词汇与流程,不能单独证明API参数;DevTools样例需先去除cookies和令牌。
常见问题
一次性脚本也适合用吗?
来源明确定位持久工具。仅在当前项目执行一次的短脚本,直接写项目脚本通常更合适。
doctor通过就是所有API可用吗?
不是。doctor只覆盖所实现的配置、认证和连通性检查,分页、上传和具体业务权限仍需分别验证。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
skills/.curated/cli-creator/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
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.
查看源文件章节 / Source sections
- 原文:CLI Creator
- 原文:Start
- 原文:Choose the Runtime
- 原文:Command Contract
- 原文:Auth and Config
- 原文:Build Workflow
- 原文:Rust Defaults
- 原文:TypeScript/Node Defaults
- 原文:Python Defaults
- 原文:Companion Skill
原文: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`, or `buildkite-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: ```bash 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: ```bash 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](references/agent-cli-patterns.md) for the expected composable CLI shape. Build toward this surface: - `tool-name --help` shows every major capability. - `tool-name --json doctor` verifies 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`, or `preview` first when the service allows it, and do not hide writes inside broad commands such as `fix`, `debug`, or `auto`. - `--json` returns 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: 1. Environment variable using the service's standard name, such as `GITHUB_TOKEN`. 2. User config under `~/.<tool-name>/config.toml` or another simple documented path. 3. `--api-key` or 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`, `config`, provider default, or missing), and what setup step is missing. If the CLI can run without network or auth, make that explicit in `doctor --json`: report fixture/offline mode, whether fixture data was found, and whether auth is not required for that mode. For internal web apps sourced from DevTools curls, create sanitized endpoint notes before implementing: resource name, method/path, required headers, auth mechanism, CSRF behavior, request body, response ID fields, pagination, errors, and one redacted sample response. Never commit copied cookies, bearer tokens, customer secrets, or full production payloads. Use screenshots to infer workflow, UI vocabulary, fields, and confirmation points. Do not treat screenshots as API evidence unless they are paired with a network request, export, docs page, or fixture.
原文:Build Workflow
1. Read the source just enough to inventory resources, auth, pagination, IDs, media/file flows, rate limits, and dangerous write actions. If the docs expose OpenAPI, download or inspect it before naming commands. 2. Sketch the command list in chat. Keep names short and shell-friendly. 3. Scaffold the CLI with a README or equivalent repo-facing instructions. 4. Implement `doctor`, discovery, resolve, read commands, one narrow draft or dry-run write path if requested, and the raw escape hatch. 5. Install the CLI on PATH so `tool-name ...` works outside the source folder. 6. Smoke test from another repo or `/tmp`, not only with `cargo run` or package-manager wrappers. Run `command -v <tool-name>`, `<tool-name> --help`, and `<tool-name> --json doctor`. 7. Run format, typecheck/build, unit tests for request builders, pagination/request-body builders, no-auth `doctor`, help output, and at least one fixture, dry-run, or live read-only API call. If a live write is needed for confidence, ask first and make it reversible or draft-only. When the source is an existing script or shell history, split the working invocation into real phases: setup, discovery, download/export, transform/index, draft, upload, poll, live write. Preserve the flags, paths, and environment variables the user already relies on, then wrap the repeatable phases with stable IDs, bounded JSON, and file outputs. For raw escape hatches, support read-only calls first. Do not run raw non-GET/HEAD requests against a live service unless the user asked for that specific write. For media, artifact, or presigned upload flows, test each phase separately: create upload, transfer bytes, poll/read processing status, then attach or reference the resulting ID. For fixture-backed prototypes, keep fixtures in a predictable project path and make the CLI locate them after installation. Smoke-test from `/tmp` to catch binaries that only work inside the source folder. For log-oriented CLIs, keep deterministic snippet extraction separate from model interpretation. Prefer a command that emits filenames, line numbers or byte ranges, matched rules, and short excerpts.
文件 SHA256:24058eabf0aafce6def3fb937ac93cbe3fa341c653c658dc589edb77f73d6152
仓库许可证记录:未提供;not-established,查看来源。
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.
历史收录数据
| 来源仓库 | openai/skills |
|---|---|
| Skill源路径 | skills/.curated/cli-creator/SKILL.md |
安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。
