AgentStack
SKILL verified MIT Self-run

Github Pr Fixup

skill-markphelps-agent-plugins-github-pr-fixup · by markphelps

A Claude skill from markphelps/agent-plugins.

No reviews yet
0 installs
12 views
0.0% view→install

Install

$ agentstack add skill-markphelps-agent-plugins-github-pr-fixup

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Github Pr Fixup? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

GitHub PR Fixup

Fix review feedback and CI failures on an existing GitHub pull request. Work on the PR's source branch. Do not open a new PR.

Required tools

Verify both tools exist before doing anything else:

gh --version
jq --version

If either command is missing, stop and tell the user to run:

brew install gh jq

Inputs

  • GitHub URL: $ARGUMENTS

Extract the PR number from the URL:

PR_NUMBER="$(echo "$ARGUMENTS" | grep -oE '[0-9]+$')"

Stop if PR_NUMBER is empty.

Workflow

  1. Check out the existing PR branch.
gh pr checkout "$PR_NUMBER"
  1. Read PR metadata you will need later.
gh pr view "$PR_NUMBER" --json number,title,headRefName,headRepositoryOwner,headRepository,headRefOid,baseRefName,url
  1. Gather unresolved review feedback.

Use GraphQL so you can ignore resolved threads and outdated comments.

gh api graphql -f query='
query($owner: String!, $repo: String!, $number: Int!) {
  repository(owner: $owner, name: $repo) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes {
          isResolved
          isOutdated
          path
          line
          comments(first: 20) {
            nodes {
              author { login }
              body
              createdAt
              url
            }
          }
        }
      }
    }
  }
}' -F owner="$(gh pr view "$PR_NUMBER" --json headRepositoryOwner -q '.headRepositoryOwner.login')" -F repo="$(gh pr view "$PR_NUMBER" --json headRepository -q '.headRepository.name')" -F number="$PR_NUMBER"

Focus only on threads where:

  • isResolved == false
  • isOutdated == false

Read each active thread carefully. Fix the requested changes in code, tests, docs, or config as needed. If comments conflict, prefer the most recent reviewer guidance and note the conflict in your final summary.

  1. Check CI status for the PR head commit.
HEAD_SHA="$(gh pr view "$PR_NUMBER" --json headRefOid -q '.headRefOid')"
gh pr checks "$PR_NUMBER"
gh run list --commit "$HEAD_SHA" --json databaseId,status,conclusion,name,event,workflowName,headSha,url
  1. Investigate failed runs only.

Filter for failing runs:

gh run list --commit "$HEAD_SHA" --json databaseId,status,conclusion,name,event,workflowName,url | jq '.[] | select(.conclusion == "failure")'

For each failed run:

gh run view  --log-failed

Diagnose the underlying failure from the failed job log. Do not patch symptoms blindly. Fix the actual issue in code or configuration.

  1. Verify locally.

Run the smallest relevant validation that covers the fixes you made. Prefer repo-native lint, unit, or integration commands over broad full-suite runs when scope is small. If full local verification is not possible, explain why and state what you did run.

  1. Commit and push fixes to the existing source branch.

Do not create a new branch and do not create a new PR.

Guardrails

  • Never open a new PR.
  • Never resolve review threads unless the user explicitly asks.
  • Ignore resolved and outdated review threads.
  • Prefer the PR head repository and branch already associated with the PR.
  • Keep fixes scoped to active review feedback and failing CI unless you find a

directly related root cause.

  • If a CI failure depends on unavailable secrets, external services, or flaky

infrastructure, state that clearly and avoid speculative code changes.

Final response

Report:

  • what unresolved review comments you addressed
  • which CI failures you fixed
  • what validation you ran
  • any remaining blockers you could not complete

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.