skills/work-on-ticket-plan/SKILL.md
Execute an existing Jira ticket implementation plan phase by phase. Use when asked to "work on ticket CM-1234", "implement the plan for CM-1234", "start working on the plan", or "execute the next phase". Reads the plan from docs/<ticket-id>/plan.md, captures a pre-implementation full test baseline in plan/progress docs, presents each phase for user approval before coding, updates progress after each phase, and operates inside the dedicated git worktree. After the last phase is committed, runs the full test suite, fixes regressions (skipping known pre-existing failures), then presents a full change summary for user review and creates a GitHub draft PR using the create-draft-pr skill.
npx skillsauth add shysssthanhtri/AI-tools work-on-ticket-planInstall 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.
Execute an existing implementation plan for a Jira ticket phase by phase. Requires setup-new-work and plan-jira-ticket skills to have been run first.
You are a senior software engineer who follows a plan carefully. Before implementation, you capture a full test baseline; after the last phase, you run the full suite again and fix regressions before the final summary. You read each phase, explain exactly what you will do, wait for approval, implement the changes, and update progress before moving to the next phase.
docs/<ticket-id>/plan.mdsetup-new-work skill has been run — the worktree exists at ./worktrees/<ticket-id>-<platform>/plan-jira-ticket skill has been run — both docs/<ticket-id>/plan.md and docs/<ticket-id>/progress.md exist in the worktree| Parameter | Required | Description | Example |
|-------------|----------|------------------------------------|-----------|
| ticket-id | Yes | The Jira ticket key | CM-4873 |
CM-4873). If not provided, ask for it.if [ -n "$CURSOR_TRACE_DIR" ] || [ -n "$CURSOR_CHANNEL" ]; then
platform="cursor"
elif [ -n "$VSCODE_GIT_ASKPASS_NODE" ] || [[ "${TERM_PROGRAM:-}" == *vscode* ]]; then
platform="copilot"
else
platform="ai"
fi
repo_root="$(git rev-parse --show-toplevel)"
worktree="$repo_root/worktrees/<ticket-id>-$platform"
setup-new-work skill first.docs/<ticket-id>/plan.md exists inside the worktree. If not, stop and instruct the user to run the plan-jira-ticket skill first.docs/<ticket-id>/progress.md exists inside the worktree. If not, stop and instruct the user to run the plan-jira-ticket skill first.cd into the worktree:cd "$worktree"
docs/<ticket-id>/plan.md in full.docs/<ticket-id>/progress.md to determine which phases/tasks are already completed.When: Run once per ticket implementation, before presenting Phase 1 (or the next incomplete phase) for approval — and before any code changes for this ticket in the worktree.
Skip if: docs/<ticket-id>/progress.md already contains a completed Test baseline (pre-implementation) section (unless the user asks to refresh the baseline on a clean tree).
From the worktree root, run the full project test suite using the same command the repo uses in CI or README (e.g. composer test, phpunit, npm test, or monorepo equivalent). Capture the exact command and timestamp.
Record every failing test (names, data providers, or identifiers as printed by the runner). Passing tests need not be listed individually; store the summary counts (e.g. passed / failed / skipped).
Store the baseline so later runs can distinguish pre-existing failures from regressions:
docs/<ticket-id>/progress.md with: date, command, exit/summary line, and a bullet list of failing test identifiers (empty list if the suite was green).docs/<ticket-id>/plan.md with the same bullet list of failing tests (or a one-line note: “See progress.md — Test baseline” if the list is long). This keeps the plan document the single place reviewers look for scope context when they open the plan first.Add a Daily Log entry in progress.md noting the baseline run.
If the full suite cannot be run (missing deps, env), stop, report the blocker, and do not proceed with implementation until the user resolves it or explicitly accepts a narrower baseline (document that exception in progress.md).
For the next incomplete phase, present a structured summary to the user before writing any code:
## Phase <N>: <Phase Title>
**Goal:** <GOAL-xxx description>
**Tasks to implement:**
| Task | Description | File(s) |
|----------|---------------------------------|----------------------|
| TASK-xxx | <what will be done> | `path/to/file` |
| TASK-xxx | <what will be done> | `path/to/file` |
**Tests to add/update:**
| Test | Type | Description |
|----------|-------------|---------------------------------|
| TEST-xxx | Unit | <what it verifies> |
**Files that will be created or modified:**
| File | Action | Reason |
|-------------------|----------|---------------------------------|
| `path/to/file` | Modify | <why> |
| `path/to/newfile` | Create | <why> |
---
Do you approve this phase? Reply **yes** to proceed, or provide feedback to adjust the plan.
Do NOT write any code until the user explicitly approves.
Once the user approves:
Update docs/<ticket-id>/progress.md:
🟡 In Progress.Implement each task in the phase sequentially:
After all tasks in the phase are implemented:
# Run tests relevant to modified files
Update docs/<ticket-id>/progress.md:
After implementing the phase:
git status and/or git diff --name-only (and git diff --cached --name-only if anything is already staged). List every path that is part of this phase’s work — only files you changed for this phase; if unrelated changes appear in the worktree, call that out and exclude them from the commit list.## ✅ Phase <N> Complete: <Phase Title>
**Tasks completed:**
- [x] TASK-xxx — <description>
- [x] TASK-xxx — <description>
**Tests run:** <pass/fail summary>
**Files changed:**
- `path/to/file` — <what changed>
**Files to be committed:** (exact set for `git add` / this commit)
- `path/to/file`
- `path/to/other`
If nothing should ship yet, say so and do not ask for **commit** until resolved.
**Progress:** Phase <N> of <total> complete.
---
Please review the changes. When ready, reply **commit** to commit this phase's changes, or provide feedback.
Do NOT start the next phase until the phase changes have been committed.
After the user replies commit (or equivalent):
Stage only the files listed under Files to be committed in the Step 5 report (re-verify with git status if the tree changed since the report):
git add <paths from Files to be committed>
Load and follow the conventional-commit skill to generate and execute the commit message.
feat, fix, refactor, test).After the commit is made, present a brief confirmation:
✅ Phase <N> changes committed.
Ready to proceed to Phase <N+1>. Reply **next** to continue, or provide feedback.
Do NOT start the next phase until the user explicitly replies to proceed.
On the first run for the ticket, execute Step 2b once before Step 3. Then repeat Steps 3–5b for each phase, always:
conventional-commit skill before advancing.After the last phase is committed, run Step 6a before Step 7.
When: Immediately after the last phase’s changes have been committed (Step 5b for the final phase) — before Step 7 (final summary to the user).
progress.md (and plan.md if duplicated):
progress.md and optionally in the Step 7 summary.conventional-commit skill for those commits; update progress.md Daily Log with the full-suite result and any regression fixes.Do not present the Step 7 final summary until Step 6a is satisfied (full suite green, or green aside from known baseline failures).
Once all phases have been completed and committed and Step 6a is complete:
## 🎉 Implementation Complete: <ticket-id>
All phases of the implementation plan have been completed.
---
### Summary of Changes
**Phases completed:** <N> of <N>
**All files changed:**
| File | Action | Phase | Description |
|------|--------|-------|-------------|
| `path/to/file` | Modified | Phase 1 | <what changed> |
| `path/to/file` | Created | Phase 2 | <what changed> |
**Tests added/updated:**
| Test file | Type | What it verifies |
|-----------|------|-----------------|
| `path/to/test` | Unit | <description> |
**Key decisions made:**
- <any notable implementation decision or deviation from the original plan>
**Full test suite (post-implementation):**
- Command: `<same as baseline>`
- Result: <pass / pre-existing failures only — list identifiers>
- Regressions fixed: <brief list or "none">
---
Please review the complete summary above.
Reply **create PR** to open a draft pull request, or provide feedback if further changes are needed.
docs/<ticket-id>/progress.md:
🟢 Completed.Do NOT create the PR until the user explicitly approves the summary.
Once the user approves the final summary (replies "create PR" or equivalent):
Load and follow the create-draft-pr skill to create the GitHub draft pull request.
Pass the ticket ID so the skill can:
After the PR is created, confirm with the URL and status reported by the create-draft-pr skill.
Apply these rules every time docs/<ticket-id>/progress.md is updated:
YYYY-MM-DD when a task changes state.| Issue | Solution |
|-------|----------|
| Worktree not found | Run the setup-new-work skill first |
| Plan not found | Run the plan-jira-ticket skill first |
| Progress file missing | Run the plan-jira-ticket skill first |
| All phases already completed | Inform user — no further work needed |
| User skips a phase | Warn that phases may have dependencies; proceed only if user confirms |
| Tests fail after implementation | Stop, report failures, do not mark phase as complete until resolved |
| Baseline already in progress.md | Skip Step 2b re-run unless user asks to refresh |
| Full suite fails after last phase | Step 6a: fix regressions; only ignore failures that match pre-implementation baseline |
tools
Generate a complete MCP server project in TypeScript with tools, resources, and proper configuration
tools
Use when starting work on a Jira ticket. Fetches ticket details via Atlassian MCP (for branch naming and a local story snapshot), creates an isolated git worktree with branch feature/<ticket-id>-<slug>-<platform>, and writes docs/<ticket-id>/<ticket-id>.md in the worktree.
documentation
Create a work plan for a Jira ticket. Use when asked to plan work, create a plan for a ticket, break down a Jira issue, or prepare implementation steps for a Jira ticket ID like CM-1234. Reads local ticket details, deeply analyzes requirements and root causes, proposes up to three optimized solutions (not workarounds) with pros and cons, asks the user to choose, then finalizes the plan with that choice under docs/<ticket-id>/.
development
Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders.