with one click
github-pr-fix
// Fix a GitHub pull request by addressing feedback or CI failures, pushing changes, and publishing replies.
// Fix a GitHub pull request by addressing feedback or CI failures, pushing changes, and publishing replies.
Review a GitHub pull request by collecting PR context, analyzing risks, and publishing one structured review.
Guidance for safe, reliable GitHub CLI workflows across issues, pull requests, and reviews.
Solve a GitHub issue by collecting context, implementing a fix, and opening or updating a pull request.
| name | github-pr-fix |
| description | Fix a GitHub pull request by addressing feedback or CI failures, pushing changes, and publishing replies. |
Use this skill when you need to remediate an existing pull request: diagnose what is broken, apply targeted fixes, push commits, and reply on review threads.
gh CLI authentication is required.GITHUB_TOKEN/GH_TOKEN must allow PR read-write operations.GITHUB_OUTPUT_DIR: output artifacts directory (caller-provided preferred; otherwise temp dir).GITHUB_CONTEXT_DIR: context directory (default ${GITHUB_OUTPUT_DIR}/github-context).Preferred input when already available:
${GITHUB_CONTEXT_DIR}/manifest.jsonOptional inputs:
status=present in manifest.artifacts[].If no manifest is provided, collect PR context directly with gh:
gh pr view <pr_number> --repo <owner/repo> --json number,title,body,state,url,baseRefName,headRefName,headRefOid,author,createdAt,updatedAt,mergeable,reviews,changedFiles,additions,deletions
gh pr view <pr_number> --repo <owner/repo> --json files
gh api repos/<owner>/<repo>/issues/<pr_number>/comments --paginate
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
comments(first:100) {
nodes { id body path line author { login } }
}
}
}
}
}
}' -F owner=<owner> -F repo=<repo> -F number=<pr_number>
Do not assume fixed github/*.json files.
Resolve available context through artifact metadata (id, path, status, description).
${GITHUB_CONTEXT_DIR}/manifest.json exists, use it.gh.Prioritize in this order:
Use existing review threads/comments to avoid duplicate or stale responses.
Use direct gh api reply operations:
gh api repos/<owner>/<repo>/pulls/<pr_number>/comments \
-X POST \
-F in_reply_to=<comment_id> \
-f body='Thanks, fixed in the latest commit.'
Required outputs under ${GITHUB_OUTPUT_DIR}:
summary.mdmanifest.jsonsummary.mdMust include:
manifest.jsonExecution metadata for this skill, including:
provider: "github-pr-fix"status (completed|partial|failed)A successful run requires all of the following:
summary.md records what changed, which replies were posted, and any remaining risks.If replies are planned but not published, the run is not successful.