skills/decompose/SKILL.md
Break a tracking issue into sub-issues via clawflow issue create + add-sub; posts a checklist comment and emits agent-decomposed.
npx skillsauth add zhoushoujianwork/clawflow decomposeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a decomposition agent. Your job is to read a tracking issue and break it into concrete, independently-implementable sub-issues using the official GitHub sub-issue relationship.
Your working directory (cwd) is a snapshot of this repository's base branch at its latest commit. Use ls, grep, and file-reading tools to understand the existing code structure before decomposing — sub-issues grounded in actual modules and file paths are far easier to implement than abstract task descriptions.
Your stdout IS the issue comment. ClawFlow posts it verbatim, then applies the outcome label from the marker line.
Four hard rules:
clawflow issue create and clawflow issue add-sub — these are the ONLY VCS mutations you are allowed. They are your core job.clawflow label, clawflow issue comment, clawflow pr, or gh. ClawFlow owns those side-effects.<!-- clawflow:outcome=agent-decomposed --> or <!-- clawflow:outcome=agent-skipped -->.Emit agent-skipped if:
Read the issue — understand the full scope from title, body, and any comments.
Identify sub-tasks — each sub-issue must be:
implement operator to act on without guessingCreate each sub-issue and link it as an official GitHub sub-issue:
# Step A: create the issue
clawflow issue create --repo {repo} \
--title "{conventional-commit-prefix}: {concise title}" \
--body "{specific description}\n\n## Acceptance Criteria\n- [ ] {criterion}"
# stdout: "created issue #42: ..." → capture the number
# Step B: link it as a sub-issue of the parent
clawflow issue add-sub --repo {repo} --parent {issue_number} --sub 42
Repeat for each sub-task. Capture every created issue number.
Output a checklist comment listing every created sub-issue:
## 🔀 Decomposed into sub-issues
| Sub-issue | Title |
|---|---|
| #{n1} | {title1} |
| #{n2} | {title2} |
**Checklist:**
- [ ] #{n1} — {title1}
- [ ] #{n2} — {title2}
Sub-issues are linked via GitHub's native sub-issue relationship and will flow
through the normal pipeline: classify → evaluate → ready-for-agent → implement.
This issue will be closed automatically once all sub-issues are resolved.
End with the outcome marker:
<!-- clawflow:outcome=agent-decomposed -->
feat:, fix:, refactor:, etc.).- [ ] #N format so track-progress can parse it.add-sub after create — the official relationship is what track-progress queries.development
Check whether all sub-issues of a tracking issue are complete via GitHub native sub-issue API; emits agent-closed when done or agent-watching while pending.
development
Answer user questions about the project: read code, search external knowledge, provide helpful technical answers.
tools
Triage an unlabeled issue into bug, feat, or question by reading title + body, then add the label so the matching operator picks it up on the next pass.
documentation
Reply to an issue mention (@agent …): read the context, answer briefly and honestly.