Community程式設計與開發github.com

mattpocock/ask-matt

詢問哪個技能或流程適合你的情況。一個路由,用來導覽這個儲存庫中的技能。

ask-matt 是什麼?

這個技能作為一個智慧路由,引導開發者與 AI 代理(如 Claude Code)找到最適合當前開發情境的專用技能。它不直接執行任何特定動作,而是分析使用者問題,並推薦這個儲存庫中「主流程」(從點子到發布)、「上匝道」(除錯、分類)、「程式碼健康維護」或「詞彙層」等類別的技能。其主要價值在於消除因記憶模糊而選錯工具的認知負擔,顯著提升 AI 代理使用者的開發效率。透過結構化的決策樹與清晰的上下文管理指引(如上下文視窗限制處理),確保整個開發流程順暢、邏輯一致。支援所有主要的 AI 代理平台,其運作方式基於明確的 SKILL.md 文件定義。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mattpocock/skills/tree/main/skills/engineering/ask-matt

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

在你喜歡的 AI 中提問

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

說明文件

問問 Matt

你不可能記得每一個技能,所以儘管問。

一個流程就是一條穿過這些技能的路徑。大多數路徑沿著一條主要流程運行,並有兩條上匝道匯入其中。其他技能則是獨立運作,或是作為底層的詞彙層。

主要流程:點子 → 發布

這是大多數工作會走的路線。你有一個點子,並且想要把它建構出來。

  1. /grill-with-docs — 透過訪談來打磨點子。當你有程式碼庫時從這裡開始:它是有狀態的,會將學到的東西保留在 CONTEXT.md 和 ADR 中。(沒有程式碼庫?請使用 /grill-me — 請見獨立技能。兩者都執行相同的 /grilling 基本動作;grill-with-docs 是那個會留下紙本記錄的。)
  2. 分支 — 你能在對話中解決所有問題嗎? 如果一個問題需要可運行的答案(狀態、商業邏輯、你必須看到的 UI),可透過原型繞道,並在兩端使用 /handoff 作為橋樑(請見跨會話):
    • /handoff 出去,然後針對該檔案開啟一個新會話,
    • /prototype 用來用一次性程式碼回答問題,
    • /handoff 把你學到的東西傳回來,並從原始的點子討論串中參考它。
  3. 分支 — 這是一個需要多個會話的建構工作嗎?
    • 是 → /to-prd(將討論串轉換為 PRD) → /to-issues(將 PRD 拆分為可獨立處理的議題)。由於議題是獨立的,每個議題之間要清除上下文:為每個議題啟動一個全新的會話,並透過傳遞 PRD 和要處理的單一議題來開始執行 /implement。
    • 否 → 就在這裡,在同一個上下文視窗內執行 /implement。

不管是哪種方式,/implement 都會透過內部驅動 /tdd 來建構每個議題——一次一個紅綠循環——然後在提交前執行 /code-review 來結束,這是一個對 diff 進行的雙軸審查(標準 + 規格)。當你只是想先測試驅動地建構一個具體行為而沒有完整規格時,可以直接使用 /tdd;每當你想針對一個固定基準來審查分支或 PR 時,也可以單獨使用 /code-review。

上下文衛生

將步驟 1 到 3 保持在一個不中斷的上下文視窗中——在 /to-issues 之後才進行壓縮或清除——這樣打磨、PRD 和議題才能建立在相同的思考基礎上。之後每個 /implement 都會從議題開始,全新啟動。

這個的限制在於**聰明區間**:模型仍能清晰推理的視窗(在最先進的模型上約為 120k token)。如果一個會話在到達 /to-issues 之前就接近這個限制,不要繼續在效能下降的情況下硬撐——使用 /handoff 並在一個全新的討論串中繼續。

上匝道

一個起始情境,會產生工作,然後匯入主要流程。

  • 錯誤和請求堆積如山 → /triage。它會將議題通過分類角色進行處理,並產生代理可用的議題,這些議題之後由 /implement 接手。

分類只適用於不是你建立的議題——錯誤報告、進來的功能請求、任何未經處理的資訊。由 /to-issues 產生的議題已經是可以讓代理直接使用的,所以不要對它們進行分類。

  • 有東西壞了 → /diagnosing-bugs。專門對付棘手的問題:一眼看不出來的錯誤、間歇性的不穩定問題、在兩個已知良好狀態之間悄悄出現的回歸錯誤。它拒絕在還沒有緊密的回饋迴圈——一個已經能在這個錯誤上顯示紅色的指令——之前提出理論,然後用回歸測試來修復。當真正發現是沒有好的接縫可以鎖定錯誤時,其事後分析會移交給 /improve-codebase-architecture。

程式碼庫健康

不是功能開發,而是維護。

  • /improve-codebase-architecture — 每當有空閒時間就執行,以保持程式碼庫適合代理運作。它會找出深化機會;選擇一個會產生一個點子,你可以帶著這個點子沿著主要流程回到 /grill-with-docs。它是用來發現候選項目的調查;/codebase-design(見下方)則是用來設計所選項目的工作檯。

底層詞彙

兩個由模型調用的參考,在其他技能之下運作——各自是其詞彙的唯一真實來源。當詞語而非流程是問題時,可以直接使用它們;或者讓上述技能自動引入它們。

  • /domain-modeling — 打磨專案的領域語言:挑戰模糊的術語、解決過載的詞語(例如「account」同時做三件事)、將難以逆轉的決策記錄為 ADR。這是 /grill-with-docs 驅動的積極紀律,用以保持 CONTEXT.md 成為一份清晰的詞彙表。
  • /codebase-design — 用於設計模組形狀的深度模組詞彙(module, interface, depth, seam, adapter, leverage, locality):在一個乾淨的接縫處,用一個小巧的介面包裝大量的行為。/tdd 和 /improve-codebase-architecture 都使用這種語言。

跨會話

  • /handoff — 當一個討論串已滿,或者你需要分支出去(例如進入 /prototype 會話)時,這會將對話壓縮成一個 markdown 檔案。你不會在原地繼續——你開啟一個新會話並參考那個檔案來跨視窗傳遞上下文。它是上下文視窗之間的橋樑,雙向皆可。當你想要一個全新的會話但需要保留當前的對話時使用它。
  • /compact (內建)— 停留在同一個對話中,讓較早的對話內容被摘要。在階段之間的刻意斷點使用它,當你不介意失去逐字記錄時。不要在一個階段的進行中壓縮——代理可能會迷失方向。/handoff 是分岔;/compact 是繼續。

獨立技能

完全脫離主要流程。

  • /grill-me — 和 /grill-with-docs 一樣的嚴謹訪談,但適用於你沒有程式碼庫的時候。無狀態:它不會在本地儲存任何東西,也不會建立 CONTEXT.md。用它來打磨任何不存在於儲存庫中的計畫或設計。
  • /prototype — 一個小型、一次性的程式,用來回答一個設計問題:這個狀態模型感覺對嗎,或者這個 UI 應該長什麼樣子。從第一天起就是一次性的——保留答案,刪除程式碼。這是主要流程中步驟 2 的繞道路徑,但任何時候當一個設計問題很難在紙上解決時,都可以使用它。
  • /research — 將閱讀的苦工委派給一個背景代理:它會針對主要來源調查一個問題,然後在儲存庫中留下一個帶有引用的 Markdown 檔案。它在閱讀時你可以繼續工作。它產生的檔案是一個可以用來帶入主要流程到 /grill-with-docs 的東西——研究為思考提供養分,而非取代思考。
  • /teach — 跨越多個會話學習一個概念,使用當前目錄作為一個有狀態的工作區。
  • /writing-great-skills — 撰寫和編輯技能時的參考資料。

前置條件

/setup-matt-pocock-skills — 在你的第一個工程流程之前執行,以配置問題追蹤器、分類標籤和文件佈局,這些是其他技能所預期的。自訂的問題追蹤器也可以運作。

Individual skills in this repo

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

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.

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.

相關技能