openspec-cli
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.
When & Why to Use This Skill
This Claude skill provides essential guidelines for operating the OpenSpec CLI within non-interactive environments like MCP. It ensures seamless specification validation by providing specific command flags that bypass interactive prompts, preventing agent timeouts and streamlining the development workflow.
Use Cases
- Automated Project Validation: Validating an entire project's specifications using the --all flag to ensure consistency in automated environments.
- Incremental Change Verification: Running quick checks on modified files with the --changes flag to catch specification errors during iterative development.
- Targeted Specification Audits: Validating specific items or individual specification files by name to isolate and resolve issues within complex architectures.
| 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. |
| 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>