pr
БесплатноЗапускает вложенные скриптыНе проверенDraftForge PR lifecycle. Use when the user runs /pr, opens or reuses a pull request, asks whether a PR's features have Playwright coverage, wants before/after…
от kettleofketchup★ 16 звёзд на GitHubОб этом скилле
/pr — PR lifecycle workflow
Drive a PR from "branch pushed" to an actionable report without the user babysitting it:
- Resolve PR state (reuse the open PR or create one).
- Check every feature the PR adds has Playwright E2E coverage; flag gaps and offer a subagent to write the specs.
- Post before/after screenshots as a PR comment whenever the diff touches non-test frontend code; a skip comment only when it touches none.
- Monitor main conflicts and PR CI/CD every 30 minutes in a progressive diagnose → repair → verify → push → recheck loop; keep watching after green checks until the PR closes or monitoring is stopped.
- Pull the failed jobs' error lines and report findings with next steps.
- Offer pre-existing problems the branch found as GitHub issues and separate fix PRs.
When to trigger
- User types
/pr, or says "open / create a PR" on the current branch. - User says "watch CI" / "monitor checks" on a branch with an open PR.
- User asks for screenshots of a PR's UI changes.
- A push just happened and the user asks what's next.
Ask first when a branch merely has uncommitted work.
Workflow
Phase 1 — Resolve state
branch=$(git branch --show-current)
pr_json=$(gh pr view --json number,state,headRefName,baseRefName,url,comments 2>/dev/null || echo "")
- Empty
pr_json→ Phase 2 (create). OPEN→ start the 30-minute conflict and CI/CD monitor, then Phase 3 (E2E coverage).MERGED/CLOSED→ report and stop; ask whether to open a new one.
Phase 2 — Create the PR (if missing)
Title/body from commits when the branch has 1–3 commits; otherwise ask the user once for a title. HEREDOC body with ## Summary and ## Test plan. Add a changelog.d/ fragment first if the change is user- or operator-visible (changelog skill). Exact commands: references/creating-the-pr.md.
After creating the PR, start the 30-minute conflict and CI/CD monitor. Reuse one active monitor per PR; run it alongside the remaining phases.
Phase 3 — E2E coverage
Runs for a new PR, and for a reused PR whose new commits add or change behaviour. List every user-visible behaviour the diff adds or changes (per role and state, including who must not see it), map each to a Playwright spec that performs it and asserts the outcome, and report the gaps. Unit tests do not count as coverage. Offer a subagent per PR that writes the missing specs in its own detached worktree and test stack slot and pushes them to the branch. Procedure and subagent brief: references/e2e-coverage.md.
Phase 3 is done when every behaviour is covered by a spec, has a dispatched subagent, or has a user-accepted "No E2E:
Phase 4 — Screenshots
Runs for a new PR, for a reused PR with no screenshot comment yet (no comment body starting ## Screenshots or No screenshots:; a Screenshots pending: comment does not count), and after new commits that touch non-test frontend code. Gate on the diff:
gh pr diff "$PR" --name-only | .claude/skills/pr/scripts/frontend-screenshot-gate.sh
The gate prints every changed file under frontend/ except tests, test utilities, test configs and Markdown (exit 0 = screenshots required). Test: .claude/skills/pr/scripts/frontend-screenshot-gate.test.sh.
- No output (exit 1) →
gh pr comment "$PR" --body "No screenshots: this PR changes no non-test frontend code (<what it touches instead>)."and go to Phase 5. - Any output → screenshots are required; a skip comment is not allowed. Files that are not visual on their own (
lib/,store/,hooks/, API schemas,package.json, build config) still get shots of the pages and states that run the changed code. Follow references/screenshots.md end to end: before from the merge-base, after from the PR head, same pages/states/data/viewport, headless capture on each worktree's own test stack slot, every PNG viewed, images on thepr-assets/<n>branch, one comment with a before/after table per change, stacks down and slots released.
Every just call in that phase is one Bash call of the form cd <worktree> && just <recipe> # allow-cd. A bare cd does not carry over to the next call, and a populate recipe that runs in the main checkout wipes its test DB.
Phase 4 is done when the PR has a new screenshot comment (or the skip / pending comment) and just test::slots shows no slot held by this PR's worktrees.
Phase 5 — Watch CI
timeout 30m gh pr checks "$PR" --watch --interval 60
Run this initial CI watch in the background alongside the 30-minute monitor; never block conflict events waiting for it. Narrate in single lines. Polling detail and timeout handling: references/monitoring-ci.md. A 30-minute CI snapshot does not stop the [progressive monitor](references/monitoring-
Установить pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pr?
DraftForge PR lifecycle. Use when the user runs /pr, opens or reuses a pull request, asks whether a PR's features have Playwright coverage, wants before/after screenshots of UI changes posted on a PR, or asks to watch CI on a branch.
Как установить скилл pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic