AI engineering workflow constraints
mattpocock/skills is a set of engineering workflows for AI agents that takes a feature from requirements clarification to release. It covers PRDs, issue breakdown, TDD implementation, review, diagnose and architecture cleanup; it is not provided as a single prompt. The repo describes its approach as real engineering, distinct from vibe coding, with small, composable and modifiable agent skills.
Each skill corresponds to an engineering action and provides instructions for that action:
/grill-with-docschallenges requirements and aligns domain language./to-prdcombines conversation context and codebase understanding into a PRD./to-issuessplits a PRD into independently implementable vertical slices./tddimplements through red-green-refactor./reviewchecks a diff along the Standards and Spec axes.
Skills connect through the repo's issue tracker and domain docs; setup configures these locations first.
Skill design follows clarification, planning, implementation and review in order. The official README also says agents accelerate software entropy, so use /zoom-out and /improve-codebase-architecture periodically to examine system design.
grill-with-docs
to-prd
to-issues
tdd
review
diagnose
把它當成 AI 工程流程的約束層,不是 prompt library。正確順序是:釐清需求 → 寫 PRD → 拆 vertical issues → TDD 實作 → review → diagnose / architecture cleanup。
Skill installation and repo setup
The official quickstart installs with one npx command. Choose your coding agent and select /setup-matt-pocock-skills.
# 官方 quickstart
npx skills@latest add mattpocock/skillsAfter installation, run the setup skill once in your coding agent. It configures the repo's issue tracker, triage labels and domain docs locations for /to-prd, /to-issues, /tdd, /diagnose and other skills.
/setup-matt-pocock-skillsInitial setup rules
Specify the issue tracker, triage labels and domain doc layout together during setup, giving later skills fixed read/write locations.
/setup-matt-pocock-skills
This repo uses GitHub Issues.
Use these triage labels:
- needs-triage
- needs-info
- ready-for-agent
- ready-for-human
- wontfix
Use a single-context domain doc layout:
- CONTEXT.md at repo root
- ADRs in docs/adr/Skills and engineering actions
The official reference lists 10 engineering skills:
diagnose
grill-with-docs
triage
improve-codebase-architecture
setup-matt-pocock-skills
tdd
to-issues
to-prd
zoom-out
prototype
The cards also include /review and /handoff, which are commonly used in workflows, grouped by work stage. The five core skills grill-with-docs, to-prd, to-issues, tdd and review can complete a workflow cycle.
Setup · 01
/setup-matt-pocock-skills
repo configuration
The skill configures the issue tracker, triage labels and domain docs locations for downstream skills. Run it first after installation.
Clarify · 02
/grill-with-docs
Requirements clarification
Before starting a feature, the skill challenges requirements, aligns domain language and checks existing code and documentation. It asks one question at a time and updates CONTEXT.md.
Plan · 03
/to-prd
PRD creation
The skill combines the current conversation and codebase understanding into a PRD with problem, solution, user stories, implementation/testing decisions and out of scope. It does not interview the user again.
Plan · 04
/to-issues
Vertical slice breakdown
The skill splits a PRD into independently implementable, demoable end-to-end slices (tracer bullets), marked AFK / HITL with dependency order. It does not create isolated schema/API/UI layer tasks.
Build · 05
/tdd
TDD implementation
The skill uses red-green-refactor to test observable behavior through public interfaces, excluding implementation details. It works on one behavior at a time in a vertical loop.
Debug · 06
/diagnose
Systematic debugging
The skill establishes feedback loop → reproduce → minimise → hypothesise → instrument → fix → regression test. It creates a reproducible pass/fail signal before fixing.
Review · 07
/review
Branch review
The skill compares the diff against a fixed point along the Standards and Spec axes. It reports blocking, non-blocking, missing tests and spec mismatch.
Understand · 08
/zoom-out
System overview
The skill clarifies a piece of code's role in the overall system, for an initial overview when taking over an unfamiliar codebase.
Architecture · 09
/improve-codebase-architecture
Architecture cleanup
The skill identifies shallow module interfaces, exposed complexity and maintenance problems caused by software entropy accumulated through rapid agent coding.
Handoff · 10
/handoff
Task handoff
Before interrupting a long task, the skill produces a handoff doc for the next agent and preserves task context.
Triage · 11
/triage
Issue classification
This official engineering skill classifies incoming issues using the triage labels configured during setup.
Prototype · 12
/prototype
Prototype exploration
This official engineering skill creates and validates disposable prototypes to explore directions before entering the formal PRD process.
Scenarios and skills
| Scenario | Avoid | Recommended use |
|---|---|---|
| Vague requirements | Asking the agent to start immediately | /grill-with-docs |
| Large feature | Asking the agent to finish everything at once | /to-prd → /to-issues → /tdd for each issue |
| Bug | Asking the agent to fix it immediately | /diagnose to establish a repro loop first |
| Tests | Asking the agent to increase coverage | /tdd for observable behavior |
| Review | Asking the agent "Check if anything is wrong" | /review main with a fixed point |
| Disorganized architecture | Asking the agent to refactor all | /zoom-out → /improve-codebase-architecture |
Three scenarios and three workflows
A. New feature planning
Set up repo rules, then use grill-with-docs to clarify requirements and write them to CONTEXT.md / ADR. Use to-prd to create a PRD and to-issues to split thin vertical slices. Implement each issue with tdd, then compare against the main branch with review main.
/setup-matt-pocock-skills
/grill-with-docs
/to-prd
/to-issues
/tdd
/review mainB. Bug fixes
Use diagnose to establish a reproducible feedback loop, then tdd to add a regression test and fix the bug. Finish with review main to check existing behavior.
Diagnosis sequence: feedback loop → reproduce → minimise → hypothesise → instrument → fix → regression-test. Establish an automatically runnable pass/fail signal before fixing, to avoid guessing at the bug.
/diagnose
/tdd
/review mainC. Architecture cleanup
For codebases disorganized by rapid agent coding, start with zoom-out for a system overview, then use improve-codebase-architecture to identify shallow interfaces and exposed complexity. Verify changes with tdd and finish with review main. The official README says agents accelerate software entropy, requiring periodic attention to system design.
/zoom-out
/improve-codebase-architecture
/tdd
/review mainReusable prompts by stage
Paste the templates for each stage and replace the bracketed content. /grill-with-docs asks the agent to pose one question at a time, recommend an answer for each and inspect the codebase when needed; the agent reads code for answers available in the codebase.
/grill-with-docs
I want to build [功能名稱].
Current goal:
[用 3-5 句描述你要做什麼]
Known constraints:
- [技術限制]
- [產品限制]
- [不能改的地方]
Please challenge the plan against the existing codebase, domain language, and ADRs.
Ask one question at a time.
For every question, provide your recommended answer.
If the answer can be found in the codebase, inspect the code instead of asking me./to-prd combines current conversation context and codebase understanding into a PRD without interviewing the user again. The PRD covers:
problem
solution
user stories
implementation decisions
testing decisions
out of scope
/to-prd
Create a PRD from the current conversation and codebase context.
Requirements:
- Do not add features we did not discuss.
- Use existing domain language from CONTEXT.md.
- Prefer existing test seams.
- Include user stories, implementation decisions, testing decisions, out-of-scope items.
- Publish it to the configured issue tracker./to-issues
Break this PRD into independently implementable vertical slices.
Rules:
- Prefer many thin slices over few thick slices.
- Each slice must be demoable or verifiable on its own.
- Mark each slice as AFK or HITL.
- Show dependencies between slices.
- Use acceptance criteria.
- Do not create horizontal tasks like "build API", "build UI", "write tests"
unless they are part of a complete vertical slice./tdd tests observable behavior through public interfaces, not implementation details. It uses a vertical red-green loop, completing one test and its implementation at a time instead of writing all tests before implementation.
/tdd
Implement issue #[issue-number] using strict TDD.
Rules:
- One behavior at a time.
- Write one failing test first.
- Implement only enough code to pass that test.
- Tests must verify public behavior, not implementation details.
- Do not mock internal collaborators unless unavoidable.
- After green, refactor only when tests pass.
- Run typecheck, lint, and tests before finishing./diagnose
Bug:
[描述錯誤]
Observed behavior:
[實際發生什麼]
Expected behavior:
[應該發生什麼]
Reproduction:
[步驟、command、URL、test、log]
Constraints:
- Do not guess before building a feedback loop.
- Create the smallest deterministic repro possible.
- Add a regression test after fixing./review compares the diff against a fixed point along the Standards and Spec axes, using issue references, PRD/spec, repo coding standards, CONTEXT, ADR and config as evidence.
/review main
Review this branch against main.
Check two axes:
1. Standards: does the code follow this repo's documented standards?
2. Spec: does the implementation match the originating issue / PRD?
Report:
- Blocking issues
- Non-blocking issues
- Missing tests
- Spec mismatch
- Suggested fixesLogin feature clarification and PR workflow
This email/password login example starts with /grill-with-docs, uses /to-prd and /to-issues for planning and breakdown, implements the first issue with /tdd, and finishes with /review main.
$ You › /grill-with-docs
I want to add email/password login to this app.
Known requirements:
- Users can sign in with email and password.
- Invalid credentials should show a safe generic error.
- Successful login redirects to dashboard.
- Reuse existing auth/session code if available.
- Do not add OAuth in this scope.
Ask one question at a time. Recommend an answer for each.
claude: Claude ›
hl: Q1 / 現有 session 用 cookie 還是 token?(我查到 src/auth/session.ts
hl: 已用 httpOnly cookie,建議沿用,不另開 token 路徑)
…釐清四個問題後,將術語與決策寫入 CONTEXT.md
$ You › /to-prd
Use existing auth terminology from CONTEXT.md.
Out of scope: OAuth, password reset, email verification.
ok: PRD: problem / solution / user stories / testing decisions / out-of-scope
$ You › /to-issues
Break the login PRD into vertical slices.
Each must include behavior, acceptance criteria, dependency order.
claude: Claude ›
#123 Login form happy path AFK 正確帳密 → 導向 dashboard
#124 Invalid credentials handling AFK 錯誤帳密 → generic error
#125 Session persistence check AFK 重新整理仍維持登入
#126 Auth copy / UX review HITL 人工確認錯誤訊息與 UX
$ You › /tdd
Implement issue #123 using strict red-green-refactor.
Start with the highest-level test seam available.
Do not implement invalid credential handling yet.
ok: typecheck ✓ lint ✓ tests ✓
$ You › /review main
Does this match #123? Are tests behavior-based?
Did we implement any out-of-scope auth features?
ok: Spec: matches #123 · no OAuth / reset leaked in
hl: Non-blocking: error copy 待 #126 HITL review
Workflow verification
grill-with-docs reads
src/auth/*before asking questions, finding answers already available in the codebase.to-issues splits login into independently demoable vertical slices, marked AFK and HITL.
tdd implements one behavior at a time and does not implement #124 error handling in advance.
review uses the Spec axis to confirm no out-of-scope OAuth functionality was added.
Six skills for a minimum configuration
Minimum viable configuration
These 6 skills complete an engineering workflow cycle. Add /diagnose for repos needing more debugging; add /zoom-out, /improve-codebase-architecture and /handoff for large codebases.
/setup-matt-pocock-skills
/grill-with-docs
/to-prd
/to-issues
/tdd
/review
# Debug 多的 repo 加
/diagnose
# 大型 codebase 加
/zoom-out /improve-codebase-architecture /handoff把它當成 AI 工程流程約束層,不是 prompt library。 釐清需求 → 寫 PRD → 拆 vertical issues → TDD 實作 → review → diagnose / architecture cleanup。