openspec-cli
在非交互式环境中使用 OpenSpec CLI 工具的指南。验证规范或更改时使用此技能可确保命令在无需用户干预的情况下成功运行。
📖 中文导读:在非交互式环境中使用 OpenSpec CLI 工具的指南。验证规范或更改时使用此技能可确保命令在无需用户干预的情况下成功运行。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: openspec-cli description: Guidelines for using the OpenSpec CLI tool in non-interactive environments. Use this skill when validating specifications or changes to ensure commands run successfully without user intervention. metadata: short-description: Run OpenSpec validation non-interactively
OpenSpec CLI Guidelines
This skill provides instructions for using the openspec command-line interface (CLI) effectively within the MCP environment, where interactive prompts are not supported.
Core Principles
- Non-Interactive Mode: Always use flags that bypass interactive prompts.
- Explicit Targets: Specify exactly what to validate to avoid ambiguity.
Validation Commands
The default openspec validate command triggers an interactive mode which will cause the agent to hang or fail. Use the following explicit commands instead:
Validate All
To validate the entire project:
openspec validate --all
Validate Changes
To validate only the currently changed files (useful for quick checks):
openspec validate --changes
Validate Specifications
To validate only the specification files:
openspec validate --specs
Validate Specific Item
To validate a specific item by name:
openspec validate <item-name>