pr-finish-pass

A command that performs a final review of the current pull request or feature branch before it is merged. A pull request is a proposed code change submitted for review.

In plain words
What is it for?
Use it to inspect the full change, check existing review comments, update the branch when appropriate, run the project's checks, and prepare the work for merging.
Why use it?
It catches the small code, documentation, test, integration, and merge issues that often remain after a feature appears to work.

Command for Claude Code

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.

agentmods
npx agentmods add commands/burin-labs/harn/pr-finish-pass
Clone the repo
git clone --depth 1 https://github.com/burin-labs/harn

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,955 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.02955
Opus 5 $0.00000 $0.01477
Sonnet 5 $0.00000 $0.00591
Haiku 4.5 $0.00000 $0.00296

Measured yesterday against content hash 4db05803dbb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-finish-pass 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 yesterday.

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.

.claude/commands/pr-finish-pass.md · 279 lines

How it starts

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

Run a final-polish pass on the current PR or feature branch before it lands.

The goal is the state a senior reviewer would land without comments. The sweep is targeted at the recurring issues this repo accumulates between "the feature works" and "the PR is landable" — not a generic code review.

Phase 0 — identify the work

git status --short
git rev-parse --abbrev-ref HEAD
git log --oneline origin/main..HEAD
gh pr view --json number,state,headRefName,mergeStateStatus 2>/dev/null

If gh pr view returns a PR, you are in PR mode. Otherwise branch mode — skip rebase/CI phases and go straight to the review sweep.

Always read the full diff before touching anything: git diff origin/main...HEAD. In PR mode, also read existing review comments — sometimes the easiest finding is one a reviewer already left.

Phase 1 — rebase on origin/main (PR mode only)

git fetch origin main
git rebase origin/main

Conflict rules in this repo:

  • CHANGELOG.md: keep both sides; preserve the top heading.
  • docs/theme/harn-keywords.js: regenerate with make gen-highlight.
  • docs/src/language-spec.md: regenerate via the pre-commit hook (edit spec/HARN_SPEC.md instead).
  • Cargo.lock: resolve from the merged manifests, then run make setup-rust.
  • Any file where both sides reformatted: take one side then run the appropriate formatter (make fmt, make fmt-harn, portal lint).

Then git push --force-with-lease. Never bare --force.

Phase 2 — drive CI to green (PR mode only)

gh pr checks
gh run list --branch "$(git branch --show-current)" --limit 5
gh run view <run-id> --log-failed   # for each failure

Address every failure comprehensively — no continue-on-error papering, no silenced asserts. Common categories:

  • Format / clippy / lint: make fmt, make lint, make lint-harn, make fmt-harn. Commit the fixes.
  • Test failure: reproduce locally with make test-one and the HARN_TEST_ONE_NAME and HARN_TEST_ONE_PACKAGE variables, then fix the root cause. Use make test-affected when the failure spans a changed crate.
  • Conformance: ./scripts/harn_bin.sh -- test conformance --filter <name>. If .expected needs an update for an intentional behavior change, do it explicitly.
  • Portal / VS Code / tree-sitter: run the relevant npm run portal:lint|build|test / (cd tree-sitter-harn && npm test).
  • Drift checks (check-language-spec, check-highlight, check-trigger-quickref): re-run the generators and commit the outputs.
  • make lint-test-patterns: see Phase 3.2.
  • check-docs-snippets: a .harn snippet in docs no longer parses; fix the snippet, not the parser.

Read the full file on GitHub · 279 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. yesterday First seen · 279 lines · 0 tokens per session scan A 4db05803dbb1

Subscribe to this mod's changes

pr-finish-pass is a command published in the GitHub repository burin-labs/harn (20 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,955 tokens. 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-08-30.