finalize
Skill2 starsChanged 4 months agoMITView on GitHub
Finalize working-copy changes, an existing PR, or both into an objectively merge-ready state. Use for a final pass, hardening, or ship readiness.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- MagicJosh/rastheir own version, first seen Oct 6, 2026
- grimoire-rs/grimoiretheir own version, first seen Oct 4, 2026
- zifeo/ladetheir own version, first seen Sep 25, 2026
- arusli1/askillstheir own version, first seen Sep 2, 2026
- redis/docstheir own version, first seen Aug 25, 2026
- gannonh/skillstheir own version, first seen Aug 24, 2026
Used with
Projects with it also use debug.
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.
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
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- educlopez/ui-craft★ 367same name
- zifeo/lade★ 133same name
- redis/docs★ 84same name
- griffinhilly/claude-code-synthesis★ 66same name
- skillberry-ai/cap-evolve★ 65same name
- alexiolan/craft-skills★ 17same name
- grimoire-rs/grimoire★ 14same name
- nicolasestrem/antigravity-gemini-skills★ 8same name
- gannonh/skills★ 2same name
- adambossy/skills★ 1same name
4 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 repository12 other files it gives its agents.
- adversarial-code-reviewSkill
- code-review-loopSkill
- effect-loggingSkill
- fly-optimizationSkill
- formattingSkill
- product-design-evolveSkill
- product-design-extendSkill
- product-design-propagateSkill
- simplifySkill
- style-docSkill
- test-value-auditSkill
- typescript-structureSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 53
Every finding is resolved as fixed, non-blocking follow-up, or blocker.
- Distinctive: line 69
Create a validation matrix before running checks: each material affected surface maps to a repository command or a safe behavioral exercise …
- Distinctive: line 86
Every changed file and credible affected surface is classified in the impact map.
- Distinctive: line 87
Every finding and PR-only review item in scope has a recorded disposition, with zero unresolved blockers.
- Distinctive: line 90
Every final hunk is accounted for and all unrelated working-tree changes remain intact.
- Very specific: line 93
If any statement is false, report BLOCKED and enumerate each unmet statement, its evidence, and the next decision or action needed.
“Common” is measured: kept by at least 6 in 10 of the 14 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
Own the last engineering pass on a working tree. The result is an objectively merge-ready tree or an explicit blocked outcome.
Ownership and Authorization
Finalize may inspect repository and read-only PR state, edit intended working-tree files, and run safe local, test, sandbox, simulator, or preview validation. Its default stopping point is the merge-ready tree and report.
Version-control transitions and external side effects are opt-in. Perform a branch creation or switch, commit or amend, push, PR creation or update, review reply or resolution, merge, deployment, release, publication, or external communication only when the user explicitly authorizes that class of action in the current conversation. Invocation of finalize alone grants none of those actions.
The explicit PR-to-deployment lifecycle belongs to code-review-loop; hand off to it only when the user requests that lifecycle. Behavior-preserving cleanup belongs to simplify.
Scope
- Determine whether the evidence source is the working-copy diff, an existing PR diff, or both. Use the user's stated scope; ask only when ambiguity could mix unrelated work.
- Inspect status, effective diff, changed files in full, relevant callers and tests, and applicable root-to-file repository instructions such as
AGENTS.md,CLAUDE.md, and their references. - Identify unrelated working-tree changes and preserve them. Restrict edits to intended files and hunks unless an affected dependency requires a clearly evidenced fix.
Scope is established when every changed file belongs to the intended change or is explicitly excluded, and every applicable instruction has been inspected.
Risk Tiers
Assign the highest tier whose condition applies and record the evidence:
| Tier | Conditions | Minimum depth |
| Low | Local implementation or documentation change with no shared contract, persisted data, security, concurrency, infrastructure, or rollout effect | Inspect the changed surface and direct tests; run targeted repository checks |
| Medium | Multi-file or shared-path behavior, dependency/config changes, indirect consumers, meaningful failure modes, or a non-trivial rollback | Trace affected callers and states; run affected-package checks and exercise the changed behavior |
| High | Authentication/authorization, public API compatibility, schema or persisted data, migrations, transactions/concurrency, infrastructure/deployment, broad architecture, or hard rollback | Trace end-to-end and operational impact; validate integrations plus applicable migration, rollback, rollout, observability, and containment paths |
A small diff can be high risk. Missing evidence raises the tier rather than lowering it.
Readiness Pass
1. Build the Impact Map
For every changed surface, record what changed, direct and indirect consumers, plausible failure modes, user or operational impact, and the validation that can detect each material regression. Classify every credible affected surface as checked, non-material with evidence, or blocked.
The impact map is complete when every changed file and every credible affected surface has one classification.
2. Resolve Shipping Findings
Investigate correctness, contracts, edge states, security, accessibility, failure handling, docs/configuration, rollout, and operability where the impact map makes them relevant. Record each finding with location, evidence, severity, proposed action, and verification.
Fix findings whose correct action is supported by repository evidence and fits the task boundary. Preserve product, API, migration, and rollout decisions as explicit blockers when intent cannot be inferred safely. Classify non-blocking follow-ups separately with the evidence that makes them safe to defer.
Every finding is resolved as fixed, non-blocking follow-up, or blocker; each disposition has a concrete reason.
3. Delegate Cleanup
Invoke simplify after correctness fixes, supplying the same working-tree or explicit base/head effective diff established for finalize. Its preservation contract, reviewer lenses, finding record, and completion gate are authoritative; finalize does not recreate or weaken them. A BLOCKED simplify result blocks finalize. A no-edit SIMPLIFIED result is valid when its exhaustive lens pass found no qualifying cleanup.
Cleanup is complete when simplify reports SIMPLIFIED and every cleanup edit appears in the final impact map and validation plan.
4. Handle PR-Only Evidence
When PR scope and read access are available, inspect required checks and every unresolved review thread. Convert correctness or shipping-risk feedback into findings, route behavior-preserving cleanup through simplify, and classify outdated, vague, stylistic, or out-of-scope feedback with a concise no-change rationale. Replying to or resolving a thread follows the authorization boundary.
PR evidence is complete when every unresolved thread and required check has a recorded disposition tied to the current PR head SHA.
5. Validate by Risk
Create a validation matrix before running checks: each material affected surface maps to a repository command or a safe behavioral exercise and an expected result. Use commands from repository instructions, package scripts, and CI rather than assuming a package manager.
Run the matrix plus git diff --check. For medium risk, include affected-package and real-flow coverage. For high risk, include the applicable integration and operational paths from the tier definition. Diagnose failures, fix those caused by the intended change, and rerun every invalidated row. Classify unrelated failures with evidence; a materially required unavailable or failing row is a blocker.
Validation is complete when every matrix row passes and every omitted check is shown to be non-material.
6. Audit the Final Tree
Re-read the complete diff and current status. Confirm that fixes address their findings, simplifications satisfy simplify, generated artifacts correspond to owned sources, documentation matches behavior, and unrelated user work remains intact.
The audit is complete when every final hunk maps to the intended change, a resolved finding, or an authoritative simplification finding.
Completion Gate
Report TREE_MERGE_READY only when all statements are true:
- Scope is established and the risk tier has evidence.
- Every changed file and credible affected surface is classified in the impact map; every material surface is verified.
- Every finding and PR-only review item in scope has a recorded disposition, with zero unresolved blockers.
simplifyreportsSIMPLIFIED, and every resulting edit is included in the impact map.git diff --check, every applicable repository-required check, and every validation-matrix row pass.- Every final hunk is accounted for and all unrelated working-tree changes remain intact.
- The authorization boundary was observed, so the report distinguishes tree readiness from unpublished or unmerged remote state.
If any statement is false, report BLOCKED and enumerate each unmet statement, its evidence, and the next decision or action needed. Confidence labels never substitute for this gate.
Report
Return the outcome, scope and risk evidence, fixed and deferred findings, surfaces verified, exact validation results, unverified blockers, and current tree/PR publication state. Keep follow-ups separate from blockers.
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.

