← 返回 Skills 市场
wangnov

CLI Design Framework

作者 Wangnov · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
246
总下载
1
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install cli-design-framework
功能描述
Use when designing a new CLI, reviewing an existing CLI, or resolving uncertainty about a CLI's role, user type, interaction form, statefulness, risk profile...
使用说明 (SKILL.md)

CLI Design Framework

Overview

Design and review CLIs with a classification-first framework.

Treat this as a decision system, not a generic style guide. Do not assume every CLI should become agent-first, machine-protocol-first, or raw-payload-first.

When to Use

Use this skill when:

  • designing a new CLI and the right command shape is not obvious
  • reviewing an existing CLI whose help, output, or command tree feels mismatched
  • deciding whether a CLI is primarily Capability, Runtime, Environment / Workspace, Workflow, Package / Build, or Meta
  • deciding whether human-readable and machine-readable surfaces are primary or secondary
  • deciding whether session semantics are justified or over-engineered

Do not use this skill when:

  • the CLI classification is already settled and you only need implementation mechanics
  • the question is only about parser libraries, repository layout, or exact flag spelling
  • the task is purely cosmetic copy editing with no design consequence

Quick Path

  • For quick asks, produce a compressed pass: purpose, classification, short reasoning, top design consequences, and only the unresolved questions that could change the answer.
  • Use the full blueprint or full review template only when the user asks for it explicitly, or when ambiguity or risk justifies the longer form.

Core rule

Classify first. Design second. Review third.

Always work in this order:

  1. State the CLI purpose in one sentence.
  2. Classify the primary role/control surface.
  3. Classify the primary user type.
  4. Classify the primary interaction form.
  5. Classify statefulness.
  6. Classify risk profile.
  7. Identify secondary surfaces explicitly.
  8. Derive design consequences.

Start with these files when using the framework:

  • references/taxonomy.md for the taxonomy.
  • references/output-templates.md for the required output shape.

Pull these only when needed:

  • references/classification-examples.md for classification anchors when the category is ambiguous.
  • examples/design-blueprint-example.md and examples/review-example.md when you need a concrete example of final form.
  • examples/anti-patterns.md when the design smells wrong but the category mistake is not yet crisp.

Operating modes

Operate in one of two modes:

  1. Design mode — create or refine a CLI design direction.
  2. Review mode — evaluate an existing CLI against the framework.

Design mode

Goal

Clarify the CLI's design target, then produce a blueprint that constrains implementation.

Workflow

  1. Infer what is already known.

    • Extract every strong signal from the user's request.
    • Infer likely role, user type, interaction form, statefulness, risk profile, and secondary surfaces whenever possible.
    • Do not ask for facts that are already strongly implied.
  2. Ask only the highest-leverage unresolved questions.

    • Ask the smallest set of questions that could materially change the classification or the blueprint.
    • Prefer classification questions over implementation trivia.
    • Prioritize: purpose → control surface → primary user → interaction form → statefulness → side effects → secondary surfaces.
    • If the current information is already sufficient, do not ask questions. Produce the blueprint directly.
  3. Classify the CLI explicitly.

    • State the inferred or confirmed:
      • primary role/control-surface type
      • primary user type
      • primary interaction form
      • statefulness
      • risk profile
      • secondary surfaces
    • State confidence when inference is uncertain.
    • Use explicit primary-vs-secondary wording. Do not blur them together.
  4. State the design stance before proposing commands.

    • Write one short paragraph that says what the CLI is optimizing for.
    • State what the CLI is not trying to be.
    • Do not jump straight from classification to command trees.
  5. Produce a design blueprint.

    • Use the structure in references/output-templates.md.
    • Use the full template when the user wants a blueprint or when the ambiguity/risk warrants it.
    • For quick requests, compress to: purpose, classification, classification reasoning, design stance, top design consequences, and only the unresolved questions that matter.
    • Connect classification directly to design consequences.
    • Keep the blueprint concrete, not generic.
  6. Constrain downstream implementation.

    • End with a short direction section that states:
      • what to optimize for
      • what not to optimize for
      • acceptable patterns
      • category mistakes
      • v1 boundaries and non-goals

Required design discipline

For every blueprint, enforce these rules:

  • Primary vs secondary surfaces

    • Name the primary surface explicitly.
    • Name secondary surfaces explicitly.
    • State what each surface is for.
    • Do not describe JSON, event streams, templates, raw payloads, or TUI as “important” without saying whether they are primary or secondary.
  • Human-primary / balanced discoverability

    • If the CLI is human-primary or balanced, explicitly cover:
      • help quality
      • examples
      • discoverability
      • explain/describe surfaces when appropriate
    • Do not discuss only command structure and ignore learnability.
  • Structured machine contract

    • If the CLI has a machine-readable surface, explicitly state:
      • which commands expose it
      • output format (--json, --jsonl, etc.)
      • whether field names are stable
      • whether exit codes matter
      • whether schema / fields / describe support is needed
    • Do not call a surface “script-friendly” unless the contract is described.
  • Risk ladder

    • If the CLI mutates state, define at least:
      • low-risk operations
      • medium-risk operations
      • high-risk operations
    • State the expected guardrails for each level.
    • Do not stop at “be careful” or “add confirmations.”
  • State model

    • If the CLI is sessionful, long-running, or attach/detach capable, describe session identity and lifecycle explicitly.
    • If it is mostly stateless, say so explicitly and avoid inventing session semantics.
  • v1 boundaries

    • State what v1 should include.
    • State what v1 should defer.
    • State what would be premature abstraction.

Question policy

Ask only questions that affect classification or the blueprint.

Do not begin with implementation-detail questions such as:

  • language choice
  • parsing library
  • repository layout
  • naming bikesheds
  • exact flag spelling

Ask those only if they materially affect the CLI's classification or design consequences.


Review mode

Goal

Inspect the CLI and its source, reverse-infer its design intent, then review it in two layers:

  1. Classification fit — Is it designed like the right kind of CLI?
  2. Execution quality — Given that type, how well is it executed?

Workflow

  1. Inspect before asking.

    • Inspect help output, subcommand help, docs, examples, parser code, output code, error handling, state/session code, config surfaces, and tests.
    • Prefer direct evidence over speculation.
  2. Reverse-infer the design intent.

    • Infer:
      • apparent purpose
      • likely primary role/control-surface type
      • likely primary user type
      • likely interaction form
      • likely statefulness
      • likely risk profile
      • existing secondary surfaces
  3. Confirm only what cannot be inferred reliably.

    • Ask focused confirmation questions only when the answer could materially change the classification or review.
    • Do not ask the user to restate facts already evident from the CLI or code.
  4. Review in two layers.

    • Keep classification fit and execution quality separate.
    • Do not criticize a human-primary CLI for not being agent-primary unless the user explicitly wants that shift.
  5. Produce a structured review.

    • Use the review structure in references/output-templates.md.
    • Use the full template when the user wants a formal review or when the category tension is material.
    • For quick requests, compress to: inferred intent, classification, evidence-backed category mistakes, in-category weaknesses, and highest-priority improvements.
    • Separate category mistakes from in-category execution weaknesses.

Required review checks

When reviewing, explicitly check these areas when relevant:

  • Primary vs secondary surface clarity

    • Is the CLI clear about what the main surface is?
    • Are secondary surfaces real contracts or just informal add-ons?
  • Discoverability

    • Does help output support the claimed user type?
    • Are examples, option descriptions, and command structure aligned with the CLI's center of gravity?
  • Structured output contract

    • Are JSON / JSONL / field-selection / exit-code surfaces explicit and stable?
    • Are unknown fields rejected or silently tolerated?
    • Is the machine surface strong enough for the claims made in docs?
  • Risk model

    • Are low-, medium-, and high-risk actions meaningfully separated?
    • Are confirm / dry-run / preview / audit guardrails aligned with the risk profile?
  • State model

    • Is statefulness handled correctly?
    • Are attach/detach/resume/session/history concepts used only when justified?
  • v1 discipline

    • Does the CLI keep a coherent v1 boundary?
    • Does it introduce premature abstraction or missing contracts?

Review rules

  • Do not grade every CLI on an agent-first curve.
  • Do not require raw payloads, full schema introspection, or machine-first output unless the classification justifies them.
  • Treat modern CLIs as multi-surface systems: one primary role, one primary interaction form, optional secondary surfaces.
  • Prefer strong inference, then targeted confirmation.
  • When criticizing machine support, specify whether the problem is:
    • missing primary/secondary surface clarity,
    • weak machine contract,
    • or a true category mismatch.

Handling hybrid CLIs

Some CLIs genuinely straddle multiple roles at the subcommand level.

Rules for hybrid CLIs:

  1. Classify at the product level first — what is the CLI's center of gravity?
  2. If subcommands clearly split into different roles, note the split explicitly.
  3. Name the primary role (the one that defines the CLI's identity and design constraints).
  4. Name secondary roles as secondary surfaces with their own local constraints.
  5. Do not force a single role on a CLI whose subcommands genuinely serve different roles.

Example: Docker

  • Product-level primary role: Runtime (its center of gravity is container execution).
  • docker run, docker exec, docker attach → Runtime interaction.
  • docker image ls, docker volume inspect → Capability-like resource surfaces (secondary).
  • docker compose up → Workflow/Orchestration (secondary).

Guidance for evolving CLIs:

  • If a CLI is migrating from one type to another, state the current center of gravity and the intended direction.
  • Do not classify based on the future target alone; classify based on current evidence and note the trajectory.

Common failure modes

Watch for these mistakes:

  • Treating every CLI as a capability CLI.
  • Treating every CLI as a runtime CLI.
  • Treating TUI or REPL as a role instead of an interaction form.
  • Ignoring statefulness.
  • Ignoring risk profile.
  • Ignoring help/discoverability for human-primary CLIs.
  • Treating automation fitness as a top-level identity instead of a design consequence.
  • Forcing human-primary tools into agent-only patterns.
  • Calling a JSON surface “strong” without defining the contract.
  • Ignoring secondary surfaces in mixed-mode CLIs.
  • Jumping from classification directly to command trees without stating design stance.
  • Failing to mark v1 boundaries and non-goals.
  • Forcing a single role on a hybrid CLI whose subcommands genuinely serve different control surfaces.
  • Over-engineering statefulness for a CLI that only has durable config/lockfile side-effects but no true sessions.
  • Classifying a CLI by its future aspirations instead of its current evidence.

Output bar

Keep final outputs:

  • explicit about classification
  • explicit about classification reasoning when there is tension or ambiguity
  • explicit about evidence, confidence, and assumptions
  • explicit about design consequences
  • explicit about primary vs secondary surfaces
  • explicit about discoverability and machine contracts when relevant
  • explicit about risk ladders when mutations exist
  • scaled to the user's requested depth
  • concise but dense
  • diagnostic rather than generic

Avoid vague advice such as "improve UX" or "make it more agent-friendly" unless tied to a specific classification and a concrete design consequence.

安全使用建议
This is a documentation-style, instruction-only skill for designing/reviewing CLIs. It does not install code, request credentials, or access system paths. You can safely use it to generate blueprints or reviews. Because the skill's source is listed as unknown, review the included templates/examples to ensure they match your expectations and coding/licensing needs before adopting generated designs. If you want to be extra cautious, open the SKILL.md and example files (they're bundled) to confirm nothing in the guidance asks the agent to read private files or call undeclared external services.
功能分析
Type: OpenClaw Skill Name: cli-design-framework Version: 1.0.2 The skill bundle provides a professional, classification-first framework for designing and reviewing Command Line Interfaces (CLIs). It includes a robust taxonomy (references/taxonomy.md), structured output templates (references/output-templates.md), and detailed examples (examples/design-blueprint-example.md) that guide an AI agent to evaluate CLI ergonomics, risk profiles, and machine-readability. The instructions in SKILL.md are strictly aligned with the stated purpose of CLI design and review, lacking any indicators of malicious intent, data exfiltration, or unauthorized execution.
能力评估
Purpose & Capability
The name and description (CLI design/review framework) match the contents: SKILL.md plus taxonomy, templates, and examples. There are no environment variables, binaries, or other external resources declared that would be unexpected for a documentation/instruction skill.
Instruction Scope
Runtime instructions are purely procedural guidance for classifying and designing CLIs and reference bundled files (taxonomy, templates, examples). They do not instruct reading system files, environment variables, network endpoints, or sending data externally.
Install Mechanism
No install spec and no code files — the skill is instruction-only, so nothing is downloaded or written to disk. This is the lowest-risk form of a skill.
Credentials
The skill declares no required environment variables, credentials, or config paths. The instructions do not reference undeclared secrets or unrelated external services.
Persistence & Privilege
always is false and the skill has no install-time hooks or claims to modify other skills or system settings. It does not request persistent presence or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cli-design-framework
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cli-design-framework 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Republish from the correct repository workdir to remove README from installs and align packaged files with the current skill.
v1.0.1
Patch release: remove README from installed package and align packaged references with current skill contents.
v1.0.0
cli-design-framework v1.0.0 - Initial release of a structured framework for classifying, designing, and reviewing command-line interfaces (CLIs). - Provides a decision-based workflow with clear modes for both CLI design and review. - Emphasizes classification-first process: purpose, control surface, user type, interaction, statefulness, and risk. - Includes guidance on human vs machine surfaces, state models, risk ladders, and v1 boundaries. - Specifies strict question policy: prioritize high-impact, classification-driven inquiries only. - Directs users to supporting taxonomy, template, and example files to guide effective CLI assessment and creation.
元数据
Slug cli-design-framework
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

CLI Design Framework 是什么?

Use when designing a new CLI, reviewing an existing CLI, or resolving uncertainty about a CLI's role, user type, interaction form, statefulness, risk profile... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 246 次。

如何安装 CLI Design Framework?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cli-design-framework」即可一键安装,无需额外配置。

CLI Design Framework 是免费的吗?

是的,CLI Design Framework 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

CLI Design Framework 支持哪些平台?

CLI Design Framework 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 CLI Design Framework?

由 Wangnov(@wangnov)开发并维护,当前版本 v1.0.2。

💬 留言讨论