用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cyberuni/universal-plugin --skill plan-command命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | plan-command |
| description | Use this skill when planning a new universal-plugin CLI command - spec.md + BDD feature file. |
| metadata | {"internal":true} |
A new domain is being added to universal-plugin and needs:
specs/<domain>/spec.md — narrative specspecs/<domain>/<domain>.feature — Gherkin scenariosAlso use to add missing BDD scenarios to an existing spec.
Read two files before writing anything:
specs/<domain>/spec.md (e.g. specs/build/spec.md).feature (e.g. specs/build/build.feature)These are the canonical patterns. Do not deviate without cause.
Run:
universal-plugin governance show cli-command
If it returns nothing, read packages/universal-plugin/governances/cli-command.md directly.
Key rules to carry into the spec:
--format <format> (values: text, json, agent). --json is a hidden alias only — never document it as a primary flag.--format if it produces any output.--root <path>, --dry-run, --yes, --global/--project, --vendor, --limit/--offset, --verbose, --branch are CAN options — include only the ones that fit this domain.specs/<domain>/spec.mdUse this structure exactly:
# <Domain> Domain Spec
**Status:** Planned
**Commands:** `universal-plugin <command> [options]`
**Governance:** [cli-command](../../governances/cli-command.md)
---
## What
<One paragraph: what this domain does.>
---
## Why
<One paragraph: what problem it solves and why a dedicated command is needed.>
---
## Design decisions
### <Decision title>
<Normative rule or constraint. No rationale prose.>
### <Decision title>
...
---
## Command surface
\`\`\`
universal-plugin <command> [options]
\`\`\`
**Exit codes:**
—
—
(planned)
Rules:
Status is Planned until implemented.### universal-plugin <sub> heading per subcommand inside the command surface section.specs/<domain>/<domain>.featureEach feature file covers one command group. Use this shape:
Feature: <verb> <noun>
Background:
Given <shared precondition>
Scenario: <happy path name>
Given <setup>
When I run "universal-plugin <command> [flags] --root <root>"
Then the exit code is 0
And <observable output assertion>
Scenario: <error case name>
...
Then the exit code is 1
And stderr contains "<message fragment>"
Mandatory scenario categories — include at least one of each that applies:
| Category | When required |
|---|---|
| Happy path | Always |
| Missing input / not found | Always |
--dry-run preview | When the command writes files or makes requests |
--format json output | Always if the domain produces output |
--format json suppresses prompts | When the command is interactive |
--global vs --project scope | When the domain supports scope flags |
--vendor targeting | When the domain is vendor-aware |
--limit + --offset | When the command returns a list |
| Idempotent re-run | When the domain is designed to be idempotent |
| Partial failure | When failure of one item shouldn't block others |
For --format json scenarios, assert on structure:
Then stdout is valid JSON with a "<field>" array
For error scenarios, always assert both exit code and stderr content:
Then the exit code is 1
And stderr contains "<fragment>"
Add a line to the ## Domain index section in packages/universal-plugin/specs/spec.md:
- [<domain>](./<domain>/spec.md) — <one-line description matching the What section>
Also update the ## Command surface table: change Planned status to Implemented when done.
--json in any existing specs touchedIf editing an existing spec or feature file, replace any --json primary flag with --format json:
spec.md: update the command surface block and any design decision that mentions --json.feature: update When I run "... --json ..." to --format jsonTwo commits in this order:
docs(specs): add <domain> domain spec — only specs/<domain>/spec.md + specs/spec.md updatedocs(specs): add <domain> BDD scenarios — only specs/<domain>/<domain>.featureIf fixing existing specs, include those in commit 1.
Never batch unrelated domains into one commit.
--json as a primary flag in any spec or feature file--format json scenario when a command produces outputGovernance: header line from the spec frontmatter## Why section to design decisions subsections (prose rationale belongs in ## Why at the top, not inside decisions)specs/spec.md domain index