implement
Skill2 starsChanged 7 months agoMITView on GitHub
Build a feature in an isolated worktrunk worktree, commit, and open a PR marked ready for review. Use whenever the user asks to implement, build, add, or fix something that touches code — e.g. '/implement', 'implement X', 'build X', 'add X', 'fix X', 'let's build it', 'ship it', 'drop this in', 'go code it up'. Skip for questions, explanations, research, and trivial one-line docs/config edits. Skip if already inside a worktrunk worktree (just implement directly).
- Reads credentials
- Commits and pushes
193 other projects use a version of this.
Adopted by
Most recently taken up by
- mattpocock/skillstheir own version, first seen Oct 8, 2026
- AlexisBalayre/claude-code-configtheir own version, first seen Oct 5, 2026
- KroxiDev/engineering-skillstheir own version, first seen Oct 5, 2026
- ofweb/skillstheir own version, first seen Oct 5, 2026
- roby2358/skillstheir own version, first seen Oct 5, 2026
- michielvandermeer/skillstheir own version, first seen Oct 4, 2026
Used with
Projects with it also use setup-ts-deep-modules, ask-matt and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
loulanyueSkillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 17 projects that use this
AWSSkillask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Also in 36 projects that use this
AWSSkillto-spec
Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed.
Also in 75 projects that use this
ArvorCoSkillspecify
Create feature specification from natural language description. Use when starting a new feature or creating a spec. Triggers on: create spec, specify feature, new feature spec.
Also in 12 projects that use this
qwlabsSkillclaude-handoff
Hand the current conversation off to a fresh background agent that picks up the work immediately.
Also in 18 projects that use this
RoentekSkillloop-me
Grill me about specs for the workflows I want to build, within this workspace.
Also in 22 projects that use this
- +5 more from aws
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- mattpocock/skills★ 335ksame name
- vinvcn/mattpocock-skills-zh-CN★ 4.6ksame name
- huggingface/OpenEnv★ 2.6ksame name
- stevesolun/ctx★ 588same name
- nodetool-ai/nodetool★ 551same name
- aws/graph-explorer★ 484same name
- boshu2/agentops★ 447same name
- devcxl/mattpocock-skills-zh★ 426same name
- bighadj22/codflow★ 338same name
- ninehills/skills★ 280same name
183 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- domain-researchSkill
- feed-safe-imagesSkill
- logo-designSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 11 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 17
Not in a git repo
- Distinctive: line 26
If the request is genuinely ambiguous (multiple valid interpretations, not just underspecified), ask one clarifying question inline and …
- Distinctive: line 27
If the change involves a non-trivial design choice, sketch 2–3 options with tradeoffs in a few lines and let the user pick before …
- Very specific: line 28
If scope feels too big for this lean flow — multi-subsystem, needs real architecture work — recommend /worktree-dev:worktree-dev and stop.
- Very specific: line 46
After each chunk, verify yourself before the next: read the diff, run the typecheck/lint/tests the agent claims passed.
- Distinctive: line 47
Follow the repo's CLAUDE.md rules and the user's memory feedback (minimalism, no premature abstractions, no unnecessary comments, no em …
- Distinctive: line 48
Keep the diff focused. No unrelated cleanup.
- Distinctive: line 63
No Co-Authored-By lines, no "Generated with Claude" signature.
- Very specific: line 64
If a pre-commit hook fails, fix the underlying issue, re-stage, and create a NEW commit.
- Distinctive: line 65
Before staging, scan the diff for obvious secrets (API keys, tokens, JWTs) — abort and warn the user if any appear.
- Very specific: line 92
If the branch name contains an issue number (fix/DEV-123-..., feat/42-...), include Closes #<number> in the body.
- Very specific: line 101
Check package.json for a dev script.
- Very specific: line 103
Start in the background using Bash's run_in_background: true:
- Distinctive: line 110
If the ready line doesn't appear within ~15 seconds, report that startup is still in progress, give the expected port (default + worktree …
- Distinctive: line 124
When the user signals the implement flow is done — PR approved, no more in-session iteration needed, or they switch topics — kill any …
- Distinctive: line 128
Do this proactively at end-of-flow.
- Distinctive: line 130
If the user is actively iterating (asking for follow-up edits in the same session), keep the server running — they'll want the preview.
- Very specific: line 137
No parallel architect/reviewer agents — that's /worktree-dev:worktree-dev.
- Very specific: line 138
No draft PRs. Always open ready for review.
- Very specific: line 139
No force-push, no --no-verify, no amending existing commits.
“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Implement: worktrunk-isolated build, ready-for-review PR out
A lean implementation flow. You've already discussed what to build in the conversation — this skill takes it from there: isolate to a worktree, implement, commit, push, open a PR that is ready for review. Stay in the worktree so the user can iterate on review feedback without switching. The PR is the merge path; wt merge is never used.
When NOT to invoke this skill
- Questions, explanations, code reading, research
- Trivial one-line edits to config/docs in the current repo (just edit in place)
- User explicitly says "do it here" / "don't branch"
- Already inside a worktrunk worktree (just implement + commit directly, no new worktree)
- Not in a git repo
- Change is genuinely multi-file with unclear scope and needs real architecture discussion — suggest the heavier
/worktree-dev:worktree-devflow instead
Workflow
1. Scope check (one paragraph, no questions unless truly ambiguous)
State in one sentence what you're about to build. Trust the conversation context — don't open an AskUserQuestion loop.
- If the request is genuinely ambiguous (multiple valid interpretations, not just underspecified), ask one clarifying question inline and stop.
- If the change involves a non-trivial design choice, sketch 2–3 options with tradeoffs in a few lines and let the user pick before proceeding (per the user's brainstorm-first preference).
- If scope feels too big for this lean flow — multi-subsystem, needs real architecture work — recommend
/worktree-dev:worktree-devand stop.
2. Create the worktree
Pick a descriptive branch name. Use repo convention prefixes (fix/, add/, feat/, chore/, refactor/, perf/) — check git log --oneline -10 if unsure.
wt switch --create <branch-name> --yesThis switches your working directory into the new worktree.
3. Implement (delegate, verify, repeat)
You orchestrate. You do not write code. Every code change goes to an implementer subagent (user-level agent at ~/.claude/agents/implementer.md: Opus, xhigh effort), one small chunk per agent.
- Split the work into the smallest chunks that each leave the repo building. Typical chunk: one module, one route, one migration, one test file. Never "implement the whole feature" in one agent.
- Spawn with the Agent tool,
subagent_type: "implementer", and a prompt that carries everything the agent needs: absolute repo path (the worktree), the exact files to touch, the conventions to follow, the verify commands, and what NOT to do. The agent has no conversation context. - After each chunk, verify yourself before the next: read the diff, run the typecheck/lint/tests the agent claims passed. Reject and re-spawn on anything that skips, casts to
any, disables rules, or drifts from the spec. - Follow the repo's CLAUDE.md rules and the user's memory feedback (minimalism, no premature abstractions, no unnecessary comments, no em dashes).
- Keep the diff focused. No unrelated cleanup.
- Ops, investigation, config, and one-line doc fixes stay with you. Code goes to the implementer.
4. Commit
git commit -m "$(cat <<'EOF'
<short message — match recent commit style>
EOF
)"Rules (same as /commit):
- Match recent commit style (
git log --oneline -10). - Focus on the "why" for non-trivial commits. For small chores, the "what" is enough.
- No Co-Authored-By lines, no "Generated with Claude" signature.
- If a pre-commit hook fails, fix the underlying issue, re-stage, and create a NEW commit. Never
--no-verify. Never--amend. - Before staging, scan the diff for obvious secrets (API keys, tokens, JWTs) — abort and warn the user if any appear.
5. Push and open a ready-for-review PR
git push -u origin <branch-name>Detect the base branch:
gh repo view --json defaultBranchRef -q '.defaultBranchRef.name'Open the PR ready for review (never draft, so AI reviewers like cubic run automatically):
gh pr create --title "<short title, under 70 chars>" --body "$(cat <<'EOF'
## Summary
<1-3 bullets — what changed and why>
## Test plan
- [ ] <relevant check>
- [ ] <relevant check>
EOF
)"- Base PR title + body on ALL commits on this branch vs. the default branch, not just the latest commit.
- If the branch name contains an issue number (
fix/DEV-123-...,feat/42-...), includeCloses #<number>in the body. - No "Generated with Claude" line by default. User's preferred voice: lowercase, direct, no em dashes.
6. Start the dev server (if the repo has one)
The whole point of worktree isolation is that multiple features can run side-by-side on different ports. Next.js, Vite, and most modern frameworks auto-increment the port if the default is taken — no flags needed.
Env files should already be present — worktrunk's user-level post-create hook at ~/.config/worktrunk/config.toml runs wt step copy-ignored after every wt switch --create, which copies .env.local, .env.*, node_modules, and other gitignored files from the source worktree. If the dev server fails on missing process.env.X, the hook didn't fire — fall back to a manual wt step copy-ignored --from <source-branch> before retrying.
- Check
package.jsonfor adevscript. If none exists (or the project isn't web/JS), skip this step. - Detect the package manager:
bun.lockb→bun,pnpm-lock.yaml→pnpm,yarn.lock→yarn, elsenpm. - Start in the background using Bash's
run_in_background: true:<pkg-manager> run dev - Poll the background output with
BashOutputuntil you see the "ready"/"local"/"listening" line that includes a port (http://localhost:3001,:5174, etc.). - Extract the port number.
If the ready line doesn't appear within ~15 seconds, report that startup is still in progress, give the expected port (default + worktree count), and continue — don't block the skill on server startup.
7. Report (tight — a few lines, not a wall)
Tell the user:
- Branch name + PR URL (the key output)
- Dev server URL (if started):
http://localhost:<port> - Files changed + commit hash
- Typecheck/test result if you ran one
- Any known limitations or follow-ups
- Reminder: "You're still in the worktree. When the PR merges, run
wt removeto clean up."
8. Clean up background tasks
When the user signals the implement flow is done — PR approved, no more in-session iteration needed, or they switch topics — kill any background tasks this skill started so they don't leak across sessions.
- Dev server:
killthe background task id, orps aux | grep -E "next.dev|vite|bun.*dev" | grep -v grep | awk '{print $2}' | xargs -r kill - Any other
run_in_background: truetasks this skill started - Do this proactively at end-of-flow; don't wait for the user to ask.
If the user is actively iterating (asking for follow-up edits in the same session), keep the server running — they'll want the preview. The trigger for cleanup is session boundary, not every tool call.
What this skill does NOT do
- No
wt switch -back to the original worktree — stay here for iteration. - No
wt merge— merging happens via the PR in GitHub. - No
wt remove— that's manual after PR merge. - No parallel architect/reviewer agents — that's
/worktree-dev:worktree-dev. - No draft PRs. Always open ready for review; if a PR ends up draft, mark it ready (
gh pr ready <number>, or GraphQLmarkPullRequestReadyForReview). - No force-push, no
--no-verify, no amending existing commits.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

