К основному содержанию
скилл CX Codex

jackin-refresh-pr — скилл для Claude Code: что делает и как установить

Скилл сверяет заголовок и описание открытого PR с текущим диффом веточки. Он обновляет блок проверки и переписывает устаревший текст.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add jackin-project/jackin-dev --skill jackin-refresh-pr -a claude-code
Открыть на GitHub

Что делает jackin-refresh-pr

Скилл актуализирует название и описание пуллреквеста, если ветка ушла вперёд. Например, когда фикс опечатки разросся в новую функцию. Дифф диктует описание. Процесс запускается строго по запросу разработчика, а не на каждый коммит.

Для сверки утилита вызывает cargo xtask pr body, получая свежий список файлов и секции Verify locally. Авторский текст в блоках проверки сохраняется. Исчезнувшие или новые блоки агент удаляет или добавляет по схеме. Затем он перечитывает gh pr diff и приводит секции Summary и Behavior changes в соответствие с кодом.

Готовый текст сохраняется через временный файл командой gh pr edit <PR> --body-file /tmp/pr-body.md. Прямая передача через флаг --body запрещена. Она ломает блоки кода и знак доллара.

Какие задачи решает

  • синхронизировать заголовок PR с изменившимся диффом
  • обновить секцию Verify locally под текущий дифф через cargo xtask
  • переписать устаревшие разделы описания без потери авторских заметок
  • защитить экранирование символов и блоков кода при отправке через GitHub CLI

Примеры запросов агенту

  • Обнови описание и заголовок PR #42 под свежие коммиты
  • Сверь текущий PR с веткой и актуализируй шаги проверки
  • Освежи описание пуллреквеста, скоуп изменился

Как установить jackin-refresh-pr

1Через Skills CLI (Vercel)

npx skills add jackin-project/jackin-dev --skill jackin-refresh-pr -a claude-code

2Вручную: положить файлы

~/.claude/skills/jackin-refresh-pr/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/jackin-refresh-pr/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о jackin-refresh-pr

Как установить jackin-refresh-pr в Claude Code?

Выполните команду npx skills add jackin-project/jackin-dev --skill jackin-refresh-pr -a claude-code. Файл навыка сохранится по пути ~/.claude/skills/jackin-refresh-pr/SKILL.md.

Что делает jackin-refresh-pr?

Он устраняет расхождения между реальным кодом ветки и старым описанием PR. Скилл обновляет списки тестов и секции вроде What ships, чтобы ревьюер сразу видел актуальный состав изменений.

Почему нельзя обновлять тело PR через флаг --body в gh?

Прямая передача через --body "..." повреждает блоки разметки кода и знаки $. Правило требует сохранять результат во временный файл и передавать его через --body-file.

Исходный текст

SKILL.md · Apache-2.0
---
name: jackin-refresh-pr
description: Use only when the user explicitly requests this skill. Reconciles an open jackin❯ pull request's title and body against the current diff — regenerates the Verify-locally block selection and rewrites prose that has drifted.
argument-hint: "[PR]"
disable-model-invocation: true
license: Apache-2.0
user-invocable: true
---

# jackin-refresh-pr

Reconcile an open PR's title and body against the current diff, so the body describes what the branch **actually ships now** — not what it shipped when it was opened. Run when the body has drifted: more commits landed, scope grew or shifted, the title still reads `docs:` but the PR now ships a feature.

Shares `cargo xtask pr body` with `jackin-create-pr` — the binary owns the Verify-locally block selection; the agent owns the prose. This is the deliberate, on-demand version of the reconciliation `jackin-merge-pr` runs at its step 5.

## When to use

- Operator asks to refresh / update the PR body or title ("the body is out of date", "refresh the PR").
- Body has become actively misleading for a reviewer landing on it right now.

## When NOT to use

- Opening a new PR → `jackin-create-pr`.
- At merge-readiness → `jackin-merge-pr` step 5 reconciles as the final gate; don't double-refresh.
- After every iteration commit — refresh is operator-triggered, not commit-triggered (`.github/AGENTS.md` PR-body refresh policy). Auto-refreshing churns the body and wastes attention.

## Arguments

- `PR` — PR number (defaults to the current branch's PR).

## Process

1. **Resolve the PR.** `gh pr view <PR> --json number,title,body,headRefName,baseRefName`. Hold the current title and body.
2. **Gather the fresh shape.** `git fetch origin <baseRefName>`, then `cargo xtask pr body --base origin/<baseRefName> > /tmp/pr-body.fresh.md`. Read the **change digest on stderr** (the rust/docs/capsule/schema categories + file list) — that is what the change *is* now. Read the **fresh skeleton on stdout** — its set of `### ` blocks under `## Verify locally` is the selection the current diff requires.
3. **Reconcile the Verify-locally blocks.** Diff the fresh skeleton's block set against the live body's:
   - In the fresh selection but missing from the body → add it (structure from the template, filled for this PR).
   - In the body but dropped by the fresh selection → remove it.
   - In both → **keep the operator's fill verbatim**. The Checkout block carries the real PR number; Rust tests carry the scoped filter; User smoke carries PR-specific steps. Never overwrite a kept block with the placeholder.

   *Done when* every `### ` block under `## Verify locally` matches the binary's selection for the current diff, and every kept block retains its authored content.
4. **Reconcile the prose.** Read `gh pr diff <PR>` and `git log origin/<baseRefName>..HEAD --oneline`. For each prose section the body carries (Summary, What ships, Behavior changes, What this addresses, Hard rule, Not included, Migration notes):
   - Still matches what shipped → leave untouched. Refresh is anti-churn; do not rewrite what is right.
   - Drifted → rewrite to match the current diff. Section no longer earned → drop it. New outcome shipped with no section → add it.

   *Done when* every prose section reflects the current diff, and no section restates the diff file-by-file.
5. **Reconcile the title.** Does the Conventional Commits subject still describe the shipped scope? If the PR grew — a `fix(typo)` that now ships a feature, a `docs:` that now contains code — update type and scope via `gh pr edit <PR> --title`. Pause for confirmation only if the scope shift is meaningful enough that the operator might not have noticed (`.github/AGENTS.md` title/description rule).
6. **Write the body.** Build the reconciled body in a temp file — kept prose, rewritten prose, reconciled blocks — then `gh pr edit <PR> --body-file /tmp/pr-body.md`. Never `--body "..."`; the body-construction rule in `.github/AGENTS.md` mandates `--body-file` to survive code fences and `$`.
7. **Verify the render.** `gh pr view <PR> --json body -q .body` — confirm no stray `` \` `` or `\$` from hand-editing. Fix with `--body-file` if broken.
8. **Report.** Name what moved: blocks added/dropped, prose sections rewritten, the title change (old → new) and why. Do not ask permission to refresh — the operator asked. Do surface a scope-shifting title change before it sticks if the operator might disagree.

## Common mistakes

- Regenerating the body from the skeleton and **losing the operator's prose** — the skeleton carries placeholders; refresh preserves authored content and only rewrites what drifted.
- Rewriting prose that was already accurate — churns the diff and wastes attention.
- Hand-selecting Verify-locally blocks instead of `cargo xtask pr body` — the binary is the selection oracle.
- Using `gh pr edit --body "..."` instead of `--body-file` — breaks on code fences and `$`.
- Forgetting the render check — a broken `` \` `` or `\$` ships silently.
- Refreshing after every commit — violates the operator-triggered policy.

## Tooling

`cargo xtask pr body --base origin/<base>` (jackin❯ repo) emits the change digest to stderr and the Verify-locally-block-filtered skeleton to stdout. Shared with `jackin-create-pr`. The binary owns block selection; the agent owns prose reconciliation. No xtask subcommand refreshes a PR — this skill orchestrates `pr body` (selection) + `gh pr edit` (write).

© jackin-project · Apache-2.0 · jackin-project/jackin-dev

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

Все скиллы по теме «Git и GitHub» →
triage Matt Pocock Скилл проводит issue и внешние PR через роли триажа, проверку и подготовку брифа для агента. Подойдёт мейнтейнеру, который разбирает очередь задач. 990 453установок code-review Matt Pocock Проверяет изменения от выбранной точки по стандартам репозитория и требованиям задачи. Нужен для ревью ветки, PR или незавершённой работы. 789 521установок implement Matt Pocock Выполняет задачу по спецификации или тикетам, ведёт работу через тесты и завершает её ревью с коммитом. Подходит для задач, где нужен дисциплинированный цикл разработки. 774 700установок git-guardrails-claude-code Matt Pocock Скилл ставит хук Claude Code, который останавливает опасные Git-команды до их запуска. Нужен, если агент не должен делать push или удалять изменения. 499 069установок setup-pre-commit Matt Pocock Скилл настраивает pre-commit для JavaScript-репозитория: Husky запускает форматирование, проверку типов и тесты перед коммитом. 489 289установок scaffold-exercises Matt Pocock Скилл создаёт структуру учебных упражнений с секциями, задачами, решениями и пояснениями. Пригодится при запуске нового раздела курса. 480 196установок

Из того же набора10

jackin-propose Оформляет идею как пункт дорожной карты и ранний PR, не меняя код. Нужен для фиксации крупной задачи перед отдельной проработкой. CX Codex +1 472установок jackin-checkout-pr Переключает репозиторий на ветку pull request через gh pr checkout и сначала проверяет рабочее дерево. Нужен для явного checkout PR. CX Codex +1 470установок jackin-goal-prompt Собирает из пункта роадмапа и планов один самодостаточный промпт /goal не длиннее 4000 знаков. CX Codex +1 470установок jackin-release-check Прогоняет релизные гейты проекта jackin❯ и выдаёт отчёт по каждому. Нужен перед выпуском версии, когда надо понять, всё ли зелёное. CX Codex +1 469установок jackin-release-notes Собирает PR после последнего тега, раскладывает их по категориям Keep a Changelog и обновляет [Unreleased] в CHANGELOG.md. CX Codex +1 469установок jackin-brainstorm Превращает замысел пункта роадмапа в конкретные проектные решения через свободное обсуждение с оператором. Пишет их прямо в раздел ## Design. CX Codex +1 469установок jackin-release Автоматизирует подготовку и публикацию релиза на базе cargo-release. Проверяет готовность проекта, правит changelog и ждёт подтверждения оператора перед пушем. CX Codex +1 469установок jackin-create-pr Открывает pull request для небольшой правки в репозитории jackin❯: типо, обновление зависимости, строчный багфикс. Тело PR собирается по шаблону с готовыми блоками verify-locally. CX Codex +1 469установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой