返回 Skill 列表
extension
分类: 开发与工程无需 API Key

openspec-cli

在非交互环境中使用OpenSpec CLI工具的指南。在验证规范或更改时,请使用此技能以确保命令可以在没有用户干预的情况下成功运行。

person作者: jakexiaohubgithub

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>