Fix pull requests based on review feedback and CI failures. Use when: (1) Addressing PR review comments, (2) Fixing CI/test failures, (3) Resolving merge conflicts, (4) Implementing requested changes.
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: optional caller-provided output artifacts directory.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.'
Report the result in the normal agent delivery. If a caller explicitly requires
machine-readable output, write only the requested artifacts under
${GITHUB_OUTPUT_DIR} and include their paths in the delivery.
A successful run requires all of the following:
If replies are planned but not published, the run is not successful.