본문으로 건너뛰기
Skillpedia
일반 코딩8.0k · #12670

pr-improver

하는 일

현재 git 브랜치의 변경 사항을 심각한 문제가 없을 때까지 검토하고 수정합니다. 다른 사람이 보기 전에 풀 리퀘스트를 정리하고 싶은 개발자를 위한 것입니다.

사용하는 경우

  • ✓개발자가 풀 리퀘스트를 열기 전에 브랜치의 검토 발견 사항을 고치고 싶을 때.
  • ✓개발자가 풀 리퀘스트 검토를 통과할 때까지 브랜치를 정리하고 싶을 때.
  • ✓개발자가 기존 풀 리퀘스트를 갱신하면서 수정 사항을 먼저 확인하고 싶은 경우.

스킬 링크

https://github.com/trailofbits/skills/blob/main/plugins/code-improver/skills/pr-improver/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/trailofbits/skills/blob/main/plugins/code-improver/skills/pr-improver/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 브랜치를 풀 리퀘스트 검토가 깨끗하게 통과할 때까지 정리해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 바뀐 파일과 그 폴더를 찾은 다음, 그 폴더로 제한된 검토 및 수정 루프를 실행합니다. 라운드마다 발견 사항 장부를 유지하고 결과를 보고합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

PR Improver

Improve the current branch by running /code-improver:improve — a dynamic workflow that loops a PR reviewer and a fixer subagent over the branch's changes until a review reports zero critical/major findings. The loop, its ledger, and its guards live in the workflow; this skill derives the scope from the branch diff and relays the outcome.

Starting the loop

The user provided: $ARGUMENTS (if empty, take base branch and preferences from the conversation).

1. Resolve the branch and its change surface

  1. Repo root: git rev-parse --show-toplevel. Fail loudly outside a repository.
  2. Base: the argument if given, else the repository's default branch (git symbolic-ref refs/remotes/origin/HEAD → its short name, falling back to main). Refuse to run when the current branch IS the base — there is no diff to improve.
  3. Changed files: git diff --name-only <base>...HEAD. If empty, say so and stop.
  4. Scope: the changed files' directories, widened — per-file globs are too tight (PR fixes legitimately add tests next to changed code). Map each changed file to its repo-relative directory glob <dir>/** (** at the repo root only if files at the root changed), then deduplicate and drop globs covered by another.

2. Resolve the loop script

Resolve improve.js from this SKILL.md's installed location to an absolute path and confirm the file exists. Its plugin directory is pluginRoot. Use this exact plugin copy; if the file is missing, stop.

3. Invoke the workflow

Run it with the Workflow tool, {scriptPath: "<the path from step 2>", args: {...}}:

{
  "target": "<repo root>",
  "reviewer": {
    "kind": "skill",
    "name": "pr-review-toolkit:review-pr",
    "notes": "Review the working tree's changes against <base> as a pull request: correctness, tests, error handling, and the review dimensions the skill prescribes."
  },
  "scope": ["<derived-dir-glob>/**"],
  "pluginRoot": "<the plugin directory from step 2>",
  "maxRounds": 5
}
  • reviewer — the default above requires the pr-review-toolkit plugin. When the user names a different PR reviewer (skill or agent), use it, with kind set accordingly.
  • maxRounds only if the user asked for a different cap.
  • pluginRoot is the resolved plugin directory from step 2, for the metrics collector.
  • finalize defaults are right for PRs: no version bump unless the branch sits inside a plugin, narration strip and docs pass on.
  • decision only on continuation (below).

The loop's baseline snapshot is the tree at loop start — its scope guard protects the branch's uncommitted work; the PR's own commits are what the reviewer reviews.

The workflow runs in the background and needs no babysitting: it reviews, fixes, re-reviews, checks scope after every fix round, and can only complete on a clean review. It never commits; all changes stay in the working tree.

If the Workflow tool is unavailable or denied, stop and say so. Do not improvise the loop inline with direct edits — the ledger, scope guard, and escalation guarantees live in the workflow, and an inline imitation has none of them.

If the result is halted: "reviewer-unavailable", relay it and stop. The reviewer is not installed in this session; tell the user which plugin provides it (the default needs pr-review-toolkit) and re-run after installing. Do not review the branch yourself.

Do not end your turn while the loop is running. The Workflow tool returns a task id immediately; the result comes later. In an interactive session the completion notification re-invokes you — wait for it. In a non-interactive run (scripted, CI, eval) there is no later turn: stopping abandons the loop mid-round, so after launching, poll the task (TaskOutput with the returned task id, or sleep-and-recheck) until it completes, then relay the result. A session that answers "the loop is running, I'll report later" has lost the run.

Relaying the result

The workflow returns a structured result. Report it honestly — the distinctions matter:

  • converged: true — the last action was a review with zero critical/major findings. Report rounds used, remaining minor findings (open_minor_count), and the artifact paths (ledger_path, metrics).
  • capped: true — the fix budget ran out and the FINAL review still found blocking issues. Say plainly: capped, NOT converged, and list open_blocking. Do not present thi
자주 묻는 질문

어떤 브랜치와 비교하나요?

입력한 기준 브랜치와 비교하며, 지정하지 않으면 저장소의 기본 브랜치와 비교합니다.

main 브랜치에서도 실행되나요?

아니요. 현재 브랜치가 기준 브랜치이면 개선할 변경이 없으므로 멈춥니다.

검토는 누가 하나요?

설치된 풀 리퀘스트 검토 스킬이 검토합니다. 기본적으로 pr-review-toolkit의 review-pr 스킬을 씁니다.

상세 정보

작성자의 원본 설명

Runs an autonomous review-and-fix improvement loop over the current branch's changes until a PR review comes back clean, scoped mechanically to the directories the branch touched. Reviews are performed by an installed PR-review skill (default: pr-review-toolkit's review-pr). Use to fix review findings on a branch before opening or updating a pull request ('clean up this branch', 'fix this PR until review passes', 'run review-and-fix on my changes'). NOT for a one-time review — run the PR-review skill directly.

repo: trailofbits/skills

인기도

GitHub 스타
8.0k
순위
#12670
라이선스
CC-BY-SA-4.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬