hex-finalize

hex-finalize is a skill for Claude Code from grimoire-rs/grimoire. It costs 49 tokens per session (5,687 once invoked), scanned A, original, Apache-2.0.

A finalisation workflow for a review-approved feature branch. It verifies the branch, organises its commits to match project rules, and, after one approval, pushes the updated branch and prepares its pull request; merging remains a human action.

In plain words
What is it for?
Use it to tidy a reviewed branch, prepare a commit series, force-push the approved result, and hand the pull request over for merging.
Why use it?
It provides a controlled last step between successful review and a merge-ready pull request. Keeping the merge separate preserves the human's final decision.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to tidy a reviewed branch, prepare a commit series, force-push the approved result, and hand the pull request over for merging.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grimoire-rs/grimoire/hex-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 hex-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 hex-finalize

README.md
[![agentmods](https://agentmods.dev/badge/skills/grimoire-rs/grimoire/hex-finalize/github.svg)](https://agentmods.dev/skills/grimoire-rs/grimoire/hex-finalize)
Your own site
<a href="https://agentmods.dev/skills/grimoire-rs/grimoire/hex-finalize"><img src="https://agentmods.dev/badge/skills/grimoire-rs/grimoire/hex-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 hex-finalize

Your own site · 80×15
<a href="https://agentmods.dev/skills/grimoire-rs/grimoire/hex-finalize"><img src="https://agentmods.dev/badge/skills/grimoire-rs/grimoire/hex-finalize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,687 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00049 $0.05687
Opus 5.5 $0.00020 $0.02275
Sonnet 5.5 $0.00010 $0.01137
Haiku 4.5 $0.00005 $0.00569

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

Security

Grade A, and why

hex-finalize scanned grade A with 0 findings 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 12d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/hex-finalize/SKILL.md · 436 lines

How it starts

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

hex-finalize — The Finalize Phase

hex-finalize takes a review-approved feature branch from the work is right to this is ready to merge: it verifies the branch, recomposes it into a commit series the project's own rules would accept, and — after exactly one approval — force-pushes it and readies its pull request. The merge is never hex's: the run ends at a handoff naming it as the human's step, emitting no command.

It is a hex skill, not a fifth orchestrator: no tier vocabulary of its own. The flow is one fixed sequence whose universals do not scale with blast radius, so there is nothing for a tier to select.

Entry is explicit invocation only, never a description match — the invocation is the grant for the action class, so it must originate with a human, or a session acting on a human-pasted C-805a grant (finalize.md § Consent model). The frontmatter says so to clients that read it; the rule binds in clients that drop those keys. Exit is the handoff block, or a pre-flight halt.

This is the one hex command that writes to a remote. Every rule it obeys is defined once in finalize.md and linked from here; this file carries the flow.

Shared contracts: protocol.md · workers.md · models.md · memory.md · finalize.md. If hex-core is not installed: grim add ghcr.io/michael-herwig/arcana/hex-core:latest.

Argument syntax

/hex-finalize [<target-branch>]. The argument names the branch to land onto, never the branch being finalized — that is always the one checked out in the primary checkout.

The target resolves from authoritative sources only, in precedence order:

  1. the explicit argument;
  2. the open pull request's base field;
  3. the discovered trunk.

Read the full file on GitHub · 436 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago Changed · +11 lines f1c3b803af7e
  2. 21d ago Changed · +15 lines d8326685cb3d
  3. 1mo ago First seen · 410 lines · 49 tokens per session scan A fd885db1de92

Subscribe to this mod's changes

hex-finalize is a skill published in the GitHub repository grimoire-rs/grimoire (14 stars, last pushed today), licensed Apache-2.0. It adds 49 tokens to every session and 5,687 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-08.

Related

Other skills, from other repositories

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

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

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