finalize-commits

Run isolated per-commit QA across unpushed commits and coordinate approved corrections before publishing.

4|1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/alvis/.agents --skill finalize-commits-alvis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finalize-commits
Source: https://github.com/alvis/.agents/tree/main/plugins/coding/skills/finalize-commits
Command: npx skills add https://github.com/alvis/.agents --skill finalize-commits-alvis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Unpushed commit stacks often contain commits that fail in isolation — a dependency defined too late, a lockfile out of sync, or a non-conforming message — and these defects surface only after publication. This Skill verifies every unpushed commit independently in a fresh worktree so each one is shippable on its own before the stack is pushed. ## Core Features & Use Cases - Isolated per-commit QA: Runs install, lint, test/coverage, and build gates for each commit in a disposable worktree, oldest first, for both git and jj repositories. - Order defect detection: Scans for symbol, manifest/catalog, and behavioral forward-references and recommends a corrected commit order before any QA is spent. - Safe corrections via delegation: Routes every fold, reword, squash, and reorder through coding:commit, and publication through coding:pr create, with patch-id QA markers enabling skip-on-rerun. - Use Case: Before pushing a ten-commit feature stack, run this Skill to discover that a package.json catalog reference fails install five commits early, approve the recommended reorder, and re-verify every affected commit green. ## Quick Start Ask the assistant to finalize the unpushed commits on the current branch and verify each one passes the full QA gate before publishing.

Frequently Asked Questions about finalize-commits

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify each unpushed commit passes tests before pushing?

Run this Skill to walk the unpushed stack oldest-first, replaying each commit into a fresh isolated worktree and running the full install, lint, test/coverage, and build gate. Failures are diagnosed and corrections are routed through the commit-owning skill before re-verification.

How to detect commit ordering problems in a git stack?

The dependency scan checks three detector classes: symbol forward-references, manifest/catalog consumption-before-definition, and behavioral order defects. It outputs a recommended order with remedies like reorder-before, fold-into, or hoist-hunk, applied only after your approval.

Does this work with jj (Jujutsu) as well as git?

Yes, both VCS are supported throughout. Git uses detached worktrees and cherry-pick replay, while jj uses `jj edit` on the working copy; markers use git notes or `.jj/changes/` files respectively.

Can it reword or squash commits automatically?

Mechanical message fixes (casing, length, imperative mood) and approved fixup squashes are delegated to `coding:commit`, which guards every rewrite with backup and verify steps. Meaning-changing rewords always require explicit user confirmation first.

Why does it re-run QA on commits that already passed?

It avoids that using QA markers keyed by a lockfile-excluded patch id. If a commit's content is unchanged since its green run, lint and test legs are skipped; only a cascaded lockfile regeneration still triggers install and fold.

When does it push the stack to the remote?

Publication happens only when `--auto-push` was explicitly supplied and every commit is green. Even then, the actual push is delegated to `coding:pr create`; this Skill never issues history-mutating or remote commands directly.