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

check-pr · mit-han-lab — скилл для Claude Code: проверка PR и установка

Скилл check-pr для Claude Code сверяет изменения и описание pull request с правилами проекта Evolving Infra. Запускается перед созданием PR, отправкой исправлений после ревью или при проверке чужого PR.

Apache-2.0 ★ 173 обновлён 2026-11-16

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

Что делает check-pr

Скилл проверяет diff и описание pull request по правилам проекта из AGENTS.md. Он смотрит затронутые файлы и инструкции компонентов, проверяет тесты и документацию, а для файлов агента запускает python tools/check_agent_files.py. Автор исправляет найденные проблемы; ревьюер только сообщает о них и не меняет ветку.

Для PR скилл заполняет шаблон docs/PULL_REQUEST_TEMPLATE.md: в отчёте должны быть проверяемые утверждения и команды с результатами. Для исправления бага требуется показать тест, который падает на базовом коммите и проходит с исправлением. Создание PR через gh pr create и публикация обработанной расшифровки на ветке agent-logs требуют подтверждения владельца. Для обработки расшифровки используется python tools/scrub_transcript.py.

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

  • сверить diff с правилами проекта
  • проверить, что тесты и документация охватывают изменения
  • заполнить описание PR результатами проверок
  • подготовить расшифровку сессии к публикации

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

  • Проверь изменения в этой ветке перед созданием pull request.
  • Сверь этот pull request с правилами проекта и перечисли проблемы, не меняя ветку.
  • Подготовь описание PR по шаблону и укажи команды проверок с результатами.

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

1Через Skills CLI (Vercel)

npx skills add mit-han-lab/EvolvingInfra --skill check-pr -a claude-code

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

~/.claude/skills/check-pr/SKILL.md

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

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

Вопросы о check-pr

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

Выполни npx skills add mit-han-lab/EvolvingInfra --skill check-pr -a claude-code. Файл скилла находится по пути ~/.claude/skills/check-pr/SKILL.md.

Что делает check-pr?

Скилл сверяет изменения и описание pull request с правилами Evolving Infra, проверяет тесты и документацию. Автору он помогает исправить нарушения, а ревьюеру выдаёт отчёт без изменений ветки.

Что нужно для работы check-pr?

Для проверок используются Git, gh, Python и команды тестирования из AGENTS.md. Создание PR и публикация расшифровки требуют подтверждения владельца.

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

SKILL.md · Apache-2.0
---
name: check-pr
description: Check an Evolving Infra change and its pull request description against the project's contribution rules. Use when about to open a pull request (drafts included, e.g. `gh pr create`), before pushing review fixes, or when reviewing someone else's pull request.
---

# Check a pull request

Check a change and its pull request description against the contribution rules of
[`AGENTS.md`](../../AGENTS.md), and fill the description. As the author, fix what fails and
open the pull request only when every step passes. As a reviewer, report; do not change the
branch.

## Scope

- **Reads**: `repository`: the whole diff, `AGENTS.md`, the guides of the components it
  touches, and `docs/contributing/agent-instructions.md` for agent files.
- **Writes**: the pull request description and the scrubbed transcript; as the author, also
  the fixes for what fails. As a reviewer, nothing.
- **Never changes**: anything outside the change's one purpose; as a reviewer, the branch.
- **Outside the repository**: opens the pull request (`gh pr create`), publishes the
  transcript on the `agent-logs` branch, and replies to review comments. Confirm each with the
  owner first.

## Inputs

- A branch, or an open pull request.
- The person who owns it, and from them anything only they know: the issue this implements
  (none is acceptable for a small change).

## Steps

### 1. One purpose

```bash
git fetch origin && git log --oneline origin/main..HEAD && git diff --stat origin/main...HEAD
```

- **One purpose.** If the commits serve unrelated purposes, split them into one branch and
  one pull request each before going on.
- **Validation still running.** A claim whose run has not finished is not a claim yet. Wait
  for the result, or open a draft and say in Validation which run is pending.

**Check**: the commits serve one purpose, and the owner and the issue (or none) are known.

### 2. Design fit

- **Shared paths stay small.** Changes to the scheduler (`evolving_infra/engine/decoupled_engine/srt/managers/`),
  the symmetric P/D path (`srt/disaggregation/`), the host KV tier (`srt/mem_cache/`), router
  placement (`evolving_infra/router/core/src/scheduler/`) and the planner's decision rule (`evolving_infra/planner/policy/`)
  reach every deployment. Keep them minimal and say in Details why each is needed.
- **Defaults are decisions.** A new flag has a default that works without it. A feature of
  the paper's configuration goes in the `paper` presets
  (`srt/arg_groups/symmetric_defaults.py`, `apply_symmetric_pd_preset` in
  `evolving_infra/router/core/src/config/cli.rs`), with a test, not in every launch command.
- **Engine code reads resolved settings**: `resolution_result(server_args, field)`, never the
  raw field, for anything resolution can set.
- **No environment-specific values in code**: host names, cluster paths, NIC names, account
  names. They belong in a config or are detected (`evolving_infra/launch/hardware.py`).
- **Agent files** (`AGENTS.md`, a skill, the template): follow
  [`docs/contributing/agent-instructions.md`](../../docs/contributing/agent-instructions.md)
  and run `python tools/check_agent_files.py`.

**Check**: each bullet above passes, fails with the file and line, or could not be verified;
`python tools/check_agent_files.py` exits 0 when the diff changes agent files.

### 3. Testing and validation

- Run the test commands of [`AGENTS.md`](../../AGENTS.md) for every component the diff
  touches, and the directory of any test the diff adds.
- A bug fix has a test that fails on the base commit for the reported reason and passes with
  the fix. Paste both results.
- New tests assert behavior through public entry points and do not use sleeps, retries or
  loosened thresholds to pass.
- A change to the serving path is run on GPUs, at the smallest level that shows it:
  `evolving-infra serve --config examples/gb300/glm52-1node.yaml` with one request, then
  `examples/slurm/submit.py` for anything that claims throughput or latency.

**Check**: every test command run is in the report with its result, and a bug fix shows its
test failing on the base commit.

### 4. Docs

- Every flag, default, environment variable, config key and endpoint the diff touches is in
  `docs/configuration.md` or the component's page, in the same pull request;
  `docs/paper.md` when a paper mechanism moves.
- Docs and comments are plain statements of what the code does: no hedging, no history of
  the change.

**Check**: every flag, default, environment variable, config key and endpoint in the diff
appears in the docs diff.

### 5. Pull request contents

Fill a copy of [`docs/PULL_REQUEST_TEMPLATE.md`](../../docs/PULL_REQUEST_TEMPLATE.md),
keep its sections, and create with `gh pr create --body-file <file>`.

- **Overview**: one or two lines, with the issue link when there is one.
- **Claims**: a few concrete bullets. Each is checkable.
- **Validation**: for every claim, the command and its result.
  - Performance claims use a table: configuration (model, nodes, starting split, workload,
    concurrency), baseline, changed result, scored window, and the reproduction command.
    Compare on the same window and the same P/D split; report the planner's switch times
    when the split changes during the run. With repeated runs, give the count and the spread.
  - Benchmarks replay with the `paper` preset of `benchmarks/replay/run_trie.py`; report
    `replay_differs_from_preset` of the score when it is not empty.
  - State what was not run (hardware, model, scale).
- **Details**: root cause for a fix (what failed, how it was found, why the change removes
  it). For the P/D path, a short numbered sequence of one request through router, P, transfer
  and D, limited to the steps the change touches.
- **Transcript**: see below.
- **Checklist**: tick what is true; the owner's handle comes from the owner.

#### Transcript

1. Take the session or sessions in which this change was made. When a session also holds
   unrelated work, cut the file to the turns of this change first.
2. Scrub each one. Pass every name the tool cannot know with `--redact`: user and account
   names, cluster and host names, private organization and repository names.

   ```bash
   python tools/scrub_transcript.py <session file> -o transcript.md --redact <name> --redact <host>
   ```

   It prints what it replaced. Exit code 1 means a string still looks like a secret: it
   prints the line of each one. Remove the value from `transcript.md`, or rerun with
   `--allow <the first characters it printed>` when the owner confirms it is not a secret.
3. Read through `transcript.md` once for anything private that no pattern catches, and ask
   the owner to confirm before publishing.
4. Publish it as `transcripts/<head branch>.md` on a branch named `agent-logs` (of the
   repository, or of the fork the pull request comes from) and link that file. Several
   sessions go in one file, in order.

**Check**: every claim has its command and result under Validation; `scrub_transcript.py`
exited 0 and the owner confirmed the transcript.

### 6. Re-review

Read every comment before changing anything. `gh pr view --comments` omits inline comments:

```bash
gh api --paginate "repos/mit-han-lab/EvolvingInfra/issues/$pr/comments"
gh api --paginate "repos/mit-han-lab/EvolvingInfra/pulls/$pr/reviews"
gh api --paginate "repos/mit-han-lab/EvolvingInfra/pulls/$pr/comments"
```

For each concern decide with the owner: reply, or change the code and say what changed. Then
update the description so Claims and Validation match the new diff.

**Check**: every comment has a reply or a change, and Claims and Validation match the new diff.

## Returns

- A report with one entry per step (passes, fails, could not verify).
- The follow-up work, and the decisions that are the owner's.
- The filled pull request description.

© mit-han-lab · Apache-2.0 · mit-han-lab/EvolvingInfra

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

Все скиллы по теме «Код-ревью и рефакторинг» →

Сначала — check-pr от других авторов.

check-pr greptileai Скилл check-pr проверяет pull request в GitHub, merge request в GitLab или changelist в Perforce на упавшие тесты и незакрытые замечания ревью. Пригодится перед отправкой изменений в основную ветку. CX Codex +1 1 500установок check tw93 Скилл check проводит аудит диффов, проверяет готовность релиза и разбирает PR перед слиянием. Скилл работает строго в режиме отчёта и не меняет файлы без прямого разрешения. CX Codex +1 16 500установок ce-code-review EveryInc Скилл ce-code-review проверяет diff или PR на баги, регрессии, тесты и соответствие стандартам. По умолчанию он формирует отчёт без изменения рабочего дерева. CX Codex +1 4 100установок review-pr tirth8205 Скилл review-pr для Claude Code, Codex, Cursor и других агентов, который ревьюит пул-реквест или ветку через граф кодовой базы. Выдаёт структурированный отчёт с риск-оценкой функций и списком зависимых файлов. CX Codex +1 1 200установок task-to-pr owainlewis Скилл task-to-pr ведёт задачу от тикета до открытого pull request: ветка, тесты, Conventional Commit, проверка CI и независимое ревью. Мержит только по явной команде. CX Codex +1 452установок code-review-excellence Seth Hobson Скилл code-review-excellence для Claude Code пошагово разбирает pull request, выявляет ошибки и формулирует конкретную обратную связь. Организует единый процесс ревью и обучение разработчиков через pull request. CX Codex +1 30 193установок review owainlewis Скилл review для Claude Code и Codex запускает изолированное ревью изменений без права записи. Проверяет совпадение со спецификацией, безопасность и поведение кода на некорректных данных. CX Codex +1 787установок

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

connect-harness Скилл connect-harness для Claude Code подключает Pi, Claude Code или Codex к запущенному стеку Evolving Infra. Он проверяет вызовы инструментов и запускает пробный запрос через выбранный harness. CX Codex +1 ★ 173звёзд репо add-harness Скилл add-harness для Claude Code добавляет скрипт запуска нового агентского harness в Evolving Infra. Он включается, когда нужно подключить harness, для которого ещё нет скрипта в examples/agents. CX Codex +1 ★ 173звёзд репо run-benchmark Скилл run-benchmark для Claude Code запускает replay-бенчмарк Evolving Infra, оценивает результат и сравнивает его с эталоном. Срабатывает на просьбу воспроизвести результаты статьи или проверить изменение в бенчмарке. CX Codex +1 ★ 173звёзд репо diagnose-run Скилл diagnose-run для Claude Code разбирает сбои запуска, запросов и результаты бенчмарков Evolving Infra. Он подключается, когда evolving-infra serve завершается с ошибкой или бенчмарк уступает эталону. CX Codex +1 ★ 173звёзд репо connect-agent Скилл connect-agent для Claude Code подключает код агента к запущенному Evolving Infra. Он добавляет идентификаторы к запросам модели и завершает ветки задач. CX Codex +1 ★ 173звёзд репо deploy-stack Скилл deploy-stack для Claude Code разворачивает Evolving Infra на одном или нескольких GPU-хостах. Запускается по запросу развернуть, запустить или адаптировать стек под Docker, Slurm с Pyxis либо установку из исходников. CX Codex +1 ★ 173звёзд репо

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

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