finalize
Skill2 starsChanged 6 days agoMITView on GitHub
Finalize work on one bead — self-review, refactor, add tests, run lint and tests until clean, get a senior review, then commit with the user's approval and close the bead. Use for /finalize, or when the user says a task's work is done. Runs once per bead; /close-shop closes the session.
- Commits and pushes
23 other projects use a version of this.
Adopted by
Most recently taken up by
- skillberry-ai/cap-evolvetheir own version, first seen Nov 8, 2026
- PL-Coding-GmbH/Skillstheir own version, first seen Nov 8, 2026
- DnsQueen/orcinus-skillstheir own version, first seen Nov 8, 2026
- MagicJosh/rastheir own version, first seen Nov 2, 2026
- SDSLeon/lightcodetheir own version, first seen Nov 1, 2026
- griffinhilly/claude-code-synthesistheir own version, first seen Nov 1, 2026
Used with
Projects with it also use simplify, debug and 3 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.
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 3 projects that use this
AnthropicSkilldebug
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
Also in 3 projects that use this
Microsoft AzureSkillverify
End-to-end app testing pipeline for browser-based web apps on cloud browsers via Azure Playwright Workspaces: verify the live app, author tests for working flows, heal failing tests, then re-run with video and produce one consolidated report. Three phases (app verification, test authoring, test healing) plus a scoped final sanity run; each phase emits a sub-report. Use when asked to "verify my app", "make sure my app works and has good test coverage", "do a full QA pass", "add tests where I'm missing coverage", "fix failing tests and add new ones", "smoke test before deploy", "QA my deployment", or any combined verify-and-test ask. Requires Azure CLI (`az login`) and a Playwright Workspace resource ID — bootstraps configs on first invocation. Browser-based web apps with Playwright only — not for unit/API tests, native mobile/desktop, load/perf, or full accessibility audits.
Also in 3 projects that use this
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions23 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 23
- morethanwords/tweb★ 2.7ksame name
- educlopez/ui-craft★ 441same name
- zifeo/lade★ 136same name
- Porabuild/Poracode★ 121same name
- SDSLeon/lightcode★ 121same name
- redis/docs★ 86same name
- skillberry-ai/cap-evolve★ 70same name
- griffinhilly/claude-code-synthesis★ 67same name
- PL-Coding-GmbH/Skills★ 18same name
- alexiolan/craft-skills★ 17same name
13 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 repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- changelogSkill
- close-shopSkill
- deferSkill
- review-titlesSkill
- start-taskSkill
- statusSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. 0 are common, 18 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
18
Distinctive
This author's own choices. Worth a look.
5
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 12
Before changing anything, review your own work with a critical eye:
- Distinctive: line 14
Run git diff to see all changes made this session
- Distinctive: line 15
Check for wrong-approach errors: did you pick a strategy that's more complex than needed?
- Distinctive: line 16
Check for misread-code errors: did you assume something about the existing codebase that isn't true?
- Distinctive: line 17
Check for logic inversions: RTL/LTR swaps, off-by-one errors, flipped conditionals, wrong operator
- Distinctive: line 18
Check for regressions: did you break something that was working before?
- Distinctive: line 20
If you find problems, fix them now before proceeding.
- Distinctive: line 27
Ensure callers appear before callees in each file (top-down organization)
- Distinctive: line 29
Ensure consistent patterns with the existing codebase
- Distinctive: line 33
Add new tests covering the new code where appropriate
- Distinctive: line 34
Test docstrings must explain: why the test matters, what bug it prevents, what it covers
- Distinctive: line 42
If neither exists, skip this step.
- Very specific: line 45
Run make lint from the project root
- Distinctive: line 53
Ensure critical paths and new code are covered by tests
- Distinctive: line 56
If linting or tests fail, fix the issues and repeat steps 5-6
- Distinctive: line 58
Only proceed when both commands succeed with zero errors
- Very specific: line 64
Call advisor() on the finished change.
- Distinctive: line 67
If the user opts to fix something, make the fix and re-run steps 5–6 (lint and test) before continuing.
- Very specific: line 95
Create a git commit message with the bead ID parenthesized at the end of the first line, e.g.: Add report lineage fields (proj-d3j.2)
- Distinctive: line 96
Check the bead's notes for design decisions and context that should inform the commit message
- Distinctive: line 97
Ask the user for approval, then run git commit
- Very specific: line 98
Only now, bd close <id> --suggest-next.
- Very specific: line 101
Then ask the user: was that the session's last bead?: If it was, /close-shop is next.
“Common” is measured: kept by at least 6 in 10 of the 23 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
Finalize work on an issue
Perform the following steps in order. Do not skip steps.
1. Self-Review
Before changing anything, review your own work with a critical eye:
- Run
git diffto see all changes made this session - Check for wrong-approach errors: did you pick a strategy that's more complex than needed? Is there a simpler, more standard way to achieve the same thing?
- Check for misread-code errors: did you assume something about the existing codebase that isn't true? Verify key assumptions by re-reading the relevant code.
- Check for logic inversions: RTL/LTR swaps, off-by-one errors, flipped conditionals, wrong operator
- Check for regressions: did you break something that was working before?
If you find problems, fix them now before proceeding. Do not mention the self-review to the user unless you found and fixed something — then briefly note what you caught.
Then call advisor() for a transcript-aware second opinion — it sees your full session reasoning, so it catches wrong-approach and misread-code errors early, while changes are still small and cheap to undo. Surface any real findings to the user and fix what you both agree on before proceeding. (If no advisor tool is available in the session, say so once and go on.)
2. Refactor Session Code
- Review all code changes made in the current session
- Eliminate code duplication (DRY principle)
- Ensure callers appear before callees in each file (top-down organization)
- Fill in missing docstrings/comments -- focus on "why", not "what"; audience is senior devs
- Ensure consistent patterns with the existing codebase
- Do NOT make functional changes -- refactoring only
3. Add Tests
- Add new tests covering the new code where appropriate
- Test docstrings must explain: why the test matters, what bug it prevents, what it covers
- Tests go in files mirroring source structure
4. User- and Project-Specific Steps
Extensions are read from two places, user first, then project, and both are followed:
~/.claude/skill-extensions/finalize.md— the user's own conventions, the same in every project..claude/skill-extensions/finalize.mdin the project — that project's: API type regeneration, doc updates, and the like.
If neither exists, skip this step.
5. Run Linting
- Run
make lintfrom the project root - Fix ALL linting errors and warnings
- Minimize suppressing comments -- rewrite code to pass checks instead
- Ensure consistent formatting
6. Run Tests
- Run
make testfrom the project root - Fix any failing tests
- Ensure critical paths and new code are covered by tests
7. Iterate Until Stable
- If linting or tests fail, fix the issues and repeat steps 5-6
- Continue until both
make lintandmake testpass cleanly - Only proceed when both commands succeed with zero errors
8. Senior Review
With the change complete, lint-clean, and tests passing, get a senior review before committing:
- Call
advisor()on the finished change. It is transcript-aware: it knows your intent and what you tried, so it judges whether the whole change is sound. - Scale by change size. For a non-trivial diff, also spawn one fresh subagent (
Exploreorgeneral-purpose) given only the diff and a one-line scope. Because it has none of your reasoning, it reads the code cold — an independent fresh-eyes pass that isn't anchored to how you narrated your own work. For a trivial diff,advisor()alone is enough. - Surface every finding to the user, each with your proposed response (fix / won't-fix / not-a-bug). The user decides what to act on — do not silently apply or dismiss findings.
- If the user opts to fix something, make the fix and re-run steps 5–6 (lint and test) before continuing. Only proceed to close once gates pass again.
9. Close Issue
Close the bead last — after the commit is approved, not before. The neighbour check below can change what the commit message should say, and a commit the user declines or sends back for a fix must not leave a closed bead behind it.
Check which other beads this work changed. Closing your own bead is the easy half; the beads that quietly became done — or half-done — are the ones nobody looks at again. Cast a narrow net, scoped to this change: this is a task close, not the session-wide sweep
/close-shopruns.bd show <id>for what this bead hangs off, andbd list --parent=<parent>for its siblings if it has a parent.bd search <keyword>on the files, subsystem, or symptom you just touched. An older bead filed against the same bug from a different angle is exactly what this catches and nothing else does. Then, per hit, one of:- Now also done — your change satisfies it. State the evidence and ask before closing; do not close someone else's bead on your own reading of the diff.
- Partially done —
bd update <id> --append-notes=...with what your change already covers and what is left, so the next agent does not redo the covered half. - Now wrong — its description assumes something your change made untrue. Correct the description.
- Superseded —
bd supersede <old> --with=<new>, not a silent close.
A bead that is merely blocked or no longer wanted is not done: that is
/defer's job, and closing to park destroys discoverability.- Create a git commit message with the bead ID parenthesized at the end of the first line, e.g.:
Add report lineage fields (proj-d3j.2) - Check the bead's notes for design decisions and context that should inform the commit message
- Ask the user for approval, then run
git commit - Only now,
bd close <id> --suggest-next. What--suggest-nextprints is work that just became startable — next-work, not beads to re-verdict against the bullet above. - DO NOT run
bd syncorgit push - Then ask the user: was that the session's last bead? If it was,
/close-shopis next. You cannot know the answer — the session may well continue — so ask rather than guess, and ask rather than stay silent:/close-shopis the only thing that ever re-reads the standing memories and the still-open beads, and it only helps if it gets typed. - Work on this bead is complete from the agent's perspective. Stop here.
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.

