Agent skill

Goal PR

by dyoshikawa in dyoshikawa/rulesync

Drive a pull request to a clean state and merge it: run the review-pr skill, fix every mid-or-above finding, and repeat until no mid-or-above findings remain, then merge.

MITAuto-check passedDevelopment

Install Goal PR

skills CLI
$ npx skills add dyoshikawa/rulesync --skill goal-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dyoshikawa/rulesync goal-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dyoshikawa/rulesync.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.rulesync/skills/goal-pr .claude/skills/goal-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
goal-pr
GitHub stars
1.5k
Token cost
~1.4k tokens
SKILL.md length
837 words
Files
1
Skills in repo
40
Repo updated
First seen
Licence
MIT

At a glance

Drive a pull request to a clean state and merge it: run the review-pr skill, fix every mid-or-above finding, and repeat until no mid-or-above findings remain, then merge.

  • Works in 5 steps: Determine and Prepare the Target PR → Exit Condition → Iteration Loop → …
  • The user wants to finish a PR by reviewing
  • SKILL.md covers 0. Determine and Prepare the…, 1. Exit Condition, 2. Iteration Loop and 3. Merge, plus 1 more section
  • Calls git, gh and pnpm

What it does

Goal PR is an agent skill from dyoshikawa/rulesync. Drive a pull request to a clean state and merge it: run the review-pr skill, fix every mid-or-above finding, and repeat until no mid-or-above findings remain, then merge. Use when the user wants to finish a PR by reviewing, fixing, and merging it, or triggers on "the goal-pr skill".

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. The repository describes itself as: A Utility CLI for AI Coding Agents. The licence is MIT.

When your agent uses it

  • The user wants to finish a PR by reviewing
  • Triggers on the goal-pr skill

Example prompts

  • “the goal-pr skill”
  • “/goal-pr”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Determine and Prepare the Target PR
  2. Exit Condition
  3. Iteration Loop
  4. Merge
  5. Final Report

What it can do on your machine

Read from SKILL.md and the folder at commit 625bf98. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, gh and pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Goal PR loads about 1.4k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 837 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dyoshikawa/rulesync at commit 625bf98, republished under its MIT licence (© dyoshikawa). 837 words, ~1,423 tokens.

Download SKILL.mdSave it as .claude/skills/goal-pr/SKILL.md (or your agent's skills folder).
name
goal-pr
description
Drive a pull request to a clean state and merge it: run the `review-pr` skill, fix every mid-or-above finding, and repeat until no mid-or-above findings remain, then merge. Use when the user wants to finish a PR by reviewing, fixing, and merging it, or triggers on "the `goal-pr` skill".
targets
*

Goal PR

target_pr = the user's request

This skill drives a pull request all the way to merge. It repeatedly runs the review-pr skill, fixes every finding of severity mid or above, and merges the PR once a review round reports no mid-or-above findings.

0. Determine and Prepare the Target PR

  1. If target_pr is provided (e.g. 123, #123, or a PR URL), use it.

  2. Otherwise, look for the PR of the current branch:

    bash
    gh pr view --json number,title,state,headRefName 2>/dev/null
  3. If no PR exists yet, create one (this satisfies the "PR is the goal" intent):

    • Use the commit-push-pr skill to commit the current changes, push the branch, and open a PR.
    • Then resolve target_pr to the freshly created PR number.

Confirm that the current local branch is the PR's head branch, because the fix phase below must commit and push fixes onto that branch. If they differ, ask the user how to proceed and stop.

1. Exit Condition

The loop exits when a single review round satisfies both of:

  • 0 findings of severity mid, high, or critical (only low findings, or none at all, may remain).
  • The PR's GitHub Actions checks are green — no check is fail or pending.

Set a hard safety cap of 10 iterations. If the exit condition is still not met at the cap:

  • If CI is green and every remaining finding is mid (no high or critical), merge anyway: record the remaining findings with the create-scrap-issue skill so they are tracked, then go to Section 3. mid findings are not merge blockers.
  • Otherwise (a high / critical finding remains, or CI is red), stop the loop and report the remaining findings and failing CI instead of merging.

2. Iteration Loop

Repeat the following until the exit condition is satisfied or the cap is hit.

2-1. Review Phase

Use the review-pr skill with target_pr. It assigns each finding a severity (low / mid / high / critical) and a sequential number, and also reports the GitHub Actions workflow status.

Note: the review-pr skill only reads remote state and must not switch the local branch. Keep that constraint intact during the review phase.

2-2. Evaluate the Exit Condition

Use both the findings and the GitHub Actions status from the review result.

  • If mid + high + critical == 0 and CI is green (no fail / pending check): exit the loop and go to Section 3.
  • If there are mid-or-above findings, or any CI check is failing: proceed to the fix phase to address them.
  • If the findings are clean but CI is still pending: wait for the checks to finish (re-check with gh pr checks <pr>), then re-evaluate. Do not proceed to merge while checks are pending.
Show full SKILL.md (414 more words)Show less
2-3. Fix Phase

Fix every finding of severity mid or above on the current branch (you may also fix low findings opportunistically). Unlike the review phase, this phase works on the local branch directly:

  1. Edit the relevant files to address each mid-or-above finding. If you intentionally reject a finding, record the reason and treat it as resolved.

  2. Run pnpm cicheck (or the narrower pnpm cicheck:code / cicheck:content when appropriate) and fix any failures before continuing.

  3. Stage only the files you changed for the fix (review git status first so unrelated or generated files are not swept in), commit with a descriptive message, and push to the PR's head branch:

    bash
    git status
    git add <changed files>
    git commit -m "<message>"
    git push origin HEAD

Emit a short status line such as Iteration N — mid: X, high: Y, critical: Z; pushed fixes, then return to Section 2-1 so the updated PR (and its CI) is reviewed again.

3. Merge

Only reach this step once the exit condition in Section 1 holds — clean findings and green CI. Merge the PR by using the merge-pr skill with target_pr. That skill verifies the PR is open, checks GitHub Actions status, merges with gh pr merge --admin --merge, posts a thank-you comment, and cleans up the local branch.

Safety rules for the merge:

  • Never merge while any check is fail or pending. gh pr merge --admin bypasses required checks, so it must not be used to force past red or in-progress CI. If CI is failing, return to the fix phase; if it is pending, wait.
  • If the PR edits GitHub Actions workflows (.github/**) or the release/publish pipeline, or adds a new runtime dependency, do not auto-merge. Stop and ask the user to confirm, since these changes carry higher risk. Bumping an existing dependency, adding a dev dependency, or editing package.json scripts and metadata does not need confirmation.

4. Final Report

After the loop ends, report to the user:

  • Outcome: Merged (exit condition met and PR merged), Merged at cap (only mid findings left at the cap; merged with a scrap issue), or Capped (a high / critical finding or red CI left at the cap; not merged).
  • Iterations: how many review/fix rounds were executed.
  • Final severity summary: the counts per severity from the last review round.
  • Result: the merged PR number and title (plus the scrap issue link when merged at the cap), or — when capped — the list of remaining findings for the user to decide on.

© dyoshikawa, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .rulesync/skills/goal-pr of dyoshikawa/rulesync.

Open the folder on GitHubat commit 625bf98

Compare with similar skills

Goal PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Goal PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Goal PR this skilldyoshikawa/rulesync1.5k—~1.4kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT
WooCommerce Code Reviewwoocommerce/woocommerce11k3 repos~1.1kAutomated safety check: PassCustom licence

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Record PR Demo

    payloadcms/payload

    A skill your agent uses when a Payload pull request needs a concise visual walkthrough for reviewers.

    45k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check passed

More from dyoshikawa/rulesync

All 40 skills in this repo
  • Rulesync Feature Research

    dyoshikawa/rulesync

    Maps rulesync feature implementations to upstream coding-agent documentation.

    1.5k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Babysit Dependabot PR

    dyoshikawa/rulesync

    Babysit a Dependabot dependency-bump PR all the way to merge: verify the author is the genuine Dependabot bot, diagnose and resolve any CI failure (excluding or fixing a breaking bump when needed)…

    1.5k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Commit Push PR

    dyoshikawa/rulesync

    Commit current changes, push to remote, and create or update a pull request.

    1.5k GitHub stars~458 tokensUpdated today
    Auto-check passed
  • Git Worktree Runner

    dyoshikawa/rulesync

    Manages git worktrees using git-worktree-runner (gtr). An agent skill from dyoshikawa/rulesync.

    1.5k GitHub stars~1.3k tokensUpdated today
    Auto-check: notes
  • Goal Release

    dyoshikawa/rulesync

    Cut a release end to end: use the draft-release skill to open the release PR and draft GitHub release, wait for CI to turn green, run the merge-pr skill to merge the release PR, then update the…

    1.5k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • PRs Awaiting Author

    dyoshikawa/rulesync

    List open pull requests where the ball is in the author's court: CI is failing, review comments are unaddressed, or a maintainer question is awaiting the author's reply.

    1.5k GitHub stars~887 tokensUpdated today
    Auto-check passed

Categories

Questions about Goal PR

What does Goal PR do?

Drive a pull request to a clean state and merge it: run the review-pr skill, fix every mid-or-above finding, and repeat until no mid-or-above findings remain, then merge. Goal PR is an agent skill from dyoshikawa/rulesync. Drive a pull request to a clean state and merge it: run the review-pr skill, fix every mid-or-above finding, and repeat until no mid-or-above findings remain, then merge.

When should I use Goal PR?

Goal PR fits situations like: the user wants to finish a PR by reviewing; triggers on the goal-pr skill.

How do I install Goal PR in Claude Code?

Run `npx skills add dyoshikawa/rulesync --skill goal-pr -a claude-code`. Or copy the skill folder (.rulesync/skills/goal-pr in dyoshikawa/rulesync) into .claude/skills/goal-pr in your project. Claude Code loads it when a task matches its description.

How do I install Goal PR in Codex?

Run `npx skills add dyoshikawa/rulesync --skill goal-pr -a codex`. Or copy the skill folder (.rulesync/skills/goal-pr in dyoshikawa/rulesync) into .agents/skills/goal-pr in your project. Codex loads it when a task matches its description.

Can I use Goal PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dyoshikawa/rulesync --skill goal-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/goal-pr, .gemini/skills/goal-pr, .github/skills/goal-pr and .opencode/skills/goal-pr in your project.

What does Goal PR need to run?

Going by SKILL.md and its folder, Goal PR needs the command-line tools its instructions call (git, gh and pnpm).

Does Goal PR access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Goal PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Goal PR use?

Goal PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Goal PR use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Goal PR?

Skills that share tags, products or a category with Goal PR: Finishing a Development Branch (obra/superpowers, 297k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars) and PR Design Doc (OpenHands/OpenHands, 90k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Goal PR?

dyoshikawa (a GitHub user) maintains it in dyoshikawa/rulesync, which has 1,509 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 9, 2026.

Source: dyoshikawa/rulesync on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.