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.
npx agentmods add skills/grimoire-rs/grimoire/finalizenpx skills add grimoire-rs/grimoire --skill finalizegit clone --depth 1 https://github.com/grimoire-rs/grimoireWrote 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.
[](https://agentmods.dev/skills/grimoire-rs/grimoire/finalize)<a href="https://agentmods.dev/skills/grimoire-rs/grimoire/finalize"><img src="https://agentmods.dev/badge/skills/grimoire-rs/grimoire/finalize.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00074 | $0.02875 |
| Opus 5 | $0.00037 | $0.01437 |
| Sonnet 5 | $0.00015 | $0.00575 |
| Haiku 4.5 | $0.00007 | $0.00287 |
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 3d 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 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, collapsemain..HEADinto 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 branchgit status --porcelain=v1— working tree clean?git fetch origin main --quiet 2>/dev/nullthengit rev-parse mainandgit rev-parse origin/main 2>/dev/null— detect if localmainlagsorigin/maingit log --oneline main..HEAD— commits to finalizegit log -1 --pretty=%s main— tip of main (plan reference)git rev-list --count main..HEAD— commit countgit diff --stat main..HEAD— diff shapegit merge-base --is-ancestor main HEAD; echo $?— localmainancestor of HEAD? (0= yes, branch based on current local main;1= no, needs rebase onto main as part of finalize)
Refuse to proceed if:
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.
- 3d ago First seen · 196 lines · 0 tokens per session scan C e6f4ef8a8d8e
finalize is a skill published in the GitHub repository grimoire-rs/grimoire (8 stars, last pushed 3d ago), licensed Apache-2.0. It adds 74 tokens to every session and 2,875 once invoked, about $0.0004 per session on Opus 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.
Other skills, from other repositories
commit-archaeologist
Reconstructs why code exists from local git history, including the introducing commit, later changes, current authors, repeated companion files, and likely intent. Use when the user asks "why does this code exist", "who wrote this function and why", or to "explain the history of this function" before a rewrite…
pr-draft-summary
Create the required PR-ready summary block, branch suggestion, title, and draft description for openai-agents-python. Use before the final response whenever the current task changed runtime code, tests, examples, build/test configuration, or docs with behavior impact, regardless of perceived change size and including…
adk-git
Writes commit messages and pull request descriptions for the adk-python repository: Conventional Commits types and scopes, subject lines that say why a change was made, and the linked-issue and testing-plan sections the PR template requires. Use when writing or rewording a commit message, squashing commits before a…
commit-context
Trace a file, function, or line back to the agent session that produced its current commit. Use when the user asks "why is this code here", "what was the agent doing when this changed", "who wrote this", or wants context on a specific location in the codebase.
commit-history
List recent git commits linked to agent sessions, optionally filtered by branch or repo. Use when the user asks "show agent commits", "what has the agent shipped", "list linked commits", or wants commits with their session context.
novu-prepare-pr
Post-implementation PR prep for Novu feature branches — quality passes, commit/PR hygiene, CI triage, and review feedback. Use after feature work is done, when the user asks to prepare a PR, ship a branch, fix CI, address review comments, or babysit a pull request before merge.