work-on
Skill45 starsChanged 4 days agoMITView on GitHub
skill to "execute a task", "work on task N", or "implement TASK-NNN" - orchestrates worktree isolation, TDD implementation, validation, and merge.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- jamesm-dev/tateru.devtheir own version, first seen Nov 1, 2026
- tsukumogami/shirabetheir own version, first seen Oct 15, 2026
- angusfretwell/skillstheir own version, first seen Oct 13, 2026
- goern/forgejo-mcptheir own version, first seen Oct 9, 2026
- Automattic/jetpacktheir own version, first seen Oct 8, 2026
- RapierCraftStudios/ForgeDocktheir own version, first seen Oct 7, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- Automattic/jetpack★ 1.9ksame name
- goern/forgejo-mcp★ 152same name
- RapierCraftStudios/ForgeDock★ 119same name
- amurthygithub/Sharevalue_claude_skills★ 1same name
- angusfretwell/skills★ 1same name
- jamesm-dev/tateru.dev★ 1same name
- jasoncrawford/claude-skills★ 1same name
- tsukumogami/shirabe★ 0same name
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 repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- build-unplannedSkill
- check-specs-alignmentSkill
- create-tasksSkill
- debugSkill
- design-architectureSkill
- design-it-twiceSkill
- design-productSkill
- domain-modelingSkill
- doubt-driven-developmentSkill
- finalize-taskSkill
- groundwork-checkSkill
- groundwork-helpSkill
- handoffSkill
- implement-taskSkill
- instrument-observabilitySkill
- just-do-itSkill
- just-do-it-swarmingSkill
- plan-taskSkill
- review-prSkill
- select-projectSkill
- setup-repoSkill
- shipSkill
- skillsSkill
- source-architecture-from-codeSkill
- source-product-specs-from-codeSkill
- source-ux-design-from-codeSkill
- split-architectureSkill
- split-specsSkill
- staged-rolloutSkill
- statuslineSkill
- swarm-debugSkill
- swarm-design-architectureSkill
- task-validation-loopSkill
- test-driven-developmentSkill
- understanding-feature-requestsSkill
- use-git-worktreeSkill
- using-groundworkSkill
- ux-designSkill
- validateSkill
- vertical-sliceSkill
- work-on-next-taskSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
39 rules. 0 are common, 22 are distinctive, and 17 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
22
Distinctive
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
No narration turns: Do not output text-only turns like "Let me load the task" or "Now I'll launch the plan agent." Combine text with a tool …
- Distinctive: line 17
Batch tool calls: When multiple tool calls are independent, issue them all in one turn.
- Distinctive: line 18
No waiting updates: Do not output "Waiting for results..." turns.
- Distinctive: line 19
Keep context lean: Do not read file contents you won't use directly.
- Distinctive: line 23
Keep implementation and validation delegated to fresh, isolated contexts.
- Very specific: line 32
If effort is low or medium (i.e.
- Distinctive: line 33
If you are not Sonnet or Opus, you MUST show the recommendation prompt — regardless of effort level.
- Distinctive: line 51
If the user selects "Cancel — I'll switch first": output the switching commands and stop.
- Distinctive: line 56
After Step 2 produces the plan file, write the plan mode output:
- Very specific: line 77
Check skip flag: If session context contains GROUNDWORK_EXECUTE_SKIP_TO_STEP_SEVEN=true, set plan_file_path = $GROUNDWORK_EXECUTE_PLAN_FILE …
- Very specific: line 84
Run each actions command verbatim at its annotated moment: record … --phase plan right after the plan file is persisted, record … --phase …
- Very specific: line 85
When resume_existing_worktree is true, forward WORKTREE PATH: <expected_worktree>, TASK BRANCH: <expected_branch>, and RESUME EXISTING …
- Very specific: line 88
If yes → Is {{project_name}} non-empty?
- Very specific: line 89
If empty → Invoke Skill(skill="groundwork:select-project") to select a project, then restart this skill.
- Very specific: line 90
If set → Project is {{project_name}}, specs at {{specs_dir}}/.
- Distinctive: line 91
If no → Continue (single-project repo).
- Distinctive: line 94
If CWD is the repo root → fine, proceed.
- Very specific: line 95
Check which project's path CWD falls inside (compare against all projects in .groundwork.yml).
- Distinctive: line 96
If CWD is inside the selected project's path → fine, proceed.
- Very specific: line 97
If CWD is inside a different project's path → warn via AskUserQuestion:
- Very specific: line 101
If the user switches, invoke Skill(skill="groundwork:select-project").
- Distinctive: line 102
If CWD doesn't match any project → proceed without warning (shared directory).
- Very specific: line 110
No argument: Run /groundwork:work-on-next-task to determine the next workable task, then use that ID.
- Very specific: line 116
If session context contains GROUNDWORK_BATCH_MODE=true, batch mode is active.
- Very specific: line 122
Call Skill(skill="groundwork:plan-task") with the task ID from Step 1 in the conversation context.
- Very specific: line 149
Call Skill(skill="groundwork:implement-task") with task_id and plan_file_path in the conversation context.
- Very specific: line 161
Use AskUserQuestion to ask:
- Very specific: line 180
Run /clear to clear Claude Code context
- Distinctive: line 184
After validation passes, merge manually from the project root:
- Distinctive: line 198
Call the validate skill directly: Do NOT wrap this in a subagent — this skill runs in the main conversation, which CAN spawn the 9 …
- Distinctive: line 205
All required gates pass and all agents approve → Proceed to Step 5
- Distinctive: line 235
Ensure you are in the project root (cd out of worktree if needed)
- Distinctive: line 238
If success: Remove worktree and delete branch:
- Distinctive: line 243
If conflicts: Report conflicts and keep worktree for manual resolution
- Distinctive: line 271
After successful merge or user acknowledgment:
- Distinctive: line 281
If the task failed at any step, output:
- Very specific: line 292
If the merge did not happen, replace merged → <base> with pending at <worktree_path>.
- Distinctive: line 308
Before marking complete, verify ALL:
- Distinctive: line 317
If any unchecked: task is NOT complete.
“Common” is measured: kept by at least 6 in 10 of the 6 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
Execute Task Skill
Thin orchestrator that delegates to plan-task, implement-task, and validate skills for the three phases of task execution.
Token Discipline
This skill orchestrates long multi-agent workflows. Every turn re-reads the full context window, so unnecessary turns are expensive.
- No narration turns. Do not output text-only turns like "Let me load the task" or "Now I'll launch the plan agent." Combine text with a tool call in the same turn, or skip the text entirely.
- Batch tool calls. When multiple tool calls are independent, issue them all in one turn.
- No waiting updates. Do not output "Waiting for results..." turns. Wait silently until results arrive.
- Keep context lean. Do not read file contents you won't use directly. Pass file paths to subagents and let them read in their own context windows.
Delegation Ownership
Keep implementation and validation delegated to fresh, isolated contexts. The executor owns implementation and test monitoring; the validation coordinator owns its reviewer/fixer loop. The root owns dispatch, required decisions, and phase transitions.
Wait for completion, a concrete blocker, or a required decision. Do not request periodic progress, repeat the executor's checks, or independently monitor its test processes. Use existing runner status and heartbeats for routine visibility; intervene only on concrete failure or loss of liveness. Executors send exception reports and their terminal result, not periodic progress messages. Delegation for context isolation remains required.
Pre-flight: Model Recommendation
Your current effort level is {{effort_level}}.
Skip this step silently if effort is high, xhigh, or max (the scale is low < medium < high < xhigh < max, so xhigh and max are already above high) AND you are Sonnet or Opus.
If effort is low or medium (i.e. below high), you MUST show the recommendation prompt — regardless of model.
If you are not Sonnet or Opus, you MUST show the recommendation prompt — regardless of effort level.
Otherwise → use AskUserQuestion:
{
"questions": [{
"question": "Task execution benefits from consistent multi-domain reasoning.\n\nRecommended: Sonnet or Opus at high effort.\n\nTo switch: cancel, run `/effort high` (and `/model sonnet` if on Haiku), then re-invoke.",
"header": "Effort check",
"options": [
{ "label": "Continue anyway" },
{ "label": "Cancel — I'll switch first" }
],
"multiSelect": false
}]
}If the user selects "Cancel — I'll switch first": output the switching commands and stop. Do not proceed with the skill.
Plan Mode Handling
- Execute Steps 0-2 below as normal (they are read-only — planning produces a plan file).
After Step 2 produces the plan file, write the plan mode output:
## Task: [TASK-NNN] [Title] ### Execution Context **Working Directory:** [run `node ${CLAUDE_PLUGIN_ROOT}/lib/worktree-identity.js <TASK-NNN>` and use its `path` value — project-qualified in monorepos] **Branch:** [use the same helper output's `branch` value] **Base Branch:** [current branch] ## Implementation Plan **IMPORTANT: DO NOT just execute the plan below.** Re-invoke `groundwork:work-on` which will use the saved plan. Set: - `GROUNDWORK_EXECUTE_SKIP_TO_STEP_SEVEN=true` - `GROUNDWORK_EXECUTE_PLAN_FILE=<absolute path to plan file>` Then invoke `groundwork:work-on` with the same task ID.- Call
ExitPlanMode()
Step 0: Resolve Context
- Check skip flag: If session context contains
GROUNDWORK_EXECUTE_SKIP_TO_STEP_SEVEN=true, setplan_file_path = $GROUNDWORK_EXECUTE_PLAN_FILEand skip directly to Step 3 (Implementation). Do NOT read the plan file's contents into this orchestrator's context — the implement-task skill will pass the path to the executor agent. - Run the resume gate:
node ${CLAUDE_PLUGIN_ROOT}/lib/task-resume.js check <TASK-NNN>(add--project <name>in monorepos; run it after the task identifier is known from Step 1 if the ID was not supplied). The one-line JSON classifies any existing work-in-progress for this task. Act on it exactly as${CLAUDE_PLUGIN_ROOT}/references/task-resume-protocol.mdspecifies:live_ownernotnone→ standdown rule: report and stop.resume_at: conflict→ surface theevidence, preserve the worktree, and stop for a user decision.- Skip every phase in
skip_phases: reuseplan.fileinstead of Step 2 whenplan.present; jump to Step 4 (validation) or Step 5 (merge) when that much is already done. resume_at: done→ run theclear-checkpointaction and report the task complete.- Run each
actionscommand verbatim at its annotated moment:record … --phase planright after the plan file is persisted,record … --phase implementedright after Step 3 returnsRESULT: IMPLEMENTED, andclearafter Step 5's merge succeeds. - When
resume_existing_worktreeis true, forwardWORKTREE PATH: <expected_worktree>,TASK BRANCH: <expected_branch>, andRESUME EXISTING WORKTREE=trueinto the Step 3 dispatch.
- Monorepo check: Does
.groundwork.ymlexist at the repo root?- If yes → Is
{{project_name}}non-empty?- If empty → Invoke
Skill(skill="groundwork:select-project")to select a project, then restart this skill. - If set → Project is
{{project_name}}, specs at{{specs_dir}}/.
- If empty → Invoke
- If no → Continue (single-project repo).
- If yes → Is
- CWD mismatch check (monorepo only):
- Skip if not in monorepo mode or if the project was just selected above.
- If CWD is the repo root → fine, proceed.
- Check which project's path CWD falls inside (compare against all projects in
.groundwork.yml). - If CWD is inside the selected project's path → fine, proceed.
- If CWD is inside a different project's path → warn via
AskUserQuestion:"You're working from
<cwd>(inside [cwd-project]), but the selected Groundwork project is [selected-project] ([selected-project-path]/). What would you like to do?"- "Switch to [cwd-project]"
- "Stay with [selected-project]"
If the user switches, invoke
Skill(skill="groundwork:select-project").
- If CWD doesn't match any project → proceed without warning (shared directory).
Step 1: Parse Task Identifier
Parse the task identifier from the argument:
- Numeric (e.g.,
4): Interpret asTASK-004(zero-padded to 3 digits) - Full format (e.g.,
TASK-004): Use as-is - No argument: Run
/groundwork:work-on-next-taskto determine the next workable task, then use that ID. If it returns nothing workable, report and stop.
Error: Invalid format → "Please specify a task number, e.g. /groundwork:work-on 4 or /groundwork:work-on TASK-004"
Batch Mode Detection
If session context contains GROUNDWORK_BATCH_MODE=true, batch mode is active. In batch mode:
- All
AskUserQuestioncalls are skipped - On completion or failure, output a structured result line (Step 7)
Step 2: Plan → plan-task
Call Skill(skill="groundwork:plan-task") with the task ID from Step 1 in the conversation context.
Parse the output:
RESULT: PLANNED | plan_file_path=<path> | identifier=<id> | branch_prefix=<prefix>→ Saveplan_file_path,identifier,branch_prefix, then continue to Step 2.5 in this same turn.RESULT: FAILURE | ...→ Report failure. In batch mode outputRESULT: FAILURE | [TASK-NNN] <reason>and stop. In interactive mode, report the failure and stop.
Do NOT stop after planning. Planning is only the first of three phases in
work-on. The "DO NOT proceed past this step" note insideplan-taskapplies toplan-taskitself, not to this orchestrator — when control returns here withRESULT: PLANNED, you are NOT done. Never end your turn on a bare plan summary; the very next action after a successful plan is the Step 2.5 question.
Step 2.5: Confirm Start (Interactive Only)
Batch mode (GROUNDWORK_BATCH_MODE=true): Skip to Step 3.
Interactive mode: This question is mandatory — if you reached here with a plan, you must ask it rather than stopping. Use AskUserQuestion:
"[TASK-NNN] [Title] — plan ready. Proceed to implementation?"
- Option 1: "Yes, begin implementation"
- Option 2: "Stop here — I'll review the plan first"
If "Stop here": Print the plan file path and resume instructions, then STOP:
Plan saved to: <plan_file_path>
To resume implementation later:
/groundwork:implement-task <task-number>Step 3: Implement → implement-task
Call Skill(skill="groundwork:implement-task") with task_id and plan_file_path in the conversation context.
Parse the output:
RESULT: IMPLEMENTED | worktree_path=<path> | branch=<branch> | base_branch=<bb>→ Save values. Proceed.RESULT: FAILURE | ...→ Report failure. In batch mode outputRESULT: FAILURE | [TASK-NNN] <reason>and stop. In interactive mode, report and stop.
Step 3.5: Optional Context Clear Pause (Interactive Only)
Skip this step entirely if GROUNDWORK_BATCH_MODE=true — proceed directly to Step 4.
In interactive mode, the orchestrator's context now holds the plan summary and the executor result. Validation runs 9 reviewer agents and may iterate through a fix loop, which compounds context further. Offer the user a chance to stop here so they can clear context before validation begins.
Use AskUserQuestion to ask:
"Implementation complete for [TASK-NNN]. Validation runs 9 reviewer agents next and can compound context. Clear context before validation?"
- Option 1: "Continue to validation now"
- Option 2: "Stop here — I'll clear and resume manually"
If "Continue to validation now": Proceed to Step 4.
If "Stop here": Print the resume instructions below and STOP. Do NOT call validate. Do NOT proceed to Steps 4, 5, 6, or 7.
## Paused before validation
Implementation is committed in:
- **Worktree:** `<worktree_path>`
- **Branch:** `<branch>`
- **Base branch:** `<base_branch>`
To resume validation in a clean context:
1. Run `/clear` to clear Claude Code context
2. `cd <worktree_path>`
3. Run `/groundwork:validate`
After validation passes, merge manually from the project root:
cd <project_root>
git checkout <base_branch>
git merge --no-ff <branch>
git worktree remove <worktree_path>
git branch -d <branch>
Then mark **TASK-NNN** as `Complete` in the tasks file.This is a hard stop. The user explicitly chose to take over the rest of the workflow.
Step 4: Validate
Call the validate skill directly. Do NOT wrap this in a subagent — this skill runs in the main conversation, which CAN spawn the 9 validation subagents it needs.
cdinto the worktree path from Step 3- Call:
Skill(skill="groundwork:validate") - The validate skill will run 9 verification agents in parallel and fix issues autonomously.
After validate completes:
- All required gates pass and all agents approve → Proceed to Step 5
- Validation is incomplete because of an incidental or uncertain failure → Finish safe, independent work still within the task, preserve the implementation and valid evidence, then report implementation readiness, validation limits and any publication constraint together. Ask whether/how the user wants the separate issue investigated only once that work is ready. Do not restart validation or expand repair scope automatically. In batch mode, preserve the worktree and return
RESULT: FAILURE | [TASK-NNN] Validation incomplete: .... - Other validation failure or a stuck in-scope repair → Report the specific blocker and preserve completed work; in batch mode output
RESULT: FAILURE | [TASK-NNN] Validation failed: ...and stop.
Follow the validate skill's bounded failure assessment. A passing rerun does not prove a failure unrelated. Retain that assessment, checks already performed and the pending decision in the existing task/validation record across delegation and resume. Publication remains subject to the source workflow's rules and explicit user decisions; never report a failed or waived gate as passed.
Step 5: Merge
From the project root (NOT the worktree), handle merge:
Determine merge action:
| Condition | Behavior |
GROUNDWORK_BATCH_MODE=true | Auto-merge immediately |
GROUNDWORK_AUTO_MERGE env var is true | Auto-merge immediately |
| Otherwise | Prompt user for decision |
If prompting user:
Use AskUserQuestion to ask:
"Implementation and validation complete for [TASK-NNN]. Would you like me to merge this into [base-branch] now?"
- Option 1: "Yes, merge now"
- Option 2: "No, I'll merge manually later"
Wait for user response before proceeding.
If merging:
- Ensure you are in the project root (cd out of worktree if needed)
- Checkout base branch:
git checkout <base-branch> - Merge:
git merge --no-ff <branch> -m "Merge <branch>: [Task Title]" - If success: Remove worktree and delete branch:
git worktree remove <worktree-path from the execution context> git branch -d <branch> - If conflicts: Report conflicts and keep worktree for manual resolution
If not merging or conflicts occurred:
Report worktree location and manual merge instructions:
## Implementation Complete in Worktree
**Location:** [worktree path from the execution context]
**Branch:** [branch from the execution context]
When ready to merge:
```bash
git checkout [base-branch]
git merge --no-ff <branch>
git worktree remove <worktree-path>
git branch -d <branch>To continue working:
cd <worktree-path>
## Step 6: Complete Task
After successful merge or user acknowledgment:
1. **Update status** — Change task file to `**Status:** Complete` and update the status table in `{{specs_dir}}/tasks/_index.md` or `{{specs_dir}}/tasks.md` (change the task's row to `Complete`)
## Step 7: Report
**Batch mode (GROUNDWORK_BATCH_MODE=true):** Output the structured result as your final line:RESULT: SUCCESS | [TASK-NNN] [Task Title] - [one-line summary of what was done]
If the task failed at any step, output:RESULT: FAILURE | [TASK-NNN] [reason for failure]
**Interactive mode:** Output exactly one line:
Done: [TASK-NNN] merged → <base>. Validation passed in N iter(s).
If the merge did not happen, replace `merged → <base>` with `pending at <worktree_path>`.
---
## Reference
### Task Status Values
- `**Status:** Not Started`
- `**Status:** In Progress`
- `**Status:** Complete`
- `**Status:** Blocked`
### Dependency Handling
Task is blocked if `Blocked by:` lists any task not Complete.
### Final Checklist
Before marking complete, verify ALL:
- [ ] Working in the task worktree (path recorded from the worktree-identity helper)
- [ ] Plan agent was used (not your own plan)
- [ ] TDD was followed
- [ ] All acceptance criteria verified
- [ ] validate returned PASS (via direct Skill call)
- [ ] All validation fixes were applied by the validation-fixer subagent — zero `Edit`/`Write`/`NotebookEdit` calls and zero file-mutating `Bash` calls (`sed -i`, `awk -i`, `tee`, `>`, `>>`, etc.) by this orchestrator during the validation phase. If you fixed anything yourself instead of dispatching to validation-fixer, that is a violation of the validate hard rule and the task is NOT complete.
- [ ] Merge completed or user acknowledged worktree location
If any unchecked: task is NOT complete.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.

