finalize
Run the post-implementation quality assurance workflow including tests, code polishing, review, and commit. Use when the user asks to "finalize implementation", "finalize changes", "wrap up implementation", "finish up", "ready to commit", or "run QA workflow".
Install
npx skills add https://github.com/tobihagemann/turbo/tree/main/codex/skills/finalize
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install tobihagemann-turbo@llmmart
git clone https://github.com/tobihagemann/turbo.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole tobihagemann/turbo collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Finalize Implementation
Post-implementation QA workflow: tests, code polishing, commit, self-improvement, and landing the pull request.
Task Tracking
At the start, use update_plan to track each phase, restating any remaining steps of a parent workflow alongside them:
- Run
$polish-codeskill - Run
$simplify-docsskill - Run
$update-changelogskill - Run
$self-improveskill - Ship It
- Run
$land-prskill
Workflow state lives in a file under .turbo/workflows/ that pairs one-to-one with the thread's goal. When no unfinished goal exists, mint its path once as .turbo/workflows/<label>-<tag>.md. The label is the governing plan's slug when one is in context, otherwise the current branch name with non-alphanumerics replaced by hyphens. The tag is the output of head -c 4 /dev/urandom | xxd -p. Only when this run's create_goal attempt succeeds, write the file with this invocation's update_plan list as a checkbox list. When an unfinished goal already exists, mint nothing and mirror into the workflow file its objective names; when it names none, continue without workflow state. Mirror every update_plan call into the file; it holds the pipeline's remaining steps and their statuses. When this run created the goal, run the terminal step in order: mark the final entry completed, mark the goal complete with update_goal, delete the workflow file, then emit any halt message.
Then attempt create_goal with the objective, filling in the minted path: "Run $finalize post-implementation QA on the staged changes through Phase 6 (Run $land-pr skill). Workflow state:
Phase 1: Run $polish-code Skill
Run the $polish-code skill for the current changes.
Phase 2: Run $simplify-docs Skill
Run the $simplify-docs skill on the staged changes (git diff --cached). Stage any edits it makes before continuing.
Phase 3: Run $update-changelog Skill
Run the $update-changelog skill. Stage any edits it makes before continuing.
Phase 4: Run $self-improve Skill
Run the $self-improve skill for the current session. Always run this phase even if the session seemed routine.
Phase 5: Ship It
Step 1: Analyze Split
Examine the staged changes and evaluate whether they form a single reviewable unit or several independently reviewable units. This step decides only whether to split; the chosen ship skill owns all repository-state detection and the commit, push, branch, and PR intent.
Run git diff --cached --stat and git diff --cached to understand the scope. Categorize changes along three dimensions:
- Concern type: refactoring, bug fix, new feature, cleanup, dependency update
- Layer/domain: backend, frontend, database migrations, i18n, tests, configuration
- Logical unit: files that form a coherent, independently reviewable change
A split is warranted when the staged changes contain multiple reviewable units. Each unit should be independently understandable, testable, and revertable. When deciding group boundaries, consider whether a reviewer could evaluate each group without needing context from the others.
Step 2: Present Analysis and Choose Path
Output the split analysis as text.
If changes form a single cohesive unit, note this and run the $ship skill.
If changes span multiple reviewable units, propose an ordered list of groups. For each group, specify:
- Name and one-line description
- File list (flag files with mixed-concern hunks)
- Dependencies: which earlier groups, if any, this group builds on
Use request_user_input to let the user choose whether to ship the changes together or split them up.
- Ship together — ship all staged changes as one unit; run the
$shipskill - Split up — ship each group as its own unit; run the
$split-and-shipskill
Phase 6: Run $land-pr Skill
Skip this phase when Phase 5 neither opened a pull request nor pushed to the branch of an open one. When Phase 5 left a pull request's body with the user instead of opening it, present $turbo:land-pr to run once it is posted, and skip the skill.
When Phase 5 opened or pushed to several pull requests, present $turbo:land-pr <number> for each, to run from that pull request's checkout, and skip the skill.
Otherwise, run the $land-pr skill for that pull request.
If this run created a goal, follow the closing update_plan call below by marking the goal complete with update_goal, then deleting the workflow file. Then call update_plan to mark this step completed and continue with the next step of the active workflow.
Rules
- Diff size, number of files changed, passing tests, perceived user urgency, or context window concerns are not reasons to skip a phase. Each phase does work beyond what those signals cover. "The session was long" or "a prior phase was thorough" are never valid reasons to skip a later phase.
- Never stage or commit files containing secrets (
.env, credentials, API keys). Warn if detected. - Do not present diffs to the user — the user reviews diffs in an external git client. Use
git diffinternally as needed. - If a non-test step fails (polish, review), stop and report the failure. Do not skip ahead.
Files (turbo)
-
SKILL.md 5.7 KB
--- name: finalize description: "Run the post-implementation QA workflow: tests, code polishing, review, and commit. Use when the user asks to \"finalize changes\", \"wrap up implementation\", \"finish up\", or \"ready to commit\"." --- # Finalize Implementation Post-implementation QA workflow: tests, code polishing, commit, self-improvement, and landing the pull request. ## Task Tracking At the start, use `update_plan` to track each phase, restating any remaining steps of a parent workflow alongside them: 1. Run `$polish-code` skill 2. Run `$simplify-docs` skill 3. Run `$update-changelog` skill 4. Run `$self-improve` skill 5. Ship It 6. Run `$land-pr` skill Workflow state lives in a file under `.turbo/workflows/` that pairs one-to-one with the thread's goal. When no unfinished goal exists, mint its path once as `.turbo/workflows/<label>-<tag>.md`. The label is the governing plan's slug when one is in context, otherwise the current branch name with non-alphanumerics replaced by hyphens. The tag is the output of `head -c 4 /dev/urandom | xxd -p`. Only when this run's `create_goal` attempt succeeds, write the file with this invocation's `update_plan` list as a checkbox list. When an unfinished goal already exists, mint nothing and mirror into the workflow file its objective names; when it names none, continue without workflow state. Mirror every `update_plan` call into the file; it holds the pipeline's remaining steps and their statuses. When this run created the goal, run the terminal step in order: mark the final entry completed, mark the goal complete with `update_goal`, delete the workflow file, then emit any halt message. Then attempt `create_goal` with the objective, filling in the minted path: "Run `$finalize` post-implementation QA on the staged changes through Phase 6 (Run `$land-pr` skill). Workflow state: <workflow path>; mirror every `update_plan` call into it. Loop state lives under `.turbo/loops/`. After any context compaction, re-read the workflow file and every ledger it registers, and continue from the first unfinished entry. Mark this goal complete when Phase 6 finishes." If an unfinished goal already exists, an outer workflow owns it; continue without creating one. ## Phase 1: Run `$polish-code` Skill Run the `$polish-code` skill for the current changes. ## Phase 2: Run `$simplify-docs` Skill Run the `$simplify-docs` skill on the staged changes (`git diff --cached`). Stage any edits it makes before continuing. ## Phase 3: Run `$update-changelog` Skill Run the `$update-changelog` skill. Stage any edits it makes before continuing. ## Phase 4: Run `$self-improve` Skill Run the `$self-improve` skill for the current session. Always run this phase even if the session seemed routine. ## Phase 5: Ship It ### Step 1: Analyze Split Examine the staged changes and evaluate whether they form a single reviewable unit or several independently reviewable units. This step decides only whether to split; the chosen ship skill owns all repository-state detection and the commit, push, branch, and PR intent. Run `git diff --cached --stat` and `git diff --cached` to understand the scope. Categorize changes along three dimensions: - **Concern type**: refactoring, bug fix, new feature, cleanup, dependency update - **Layer/domain**: backend, frontend, database migrations, i18n, tests, configuration - **Logical unit**: files that form a coherent, independently reviewable change A split is warranted when the staged changes contain multiple reviewable units. Each unit should be independently understandable, testable, and revertable. When deciding group boundaries, consider whether a reviewer could evaluate each group without needing context from the others. ### Step 2: Present Analysis and Choose Path Output the split analysis as text. If changes form a single cohesive unit, note this and run the `$ship` skill. If changes span multiple reviewable units, propose an ordered list of groups. For each group, specify: - Name and one-line description - File list (flag files with mixed-concern hunks) - Dependencies: which earlier groups, if any, this group builds on Use `request_user_input` to let the user choose whether to ship the changes together or split them up. - **Ship together** — ship all staged changes as one unit; run the `$ship` skill - **Split up** — ship each group as its own unit; run the `$split-and-ship` skill ## Phase 6: Run `$land-pr` Skill Skip this phase when Phase 5 neither opened a pull request nor pushed to the branch of an open one. When Phase 5 left a pull request's body with the user instead of opening it, present `$turbo:land-pr` to run once it is posted, and skip the skill. When Phase 5 opened or pushed to several pull requests, present `$turbo:land-pr <number>` for each, to run from that pull request's checkout, and skip the skill. Otherwise, run the `$land-pr` skill for that pull request. If this run created a goal, follow the closing `update_plan` call below by marking the goal complete with `update_goal`, then deleting the workflow file. Then call `update_plan` to mark this step completed and continue with the next step of the active workflow. ## Rules - Diff size, number of files changed, passing tests, perceived user urgency, or context window concerns are not reasons to skip a phase. Each phase does work beyond what those signals cover. "The session was long" or "a prior phase was thorough" are never valid reasons to skip a later phase. - Never stage or commit files containing secrets (`.env`, credentials, API keys). Warn if detected. - Do not present diffs to the user — the user reviews diffs in an external git client. Use `git diff` internally as needed. - If a non-test step fails (polish, review), stop and report the failure. Do not skip ahead.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.