Community程式設計與開發github.com

mattpocock/implement-spec

根據規格說明來實作程式碼。

implement-spec 是什麼?

這個技能旨在根據一個包含任務圖(task graph)的規格文件來驅動完整的 PR 實作流程。它將規格分解為多個具有依賴關係的工單(tickets),並透過「前線」(frontier)機制動態調度實作子代理(implementer subagents),以達到最大並行度。技能支援在背景同時執行多個實作代理,並透過合併子代理(merger subagent)將其工作合併到主分支。此外,它還包含可選的探索子代理(exploration subagent)來預先收集必要資訊,以及最終的程式碼審查步驟,確保實作品質。適用於 Claude Code、Cursor 等支援自訂技能的開發者工具平台。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mattpocock/skills/tree/main/skills/in-progress/implement-spec

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

你已獲得一份規格說明。此規格應有關聯的工單,描述如何實作該規格。

目標是產生一個 PR,在單一分支上完整實作整個規格。

工單並非步驟清單。它們是一個任務圖,工單之間有阻塞關係。這表示總會有一個前線(frontier)上的工單可以立即被領取。

與子代理之間的溝通應保持精簡。主要透過上下文指標來溝通:指向規格、工單、研究筆記以及先前的提交。不要重複指標已提供的資訊。

實作子代理應盡可能在背景執行,以達到最大並行度。

步驟

  1. 閱讀規格與工單。閱讀足夠的內容以理解任務圖。

  2. (可選)使用探索子代理來進行工單所需的任何探索——相關的程式碼庫檔案或外部文件。確保探索子代理能夠儲存檔案——它應將其 Markdown 筆記儲存在儲存庫外的一個目錄中,該目錄對未來所有子代理都可存取。這讓實作子代理能專注於實作而非探索。

  3. 建立一個分支和一個草稿 PR。PR 應標記為「關閉」(closing)規格議題與工單。

  4. 使用實作子代理來實作每個工單。每個實作子代理應在自己的工作目錄(worktree)和自己的分支上工作。

  5. 當實作子代理完成後,使用合併子代理將其工作合併到 PR 分支。

  6. 如果這改變了可用工單的前線,則啟動更多實作子代理來處理新的工單。這樣可以實現最大並行度。

  7. 所有工單完成後,在 PR 分支上執行 /code-review。修復程式碼審查提出的所有問題,並在一個實作子代理中完成。

  8. 將 PR 標記為準備審查。

  9. 清理所有實作子代理的工作目錄。

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/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.

mattpocock/prototype

Build a throwaway prototype to flesh out a design — a runnable terminal app for state/business-logic questions, or several radically different UI variations toggleable from one route.

相關技能