finalize

finalize is a skill for Claude Code from grimoire-rs/grimoire. It costs 74 tokens per session (2,877 once invoked), scanned C, original, Apache-2.0.

A workflow for preparing a Git branch to be merged into the main branch by rewriting its development commits into clean Conventional Commits. It can also combine the branch into one commit or show a plan without changing anything.

In plain words
What is it for?
Use it before a fast-forward merge to classify commits, squash changes, draft commit messages, and prepare a branch for landing on main.
Why use it?
It removes progress checkpoints and other development noise so the main branch receives a clearer commit history.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool; mentions AGENTS.md.

Good fit Use it before a fast-forward merge to classify commits, squash changes, draft commit messages, and prepare a branch for landing on main.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grimoire-rs/grimoire/finalize
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add grimoire-rs/grimoire --skill finalize
Clone the repo
git clone --depth 1 https://github.com/grimoire-rs/grimoire

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for finalize

README.md
[![agentmods](https://agentmods.dev/badge/skills/grimoire-rs/grimoire/finalize/github.svg)](https://agentmods.dev/skills/grimoire-rs/grimoire/finalize)
Your own site
<a href="https://agentmods.dev/skills/grimoire-rs/grimoire/finalize"><img src="https://agentmods.dev/badge/skills/grimoire-rs/grimoire/finalize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for finalize

Your own site · 80×15
<a href="https://agentmods.dev/skills/grimoire-rs/grimoire/finalize"><img src="https://agentmods.dev/badge/skills/grimoire-rs/grimoire/finalize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,877 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.02877
Opus 5.5 $0.00030 $0.01151
Sonnet 5.5 $0.00015 $0.00575
Haiku 4.5 $0.00007 $0.00288

Measured 28d ago against content hash 175d28f75b38, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

finalize scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 28d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Tells the agent never to refusehighAnti-refusal

Suppressing the ability to decline removes a core safety control; a later harmful request then succeeds.

- **Stale-pointer exception**: if the pointer's `Branch:` is not the branch being finalized AND that branch's work already landed on `main` (`git rev-list --count main..<branch>` is 0, or the branch is gone), the pointer
.claude/skills/finalize/SKILL.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/finalize — Prepare Branch for Fast-Forward Merge

Rewrites commits in main..HEAD so branch fast-forwards onto main as clean Conventional Commits sequence. Rebasing phase of two-phase branch workflow — see workflow-git.md for full model.

Sibling /commit skill handles working phase (save progress during dev). /finalize takes messy result, produces what lands in main-branch changelog.

When To Use

Situation Use
Branch has multiple Checkpoint commits /finalize
Branch has working-phase bundles ("chore(claude): bundle skill + rules + agents") /finalize
Rebasing branch onto current main before fast-forward /finalize
Branch is one changelog entry with noise between /finalize --squash-all
Already one-concern-per-commit and rebased don't — fast-forward

Flags

  • --squash-all — skip per-commit analysis, collapse main..HEAD into single commit. Skill drafts one message for whole diff, asks approval.
  • --dry-run — produce classification + rebase plan, show, no execute. Useful for review.
  • --force — skip the active-phase check (still honors other refuse conditions). Use when no plan tracks the branch or Status block is intentionally stale.

Workflow

1. Snapshot state (parallel batch)

  • git rev-parse --abbrev-ref HEAD — current branch
  • git status --porcelain=v1 — working tree clean?
  • git fetch origin main --quiet 2>/dev/null then git rev-parse main and git rev-parse origin/main 2>/dev/null — detect if local main lags origin/main
  • git log --oneline main..HEAD — commits to finalize
  • git log -1 --pretty=%s main — tip of main (plan reference)
  • git rev-list --count main..HEAD — commit count
  • git diff --stat main..HEAD — diff shape
  • git merge-base --is-ancestor main HEAD; echo $? — local main ancestor of HEAD? (0 = yes, branch based on current local main; 1 = no, needs rebase onto main as part of finalize)

Refuse to proceed if:

Read the full file on GitHub · 196 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 28d ago Changed · +74 tokens per session 175d28f75b38
  2. 1mo ago First seen · 196 lines · 0 tokens per session scan C e6f4ef8a8d8e

Subscribe to this mod's changes

finalize is a skill published in the GitHub repository grimoire-rs/grimoire (14 stars, last pushed today), licensed Apache-2.0. It adds 74 tokens to every session and 2,877 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (tells the agent never to refuse). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

install-skill

Install a community skill pack into this fork from a GitHub repo and ship it as an auto-merged PR.

aeonfun/aeon · 26 tokens

inbox-triage

Daily GitHub notification inbox triage - surfaces aging vuln PR replies, security advisories, review requests, and mentions that need action.

aeonfun/aeon · 32 tokens

repo-stats-autoupdate

Keeps README badge + inline counts in sync with the real number of skills, agents, graph nodes/edges, communities, converted pipelines, and test inventory. Runs automatically on every commit via a git pre-commit hook. Use when the README drifts from reality or before publishing a release.

stevesolun/ctx · 66 tokens

security-pipeline

Use when security verification is needed - pre-commit security checks, vulnerability scanning, STRIDE threat analysis. Integrates with /handoff-verify --security and /commit-push-pr. CWE Top 25 based.

sangrokjung/claude-forge · 48 tokens

core-workflow

Detailed development workflow patterns, checklists, and standards. Auto-loads for complex tasks, planning, debugging, or when explicit patterns are needed. Contains session protocols, git conventions, security checklists, review-based validation, and communication standards.

travisjneuman/.claude · 52 tokens

git-commit

Safely create a git commit by validating repository state, staging intended changes, scanning for secrets/conflicts, generating a Conventional Commits message (repository convention first, else an English Angular default) from the staged diff, and committing without amend.

johnqtcg/awesome-skills · 52 tokens