Community编程与开发github.com

mattpocock/to-spec

将当前对话转化为技术规范,并发布到项目的议题跟踪器中:无需额外访谈,仅对已讨论内容进行综合。

to-spec 是什么?

该技能利用当前对话上下文和代码库理解,自动生成一份技术规范(spec)。它完全避免了对用户的额外访谈,而是基于已有讨论进行智能综合与提炼。使用时,技能会先探索仓库以了解代码库当前状态,并使用项目的领域术语表和架构决策记录(ADR)。然后,它会识别出最高效的测试接缝(seam),并向用户确认这些接缝是否合适。最后,技能会按照预定义模板撰写包含问题陈述、解决方案、用户故事、实现决策、测试决策和范围外内容的规范,并将其发布到项目的议题跟踪器,同时应用`ready-for-agent`分类标签。此技能适用于Claude Code、Cursor、Codex等AI代理平台,支持自动从对话生成规范以加速开发流程。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mattpocock/skills/tree/main/skills/engineering/to-spec

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

此技能基于当前对话上下文和代码库理解生成技术规范。请勿访谈用户;仅需综合您已经了解的信息。

议题跟踪器和分类标签词汇表应已提供给您。如果尚未提供,请告知用户运行 /setup-matt-pocock-skills。

流程

  1. 探索代码仓库以了解代码库的当前状态(如果尚未进行)。在整个规范中使用项目的领域词汇表,并尊重所涉及区域的任何架构决策记录(ADR)。

  2. 勾勒出您将用于测试该功能的接缝。应优先使用现有接缝,而不是新建接缝。使用尽可能最高层的接缝。如果需要新的接缝,请在尽可能高的点提出。代码库中的接缝越少越好——理想数量为一个。

与用户确认这些接缝是否符合他们的期望。

  1. 使用下面的模板编写规范,然后将其发布到项目的议题跟踪器。应用 ready-for-agent 分类标签——无需额外的分类。

问题陈述

用户面临的问题,从用户的角度出发。

解决方案

问题的解决方案,从用户的角度出发。

用户故事

一个详尽的编号列表,列出用户故事。每个用户故事应符合以下格式:

  1. 作为<角色>,我想要<功能>,以便<收益>

<用户故事示例>

  1. 作为移动银行客户,我想要查看账户余额,以便我能对自己的支出做出更明智的决策 </用户故事示例>

此用户故事列表应非常详尽,涵盖该功能的所有方面。

实现决策

所做的一系列实现决策。可以包括:

  • 将要构建/修改的模块
  • 这些模块将要修改的接口
  • 来自开发者的技术澄清
  • 架构决策
  • 模式更改
  • API 契约
  • 特定交互

不要包含具体的文件路径或代码片段。它们可能会很快过时。

例外:如果原型生成了一个比文字更精确地编码决策的代码片段(如状态机、reducer、模式、类型形状),请在相关决策内内联它,并简要注明它来自原型。只保留包含决策的核心部分,而非完整的工作演示,仅保留重要内容。

测试决策

所做的一系列测试决策。包括:

  • 关于如何定义良好测试的描述(仅测试外部行为,不测试实现细节)
  • 将要测试的模块
  • 测试的先前示例(即代码库中类似类型的测试)

范围外内容

本规范范围外的事项描述。

进一步说明

关于该功能的任何进一步说明。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

mattpocock/ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

mattpocock/caveman

Ultra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.

mattpocock/claude-handoff

Hand the current conversation off to a fresh background agent that picks up the work immediately.

mattpocock/codebase-design

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

mattpocock/design-an-interface

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

mattpocock/diagnose

Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression.

mattpocock/diagnosing-bugs

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

mattpocock/domain-modeling

Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.

mattpocock/edit-article

Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

mattpocock/git-guardrails-claude-code

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

mattpocock/grilling

Grill the user relentlessly about a plan or design. Use when the user wants to stress-test a plan before building, or uses any 'grill' trigger phrases.

mattpocock/grill-me

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".

mattpocock/grill-with-docs

Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.

mattpocock/handoff

Compact the current conversation into a handoff document for another agent to pick up.

mattpocock/implement

Implement a piece of work based on a PRD or set of issues.

mattpocock/implement-spec

Implement a specification in code.

mattpocock/improve-codebase-architecture

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

mattpocock/loop-me

Grill me about specs for the workflows I want to build, within this workspace.

mattpocock/migrate-to-shoehorn

Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

mattpocock/obsidian-vault

Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.

相关技能