Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pr-finish-pass

БесплатноБез исполняемых скриптовНе проверен

Final-polish pass on the current PR or feature branch before it lands. Rebases on origin/main, force-pushes, drives CI to green, then reviews the diff for…

burin-labsот burin-labs★ 34 звезды на GitHub

Об этом скилле

pr-finish-pass

Final-polish sweep on whatever work is currently in flight. That is usually a named PR, but it works equally well on an unpushed feature branch or a session's accumulated diff. The goal is to get the change to a state a senior reviewer would land without comments.

The sweep is not a generic code review. It targets the recurring issues this repo accumulates between "the feature works" and "the PR is landable."

When to use

  • A PR is open and you want it merged today.
  • A feature branch is about to become a PR.
  • A session produced a diff worth landing and you want it polished before opening the PR.

If there is no current branch worth polishing — say so and stop.

Phase 0 — identify the work

Determine the scope before touching anything:

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

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

Read the full diff before doing anything else:

git diff origin/main...HEAD

For PRs in PR mode, also read gh pr view --json title,body,comments and skim 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

Resolve conflicts inline. Common conflict rules in this repo:

  • changelog.d/*.md: keep distinct fragments from both sides. Release tooling owns the generated CHANGELOG.md.
  • docs/theme/harn-keywords.js: regenerate with make gen-highlight.
  • spec/HARN_SPEC.md / docs/src/language-spec.md: keep neither generated side. Resolve the editable spec/chapters/*.md sources, then run make sync-language-spec.
  • Cargo.lock: resolve from the merged manifests, then run make setup-rust in the worktree.
  • Any file with both sides reformatted: take one side then make fmt / make fmt-harn / portal lint as appropriate.

Then force-push with lease:

git push --force-with-lease

Never --force without --with-lease — co-authors may have pushed.

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

gh pr checks
gh run list --branch "$(git branch --show-current)" --limit 5

For each failing check, fetch the actual log and read it:

gh run view <run-id> --log-failed

Address failures comprehensively — do not paper over them with retries or continue-on-error. Common categories:

  • Format / clippy / lint failures: run make fmt, make lint, make lint-harn, make fmt-harn and commit the fixes.
  • Test failures: reproduce locally with make test-one and the HARN_TEST_ONE_NAME and HARN_TEST_ONE_PACKAGE variables. Use make test-affected when the failure spans a changed crate. Read the test, read the code under test, and fix the root cause.
  • Conformance failures: ./scripts/harn_bin.sh -- test conformance --filter <name> reproduces a single case. If a .expected file needs updating because user-visible behavior intentionally changed, do that explicitly — don't blindly accept new output.
  • Portal / VS Code / tree-sitter failures: run the corresponding npm run portal:lint / npm run portal:build / npm test locally.
  • make check-language-spec / make check-highlight / make check-trigger-quickref: these are drift checks. Re-run the generators and commit the regenerated outputs.
  • make lint-test-patterns: see the flaky-test guidance in Phase 3.
  • make check-docs-snippets: a .harn snippet under docs/src/ no longer parses or type-checks. Fix the snippet, not the parser.

Push fixes incrementally; let CI re-run between iterations rather than batching every guess at once.

If a failure is a known-flaky test unrelated to the diff, re-run the specific job (gh run rerun <run-id> --failed). Do not silence it.

Phase 3 — the review sweep

This is the substance of the skill. Walk the diff and look for each of the following classes of finding. Fix every material one inline; note non-material findings in your end-of-turn summary so the user can decide whether to address them.

3.1 correctness, performance, security, privacy, reliability

  • Off-by-ones, unhandled Option/Result, panics on hostile input, integer overflow on user-controlled arithmetic.
  • Unbounded allocations driven by external input (request body sizes, iterator chains over network responses, recursive structures with no depth cap).
  • Concurrency: shared mutable state without synchronization, deadlocks from nested locks, cancellation safety on select! arms.
  • Secrets in logs, request/response bodies, error messages, transcripts. This crate writes a lot of structured logs — check whether anything us
Полный SKILL.md на GitHub

Установить pr-finish-pass в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл pr-finish-pass?

Final-polish pass on the current PR or feature branch before it lands. Rebases on origin/main, force-pushes, drives CI to green, then reviews the diff for correctness/perf/security/reliability bugs, flaky test patterns banned by `make lint-test-patterns`, sloppy comments a senior engineer would not write, cross-crate drift (typechecker / formatter / portal / DAP / LSP / tree-sitter), DRY/polish, Rust orchestration logic that should be Harn script composing host capabilities, prompt prose that belongs in `.harn.prompt` files, long files that should be split, and interpreter perf wins that bundle naturally with the change. Triggers when the user says "finish pass", "polish this PR", "wrap up the PR", or otherwise asks for a final review-and-fix sweep before merge.

Как установить скилл pr-finish-pass?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pr-finish-pass запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить pr-finish-pass с