openspec

A specification-driven development process that records proposed software changes, implementation tasks, and updates to the project’s current behavior specifications.

In plain words
What is it for?
Use it when adding or changing features in an existing project, especially when the change needs a written proposal and task checklist.
Why use it?
It makes the intended behavior explicit and aligns the plan before code is written.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/itmisx/deepx-code/openspec
Any agent
npx skills add itmisx/deepx-code --skill openspec
Clone the repo
git clone --depth 1 https://github.com/itmisx/deepx-code

Made for: Claude Code, Codex.

Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00073 $0.01344
Opus 5 $0.00036 $0.00672
Sonnet 5 $0.00015 $0.00269
Haiku 4.5 $0.00007 $0.00134

Measured yesterday against content hash 3857d09b51d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openspec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/skills/openspec/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenSpec — 规格驱动开发(SDD)

提炼自官方 OpenSpec(https://github.com/Fission-AI/OpenSpec)的约定、文件格式与流程。 核心:"Agree before you build" —— 改动的行为规格写清楚、与用户对齐后,再写实现代码。

理念(不是僵硬的瀑布)

  • fluid not rigid:不设阶段闸门,可按合理顺序产出 artifacts。
  • iterative not waterfall:边做边学,规格可迭代细化。
  • easy not complex:轻量、少仪式。
  • brownfield-first:多数是改既有系统,所以用 delta(增/改/删) 描述"对现有行为的改动",而非从零描述整个系统。

目录两区

openspec/
  specs/                          # 真相基线:系统【当前】如何工作(按 capability 分)
    <capability>/spec.md
  changes/                        # 提案:对基线的【改动】,每个改动一个文件夹
    <change-id>/
      proposal.md                 # 为什么 + 改什么
      design.md                   # 可选,仅复杂改动写(技术方案/取舍)
      tasks.md                    # 实现清单
      specs/<capability>/spec.md  # 该改动对规格的 DELTA(ADDED/MODIFIED/REMOVED)

specs/ 是源头真相;changes/<id>/ 是尚未合并的改动。归档时 change 的 delta 合并进 specs/

文件格式(照官方,别自由发挥)

proposal.md

## Why
<动机:为什么要这个改动>

## What Changes
### 1. <子改动>
<说明>
### 2. <子改动>
...

tasks.md

## 1. <分组>
- [ ] 1.1 <小而可验证的任务>
- [ ] 1.2 ...
## 2. <分组>
- [ ] 2.1 ...

specs//spec.md —— 关键:delta 格式

ADDED / MODIFIED / REMOVED / RENAMED 标 delta;每条 Requirement 用 SHALL,且至少含一个 Scenario:

## ADDED Requirements
### Requirement: <名称>
<The system SHALL ...>

#### Scenario: <场景名>
- **WHEN** <条件>
- **THEN** <预期>
- **AND** <附加预期>

## MODIFIED Requirements
### Requirement: <已存在的需求名>
<改后的 SHALL 描述 + 场景>

## REMOVED Requirements
### Requirement: <要删除的需求名>

绝不README.md 或自由 bullet 代替——必须是 spec.md,且用上面的 Requirement + Scenario(WHEN/THEN)结构。

design.md(可选)

仅当改动复杂、需要记录架构 / 关键决策 / 取舍时才写;简单改动跳过。

工作流

  1. Propose:在 openspec/changes/<change-id>/ 建文件夹,写 proposal.md +(需要时)design.md + tasks.md + specs/<capability>/spec.md(delta)。分成"短到能读完"的小块给用户看,迭代到对齐。
  2. Implement:对齐后按 tasks.md 逐项实现,严格遵循 spec delta;每完成勾掉。若现实迫使偏离规格,先停下更新规格、重新对齐,别默默跑偏。
  3. Archive:改动完成并验证后,把它的 spec delta **应用(apply)**进 openspec/specs/ 基线,并把 change 文件夹移入归档(如 openspec/changes/archive/)。
    • 应用语义:ADDED → 把该 Requirement 加入基线;MODIFIED → 用新内容替换基线里同名 Requirement;REMOVED → 从基线删除该 Requirement。
    • 关键:## ADDED/MODIFIED/REMOVED只属于 change 里那份 delta 的标记。基线 specs/<capability>/spec.md当前真相,只保留当前的 Requirements / Scenario,不要带这些 delta 标记(用 ## Requirements 或直接列 ### Requirement: 即可)。换句话说:归档是"把 delta 应用进基线",不是"把 delta 整份拷进基线"。

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 98 lines · 73 tokens per session scan A 3857d09b51d5

Subscribe to this mod's changes

openspec is a skill published in the GitHub repository itmisx/deepx-code (383 stars, last pushed 7d ago), licensed MIT. It adds 73 tokens to every session and 1,344 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.