Skip to main content

spec-kit

规范驱动开发(SDD)工具集。为 AI 编码助手(Claude Code / Codex)提供知识库骨架和技能包。

PyPI 发行名为 spec-kit-tool(spec-kit 与已有项目 speckit 撞名),安装后提供 spec-kit 命令。

pipx install spec-kit-tool
cd my-project
spec-kit install --agents claude-code,codex

组成

组件 说明
spec-kit install 部署 .spec/ 知识库骨架 + 按 agent 部署技能到对应目录(--agents 指定或交互式多选)
spec-kit upgrade 升级已有安装
spec-kit uninstall 回收已部署的技能
spec-kit scan frontmatter 检索与发现(层级树;自动排除归档目录 prd/design/fix)
spec-kit lint 全面一致性校验(跳过归档目录 frontmatter 校验)
spec-kit metrics 项目健康指标查看
spec-kit skill 全局技能库管理(list/search/push/install/remove;全局缺失但项目 .spec/skills/ 存在时项目内直装)
spec-kit version 版本信息
spec-kit help 命令说明总览 / 单命令详情(如 spec-kit help skill)

部署后的工作流

/context      → 加载上下文
/iteration    → 创建迭代
/prd          → 需求结构化
/design       → 方案设计
/research     → 技术调研(优先复用过往结论)
/dev          → TDD 实现
/fix          → Bug 修复
/change       → 轻量变更(微调/局部优化)
/complete     → 窗口提交

技能包

技能是跨 agent 的公共格式(Agent Skills 标准)。以下技能随 install 部署:

技能 说明
prd 需求结构化 — 多阶段并行 Agent 管道
design 方案设计 — 全栈编排,先后端后前端
dev TDD 开发 — 骨架 → 测试 → 实现
fix Bug 修复 — 根因定位 → 方案 → 落地
change 轻量变更 — 需求微调、局部优化(绕过完整设计)
research 技术调研 — 方案对比、选型建议(优先复用过往调研,过期才重调研)
complete 窗口提交 — 声明 + 域知识 + 规则 + 进度 + 技能沉淀(决策清单判定 + 沉淀后推送/安装询问)
context 上下文加载
iteration 迭代初始化
checkout 迭代切换
grill-me 方案质询

全局技能库

/complete 沉淀的技能写入 .spec/skills/,可推送到全局技能库(~/.spec-kit/skills/)供其它项目复用:

spec-kit skill push {name}          # 项目技能 → 全局库
spec-kit skill list                 # 列出全局库技能
spec-kit skill search {keyword}     # 搜索
spec-kit skill install {name}       # 全局库 → 当前项目所有声明 agent
spec-kit skill remove {name}        # 从全局库移除

支持的 CodingAgent

agent 技能目录
claude-code .claude/skills/
codex .codex/skills/

版本

spec-kit version

开发与发布(维护者)

发布流程分两步,凭据从本地 .env.release 读取(已 gitignore,模板见 .env.release.example):

python scripts/release.py                 # 版本递增(默认 patch+1;--major/--minor/--patch/--to X.Y.Z)
python -m build                           # 构建 wheel + sdist
python scripts/publish.py                 # 上传 TestPyPI(测试环境)
python scripts/publish.py --prod          # 上传正式 PyPI
python scripts/publish.py --check-only    # 仅 twine check

.env.release 需分别配置 TestPyPI 与正式 PyPI 的 token:

TESTPYPI_USERNAME=__token__
TESTPYPI_PASSWORD=pypi-xxx
PYPI_USERNAME=__token__
PYPI_PASSWORD=pypi-yyy

许可

MIT

Metadata

Release files for spec-kit-tool 1.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spec-kit-tool 1.7.1
File Size Uploaded
spec_kit_tool-1.7.1.tar.gz 90.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spec-kit-tool 1.7.1
File Interpreter ABI Platform
spec_kit_tool-1.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 193.5 kB

Release files / spec_kit_tool-1.7.1.tar.gz

Download URL spec_kit_tool-1.7.1.tar.gz
Size 90.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8158fa0d23148576502077db762aa04eb15a209cb209883191a5c4c5def4805e
BLAKE2b-256 checksum
How to use checksums
5dd46b3bae37d5bfb1c84bb0cf5dcfc2644bf5a6cb29ad1a37c5f12a6d7c28de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Release files / spec_kit_tool-1.7.1-py3-none-any.whl

Download URL spec_kit_tool-1.7.1-py3-none-any.whl
Size 103.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09110291c67a340cc3f31274f99af6e09036702472b30e0973e9a29b7f84d9d0
BLAKE2b-256 checksum
How to use checksums
c2ce8a54b594507ea6b2e1796319555092bab56c1c75a8c2c3d9c5449ae647a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.1

Release history Release notifications | RSS feed

1.8.0

2 release files

This release

1.7.1 This release

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page