.agents/skills/repair-pr/SKILL.md
Repair the current or specified GitHub PR once, then stop. Handle merge conflicts, review feedback from chatgpt-codex-connector[bot], and CI failures in that order. Commit after each coherent repair phase, but push only once after all local changes are complete.
Resolve the PR context.
AGENTS.md before changing code.gh auth status works.gh pr view --json number,url,baseRefName,headRefName.node .agents/skills/repair-pr/scripts/repair-pr.mjs status --pr <pr> to collect merge state, unresolved bot review threads, and failing checks.Resolve merge conflicts first.
mergeStateStatus: DIRTY or GitHub reporting conflicts as the conflict signal.git merge origin/<baseRefName> or the correct remote-tracking base ref for the repository.--ours or --theirs blindly.git add the intended files and commit the merge/conflict resolution before moving on.Apply bot review feedback.
chatgpt-codex-connector[bot].node .agents/skills/repair-pr/scripts/repair-pr.mjs resolve-thread <thread-id>.Fix CI failures.
gh pr checks <pr> --json name,state,bucket,link,workflow to identify failing checks.gh run view <run-id> --log or job logs from gh api when needed.gh.Finish once.
AGENTS.md when feasible; if full verification is too expensive or blocked, run the most relevant subset and clearly report the gap.node .agents/skills/repair-pr/scripts/repair-pr.mjs status --pr <pr> once for a final summary.git push for the current branch. Because this workflow merges instead of rebasing, do not force-push.Use the helper from the repository root:
node .agents/skills/repair-pr/scripts/repair-pr.mjs status
node .agents/skills/repair-pr/scripts/repair-pr.mjs status --pr 123 --json
node .agents/skills/repair-pr/scripts/repair-pr.mjs resolve-thread PRRT_kwDO...
The helper is an inventory and review-thread mutation aid. It does not implement code fixes, stage changes, commit, push, or decide whether a review comment is correct.