Skip to main content
skill CX Codex

check-pr · mit-han-lab — Claude Code skill: PR checks and installation

The check-pr Claude Code skill checks a change and its pull request description against Evolving Infra’s contribution rules. It runs before opening a PR, pushing review fixes, or reviewing someone else’s PR.

Apache-2.0 ★ 173 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mit-han-lab/EvolvingInfra --skill check-pr -a claude-code
Open on GitHub

What check-pr does

The skill compares the diff and PR description with the project rules in AGENTS.md. It checks affected component guides, tests, and documentation; changes to agent files also trigger python tools/check_agent_files.py. Authors fix failures, while reviewers report findings without editing the branch.

It fills in docs/PULL_REQUEST_TEMPLATE.md with checkable claims and validation commands with results. A bug fix needs a test that fails on the base commit and passes with the fix. Opening a PR with gh pr create and publishing a scrubbed transcript to the agent-logs branch both require the owner’s confirmation. Transcript processing uses python tools/scrub_transcript.py.

What it helps with

  • check a diff against project contribution rules
  • verify that tests and docs cover a change
  • fill a PR description with validation results
  • prepare a session transcript for publication

Example prompts for the agent

  • Check this branch against the project rules before I open a pull request.
  • Review this pull request and report problems without changing the branch.
  • Fill in the PR template with the validation commands and their results.

How to install check-pr

1Skills CLI (Vercel)

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

2Manually: put the files in place

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

Copy the whole skill folder; for one project use .claude/skills/check-pr/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about check-pr

How do I install check-pr in Claude Code?

Run npx skills add mit-han-lab/EvolvingInfra --skill check-pr -a claude-code. The skill file is at ~/.claude/skills/check-pr/SKILL.md.

What does check-pr do?

It checks a change and its PR description against Evolving Infra’s contribution rules, including tests and documentation. Authors can use its findings to fix issues; reviewers get a report without branch changes.

What does check-pr need to run?

It uses Git, gh, Python, and the test commands listed in AGENTS.md. The repository owner must confirm PR creation and transcript publication.

Source text

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

Similar skills

All skills for Code review and refactoring →

check-pr by other authors comes first.

check-pr greptileai check-pr inspects pull requests in GitHub, GitLab, or Perforce for failing tests, unfinished descriptions, and review feedback. Useful right before merging code. CX Codex +1 1,500installs check tw93 Inspects diffs, evaluates PRs, and verifies release readiness. It runs report-only checks and will not alter files without explicit user consent. CX Codex +1 16,500installs ce-code-review EveryInc The ce-code-review skill checks a named diff or pull request for bugs, regressions, tests, and project standards. A normal run returns a review without editing the working tree. CX Codex +1 4,100installs review-pr tirth8205 review-pr — a skill for Claude Code, Codex, Cursor and other agents that reviews a pull request or branch diff against a knowledge graph of the codebase. Produces a structured report with risk scores and a blast-radius breakdown. CX Codex +1 1,200installs task-to-pr owainlewis task-to-pr — a skill that carries a spec, issue, or task to an open pull request: branch, tests, Conventional Commits, CI, and an independent review. Merges only on explicit request. CX Codex +1 452installs code-review-excellence Seth Hobson The code-review-excellence skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. CX Codex +1 30,193installs review owainlewis Runs an isolated read-only code review. It checks changes against specs, probes security flaws, and verifies tests by breaking code deliberately. CX Codex +1 787installs

From the same set7

Project sponsors

Companies that keep this analytics open