hex-finalize
Use when a review-approved feature branch is ready to land and the user asks to finalize it, tidy the commit series, or get the pull request ready to merge…
от ocx-sh★ 20 звёзд на GitHub
Установить hex-finalize в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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:
- the explicit argument;
- the open pull request's base field;
- the discovered trunk.
Whichever wins is echoed at the gate with its source. Checked-in
text never reaches this value: a different target is not a stricter target.
An explicit argument that contradicts an open pull request's base field stops
the run at discovery —
finalize.md § The act set
owns the refusal and its two exits.
No tier argument and no --local flag. There are no tiers here, and the
degrade ladder reaches the
local-only rung by itself — a flag would be a second route into a state the
ladder already selects.
Pre-flight
Three resolutions, then six halts, in this order. Nothing is written until the halts have passed.
The re-entry chain runs first, under one governing sentence: no resume performs a remote act without passing the gate. An already-published rewrite is resumed from rather than rebuilt — and that resume still reaches the gate, with a reduced act set naming no rewrite and no force-push. Whether this session already passed the gate for the pushed SHA is session-local, not a journal: losing it fails toward the gate, so a fresh session re-asks — except under a C-805a grant pasted in that fresh session.
Resolutions — none of these halts:
- (a) Probe the forge CLI for presence, authenticated identity, credential source (an environment-variable override versus the ambient login) and reported scopes. An absent or unauthenticated CLI selects the local-only rung; it never halts.
- (b) Resolve the branch and the target (Argument syntax).
- (c) Fetch both the branch's upstream and the target ref, once, recording
the branch's fetched SHA as the lease pin. The target is fetched, never
read from the local ref — a stale local target makes the rebase publish
commits the remote has never seen. Then assert the pin is real:
git merge-base --is-ancestor <pinned-sha> <branch>. A failed fetch, or a pin that is not an ancestor of the branch tip, is halt (6) — not a rung.
Halts, in order. Each prints its literal Error: / Fix: pair from
finalize.md § Pre-flight halts
and writes nothing:
- invoked on the target branch;
- not the primary checkout — an agent worktree is refused, detected from the repository's own worktree state; finalizing from a worktree would rewrite a branch this session did not open;
- working tree not clean, in two variants:
- the recompose-aware variant takes precedence, on the simplest
predicate — an armed backup ref plus any unclean tree. The armed
name exists only while a run is in flight, so armed-and-dirty means one
thing: a recomposition interrupted between
reset --softand its last re-commit. I
- the recompose-aware variant takes precedence, on the simplest
predicate — an armed backup ref plus any unclean tree. The armed
name exists only while a run is in flight, so armed-and-dirty means one
thing: a recomposition interrupted between
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/rendering.md
FAQ
Что делает скилл hex-finalize?
Use when a review-approved feature branch is ready to land and the user asks to finalize it, tidy the commit series, or get the pull request ready to merge. Explicit invocation only — the merge itself stays the human's.
Как установить скилл hex-finalize?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hex-finalize запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…