Agent skill · Documentation

spec-init

面向新项目或现有项目的文档驱动开发 skill。Use when the user wants to create, 补齐, 更新, or refine project specs, run a Spec Kit-inspired workflow loop, maintain workflow/knowledge/change docs, analyze consistency, converge implementation back into docs, or update README/AGENTS for a real project.

legelinggithub.com/legelingGitHub ↗
claude-codeships scriptsAGPL-3.0
Install
npx skills add legeling/PromptHub --skill spec-init --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 158
SKILL.md size: 11 KB
Bundled scripts: yes
Path: .agents/skills/spec-init/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,552
Language: TypeScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# /spec-init — Agent 驱动的文档开发 skill 这个 skill 不是“帮用户创建一堆空模板”的脚手架,也不是“固定 Bash 初始化器”。 它的真正职责是: - 先理解用户目标 - 先理解现有项目或上下文 - 通过 agent 的分析、追问、归纳和写作,产出真正可用的 spec - 用 spec 驱动后续设计、实现、测试和文档同步 - 把 spec 当成持续演进的项目资产,而不是一次性启动产物 ## 目标 - 帮用户把模糊想法整理成能执行的 spec - 帮已有项目补齐缺失的 intake / requirements / design / verification / tasks / rules - 帮用户区分 what / why / how / verify / do-next - 形成至少一条完整追踪链:`FR -> DES -> TEST -> T` - 在信息不足时主动提供候选方案、对比、建议,而不是只留下空白 - 帮用户逐步补全完整需求、完整设计、完整验证策略,而不是只停留在最小第一版 - 帮项目把测试策略、测试标准、测试设计、用例矩阵、回归套件、测试数据和覆盖映射拆成可维护文档,而不是把测试计划平铺成一份进展报告 ## 核心定位 默认把这个 skill 当成“agent 写 spec 的工作流”,不是“脚本生成目录”。 优先级: 1. 理解用户和项目现状 2. 读代码 / 读文档 / 读目录结构 3. 澄清关键问题 4. 产出或更新有内容的 spec 5. 必要时才借助模板或脚本补齐基础结构 ## 何时使用 - 用户说“帮我做 spec”“补需求文档”“整理设计文档”“先别写代码,先把文档理清” - 用户有现成项目,想补齐或更新 `docs/`、`README.md`、`AGENTS.md` - 用户想做文档驱动开发、spec-first、design-first、verification-first - 用户想让 agent 帮他决定还缺哪些文档、哪些规范、哪些待确认问题 ## 何时不要使用 - 用户只想要一个临时脚本、一次性 demo 或纯代码实现 - 当前任务只是修一个小 bug、补一条测试、做一次 review - 用户明确不想做 spec,只要直接写代码 ## 两种主要场景 ### 场景 A:新项目 用户只有一个想法、方向或需求草稿。 你要做的是: - 先把想法拆成 intake / requirements / design / verification / tasks - 如果用户不懂概念,主动给方案、对比和建议 - 不要只生成空文件;至少把当前已知信息写进去 ### 场景 B:现有项目 用户已经有代码或仓库,想完善、补齐或更新 spec。 你要做的是: - 先读仓库结构、README、核心代码、现有 d

What's inside
Steps it walks through
  1. 目标
  2. 核心定位
  3. 何时使用
  4. 何时不要使用
  5. 两种主要场景
  6. 场景 A:新项目
  7. 场景 B:现有项目
  8. 核心原则
  9. Repository Profiles
  10. 文档边界
  11. Spec Kit 借鉴的阶段循环
  12. 默认工作流
  13. Step 0: 判断是“新项目”还是“现有项目”
  14. Step 0.1: 识别本轮意图
Ships with 24 files
  • agents/openai.yaml
  • assets/templates/project/en/AGENTS.md.tmpl
  • assets/templates/project/en/README.md.tmpl
  • assets/templates/project/en/docs/00-intake/README.md.tmpl
  • assets/templates/project/en/docs/01-requirements/README.md.tmpl
  • assets/templates/project/en/docs/02-design/README.md.tmpl
  • assets/templates/project/en/docs/03-implementation/README.md.tmpl
  • assets/templates/project/en/docs/04-verification/README.md.tmpl
  • assets/templates/project/en/docs/05-tasks/README.md.tmpl
  • assets/templates/project/en/docs/adr/0000-record-template.md.tmpl
  • assets/templates/project/en/docs/adr/README.md.tmpl
  • assets/templates/project/en/docs/archive/README.md.tmpl
  • assets/templates/project/en/docs/changes/BUG-0001-template.md.tmpl
  • assets/templates/project/en/docs/changes/CR-0001-template.md.tmpl
  • assets/templates/project/en/docs/changes/README.md.tmpl
  • assets/templates/project/en/docs/changes/active/CHG-0001-template/design.md.tmpl
  • assets/templates/project/en/docs/changes/active/CHG-0001-template/impact.md.tmpl
  • assets/templates/project/en/docs/changes/active/CHG-0001-template/overview.md.tmpl
  • assets/templates/project/en/docs/changes/active/CHG-0001-template/tasks.md.tmpl
  • assets/templates/project/en/docs/changes/active/CHG-0001-template/verification.md.tmpl
  • assets/templates/project/en/docs/changes/completed/README.md.tmpl
  • assets/templates/project/en/docs/changes/legacy/README.md.tmpl
  • assets/templates/project/en/docs/issues/README.md.tmpl
  • assets/templates/project/en/docs/knowledge/behavior/README.md.tmpl
first 24 of 158
More from PromptHub
All skills →
About this skill
What does the spec-init skill do?

面向新项目或现有项目的文档驱动开发 skill。Use when the user wants to create, 补齐, 更新, or refine project specs, run a Spec Kit-inspired workflow loop, maintain workflow/knowledge/change docs, analyze consistency, converge implementation back into docs, or update README/AGENTS for a real project.

How do I install it?

Run `npx skills add legeling/PromptHub --skill spec-init --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From legeling/PromptHub, a repository with 1,552 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going