Skip to content
Implement Spec

Implement Spec Skill

Matt Pocock's /implement-spec command: builds a whole spec from its tickets on one integration branch, running parallel implementer subagents in worktrees, then a code review before closing.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from mattpocock/skills.

$ npx skills add mattpocock/skills --skill implement-spec

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/implement-spec/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/mattpocock/skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/skills/engineering/implement-spec ~/.claude/skills/implement-spec

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/implement-spec/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Implements a whole spec from its tickets on one integration branch
  • Treats tickets as a task graph and works the ready frontier in parallel
  • One fresh implementer subagent per ticket, each in its own git worktree
  • Builds every ticket with the tdd skill; a merger subagent integrates
  • Runs code-review on the finished branch and fixes findings
  • Opens a draft PR that closes the spec when the tracker uses PRs

Implement Spec is the last step of Matt Pocock's spec workflow: after /to-spec has written a spec and /to-tickets has split it into tickets on your issue tracker, this command implements the whole thing. It is user-invoked only, and it expects the tracker configured by /setup-matt-pocock-skills; if none is set it tells you to run that first.

The tickets are treated as a task graph with blocking relationships, not a checklist, so there is always a frontier of tickets ready to start. The agent reads the spec and tickets, optionally runs an exploration subagent that saves notes outside the repo for later subagents to share, and creates an integration branch. Each ready ticket gets a fresh implementer subagent in its own git worktree and branch, running in the background where possible. Each implementer confirms its worktree is based on the integration branch, builds the ticket with the tdd skill and merges the integration tip before reporting done. A separate merger subagent folds finished work into the integration branch, and every merge that unblocks tickets starts more implementers.

Subagents communicate through pointers to the spec, tickets, notes and commits rather than copying context. When every ticket is done, the agent runs the code-review skill on the integration branch and fixes its findings in one more fresh subagent. If the tracker closes work through pull requests, a draft PR marked as closing the spec and tickets is opened after the first merge, gets the review comments and is marked ready; otherwise tickets are closed the tracker's way. Worktrees are cleaned up at the end.

Requires an agent that can run subagents and the companion tdd and code-review skills from the same repository. Unlike the single-ticket implement command, it orchestrates a full spec. MIT licensed.

SKILL.md

The instructions your agent loads, as published by Matt Pocock.

SKILL.md
name
implement-spec
description
Implement the result of /to-spec and /to-tickets in code.
disable-model-invocation
true

You have been provided a spec. This spec should have tickets associated with it, describing how to implement the spec.

The issue tracker should have been provided to you. If not, tell the user to run /setup-matt-pocock-skills.

The goal is the entire spec implemented on a single integration branch, with every ticket resolved the way the issue tracker closes work.

The tickets are not a list of steps. They are a task graph with blocking relationships between them. This means there is always a frontier of tickets which are ready to be grabbed.

Start every subagent with a fresh context window.

Communication to and from subagents should be sparse. Communicate primarily through context pointers: to the spec, tickets, research notes, and previous commits. Don't duplicate information already available via pointers.

Implementer subagents should be run in the background where possible for maximum concurrency.

Steps
  1. Read the spec and tickets to understand the task graph.
  1. (optional) Use an exploration subagent to conduct any exploration required by the tickets - relevant codebase files or external documentation. Ensure the exploration subagent can save files - it should save its markdown notes in a directory outside the repo, accessible by all future subagents. This lets implementer subagents focus on implementation rather than exploration.
  1. Create the integration branch. If the issue tracker closes work through PRs, or the user asks for one, open a draft PR after the first merge in step 5 (a branch with no commits ahead of main can't open one), marked as closing the spec and tickets.
  1. Use a fresh implementer subagent for each ticket, each in its own worktree on its own branch. Each implementer subagent:
  • confirms its worktree is based on the integration branch before starting, and resets onto it if not;
  • calls the Skill tool with tdd to build the ticket;
  • merges the integration branch tip into its own branch before reporting done
  1. Once an implementer subagent completes, merge its work to the integration branch with a merger subagent.
  1. If this changes the frontier of available tickets, kick off more implementer subagents to work on the new tickets. This allows for maximum concurrency.
  1. Once all tickets are complete, call the Skill tool with code-review on the integration branch. Fix all issues raised by the code review in a single fresh implementer subagent.
  1. If a draft PR exists, comment the code review's reports on it and mark it ready for review. Otherwise, resolve each ticket the way the issue tracker closes work, and report the integration branch.
  1. Clean up all implementer subagent worktrees.
Install
Featured

Build crash-safe AI agents on AgentKit and step.ai — durable tool calls, human-in-the-loop approval, realtime progress, and when not to reach for an agent loop at all.

VoltAgent's official conventions skill — when to reach for an agent versus a workflow, the expected project layout, and the core snippets for agents, workflows, memory and servers.

Browse all skills →