Agent skill
pr
Prepare and open a pull request for the current branch after validating the full diff and checks.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/pr-gregorstocks-mage-bench
SKILL.md
Make a PR
Create a pull request for the current branch's changes.
Workflow
-
Commit any uncommitted work. Check
git status— if there are staged or unstaged changes, commit them before proceeding. Everything that's part of this PR should be in a commit. -
Understand the full scope of changes. Run these in parallel:
bashgit fetch origin git log --oneline origin/master..HEAD git diff origin/master..HEAD --statRead through the actual diffs and changed files — don't just look at filenames. You need to understand what changed and why to write a good PR.
-
Merge in master so you're testing against the latest code:
bashgit merge --no-edit origin/masterFix any merge conflicts before proceeding. Use
--no-editso repo merge settings do not drop you into an interactive editor mid-workflow. -
Regenerate impacted goldens before validation. If the diff changes prompt rendering, bridge responses, MCP tool output, replay behavior, or exported game data, search existing goldens for the affected behavior and regenerate every stale prompt/export now. Do not assume only newly added tests need updates, and do not wait for CI to remind you.
-
Run
make check(lint, typecheck, tests). Fix any failures before proceeding. Do not create a PR with failing checks.After validation, run
git statusagain before pushing. Local test/build commands can dirty tracked files (for examplewebsite/package-lock.jsonmetadata churn from npm). Commit intentional artifacts or clean incidental churn before you open the PR.Pitfall: if
make checkfails in website-related targets withnpm ERR! EEXISTsymlink errors, orverify-schema-typesclaimswebsite/src/types/game-export.d.tsis stale on an otherwise clean tree, check whether parallelnpm installruns are racing inside the website targets before assuming the generated types actually need regeneration. Pitfall:make checkruns throughscripts/checks/quiet_check.py, so it can stay silent for minutes while long subchecks run. If it looks hung, inspect the process tree (for example withpstree -ap <quiet_check_pid>) to see which subcheck is active before assuming it is stuck. -
Write the PR title and body. The PR description must explain why these changes exist, not just what they do. A reviewer can read the diff to see what changed — the PR body should tell them why it changed, what problem it solves, and any context they'd need to evaluate the approach.
Bad (just restates the diff):
- Add
timeoutparameter tofetch_game_data() - Update
config.jsonto includetimeout_secsfield - Add test for timeout behavior
Good (explains the motivation):
Grok 4 base has a 32% timeout rate at the current 45s limit because it's a slow model. Increase the LLM request timeout to 120s so slower models can finish reasoning without getting cut off.
The summary bullets should be a mix of what and why — lead with the motivation, then mention key implementation details only when they're non-obvious.
- Add
-
Push and create the PR:
bashgit push -u origin HEAD gh pr create --title "<concise title>" --body "$(cat <<'EOF' ## Summary <2-5 bullets mixing why and what> ## Test plan <bulleted checklist — what you verified> 🤖 Generated with [Claude Code](https://claude.com/claude-code) EOF )" -
Report the PR URL to the user.
-
Watch CI and address feedback. Run the watcher — it polls every 30s, returns as soon as any check fails or all pass (up to 30 min):
bashuv run python scripts/watch_pr.py- Exit 0 (all green, no comments): Done.
- Exit 1 (CI failed): The output lists failed checks with links. Investigate with
gh run view <run-id> --log-failed(extract the run ID from the check URL). Fix the root cause, then do the full push-edit-watch cycle (see AGENTS.md § Pull Requests). - Exit 2 (review feedback): The output lists top-level reviews, general comments, and inline diff comments. For inline comments, read the full context with
gh api repos/{owner}/{repo}/pulls/{number}/comments. Address each one, then do the full push-edit-watch cycle. - Exit 3 (both): Address both, then push-edit-watch.
- Exit 4 (timeout): Re-run this step.
Cap at 3 fix iterations. If after 3 rounds CI still fails or new feedback keeps arriving, report the situation to the user and stop.
Guidelines
- Title: Short, imperative, under 70 characters. Describes the outcome, not the mechanism (e.g., "Fix timeout for slow models" not "Add timeout_secs config parameter").
- Summary: Start with the problem or motivation, then describe the solution. A reader should understand why this PR exists from the first bullet alone.
- Test plan: List what you actually verified —
make check, manual testing, screenshots, specific scenarios. Don't list things you didn't do. - One logical change per PR — don't bundle unrelated work.
- If the branch has many commits, the PR description should synthesize the overall change, not enumerate every commit.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?