Community程式設計與開發github.com

mattpocock/to-spec

將目前的對話轉化為規格書並發佈到專案問題追蹤器:無需面試,僅綜合你已討論的內容。

to-spec 是什麼?

這個技能會根據目前的對話上下文與對程式碼庫的理解,自動產生一份規格書(spec)。它不會向使用者提問,而是單純綜合你已經討論過的內容。使用者需要先設定技能(執行 `/setup-matt-pocock-skills`)以提供問題追蹤器與標籤詞彙。技能流程包括探索程式碼庫、使用專案領域詞彙、繪製測試接縫(seams)並與使用者確認,最後使用提供的模板撰寫規格書,發佈到專案問題追蹤器,並加上 `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. 身為一個行動銀行客戶,我想要檢視我帳戶的餘額,以便我能針對我的支出做出更明智的決定 </使用者故事範例>

這份使用者故事列表應極為詳盡,涵蓋該功能的所有方面。

實作決定

已做出的實作決定列表。這可以包括:

  • 將被建構/修改的模組
  • 那些將被修改的模組的介面
  • 來自開發者的技術說明
  • 架構決策
  • Schema 變更
  • API 合約
  • 具體互動

請不要包含具體的檔案路徑或程式碼片段。它們可能很快就會過時。

例外:如果一個原型產生了某個片段,其編碼決策的精確度超越散文(例如狀態機、reducer、schema、型別形狀),請將它內嵌在相關決策中,並簡短註明它來自原型。修剪到決策豐富的部分,不需要一個可運行的展示,只保留重要的部分。

測試決定

已做出的測試決定列表。包括:

  • 好測試的定義描述(只測試外部行為,不測試實作細節)
  • 將測試哪些模組
  • 測試的既有前例(即程式碼庫中類似類型的測試)

超出範圍

對此規格書而言超出範圍的事項描述。

進一步備註

關於該功能的任何進一步備註。

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.

相關技能