跳到正文
TakoAPI
返回技能列表

create-cli

由 steipete 提供

CLI Utilities
2.4k下载量由 clawskills.sh 提供
8星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Design CLI arguments, flags, subcommands.

描述

该技能的功能

Designs CLI surface area before or during implementation: command trees, flags, subcommands, help text, output formats, exit codes, and config precedence. Applies the clig.dev rubric to produce a complete, implementable spec rather than ad-hoc interface decisions.

Producing a full spec first prevents interface changes after users depend on the CLI, which are expensive to backtrack.

何时使用

  • Spec out a new build tool's subcommands and flags before writing any code
  • Audit an existing CLI for inconsistent flag naming across subcommands
  • Define exit codes and error messages for a deployment script
  • Add --json output and --dry-run support to a command that lacks them
  • Establish config file vs env var precedence for a multi-environment tool

示例工作流

输入

User asks: design a CLI for a file sync tool that targets both humans and scripts

智能体
  1. 1

    Asks minimum clarifying questions: command name, input sources, interactivity needs, and output contract

  2. 2

    Produces a command tree with init, sync, and status subcommands

  3. 3

    Defines a flags table with types, defaults, and required/optional markers

  4. 4

    Specifies stdout vs stderr contract, --json mode, and exit code map

  5. 5

    Outputs 5-10 example invocations including piped and --no-input cases

输出

A compact CLI spec the user can hand directly to an implementer or use as a coding prompt

安装

clawhub install steipete/create-cli

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接