codex-fix-pr
Skill118 starsChanged 37 days agoMITView on GitHub
Diagnose failing pull request checks, reproduce them locally, make focused fixes, commit them through codex-commit, and refresh the published description when needed. Use whenever a pull request is red, the user asks Codex to fix CI, or codex-watch-pr reports failures.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-sessionSkill
- codex-analyze-sessionSkill
- codex-commitSkill
- codex-fix-proseSkill
- codex-merge-prSkill
- codex-prSkill
- codex-rebaseSkill
- codex-resolve-rebase-conflictsSkill
- codex-review-commit-messageSkill
- codex-review-pr-descriptionSkill
- codex-review-prose-fixSkill
- codex-review-squash-messageSkill
- codex-watch-prSkill
- codex-write-pr-descriptionSkill
- codex-write-prose-fixSkill
- commitSkill
- fix-proseSkill
- fix-prSkill
- merge-prSkill
- prSkill
- rebaseSkill
- releaseSkill
- resolve-rebase-conflictsSkill
- review-commit-messageSkill
- review-pr-descriptionSkill
- review-prose-fixSkill
- review-squash-messageSkill
- watch-prSkill
- write-pr-descriptionSkill
- write-prose-fixSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use update_plan for diagnosis, reproduction, fix, commit, description refresh, and push.
- Very specific: line 35
If the fix changes what readers need to know, delegate revision to codex-write-pr-description, then delegate a fresh review to …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fix a failing pull request
Use update_plan for diagnosis, reproduction, fix, commit, description refresh, and push. The argument may specify a pull request and the chosen commit strategy.
Diagnose and reproduce
Run once:
bash .agents/skills/codex-fix-pr/scripts/diagnose.sh <number>Stop if the checkout differs from the commit CI tested. For each failure, run the mapped local task before editing. If it passes, inspect the workflow for an environment mismatch, flake, incomplete task mapping, or stale base. Use codex-rebase when the failing combined tree doesn't exist locally.
Fix only the cause. Don't weaken a rule, exclusion, or threshold without user approval. Re-run the reproducer until it passes.
Choose and commit the fix
Honor a strategy supplied by codex-pr. Otherwise, in Default mode ask in the final response whether to create a separate commit or amend and force-push. Don't commit in that turn. After confirmation, invoke codex-commit. For an amendment, ensure its independent message review sees the complete amended commit.
Refresh the description when material
Rebuild the local draft:
bash .agents/skills/codex-fix-pr/scripts/populate-description.sh <number>If the fix changes what readers need to know, delegate revision to codex-write-pr-description, then delegate a fresh review to codex-review-pr-description. Bound findings at three rounds. The reviewer records the digest after a successful review. Update the pull request only through:
bash .agents/skills/codex-pr/scripts/create-pr.shSkip redrafting when the existing description remains accurate, and state that judgment.
Push and continue
Push a separate commit normally. Push an amendment with --force-with-lease, never bare --force. Report the failed check, cause, fix, and new run. If asked to see CI through, use codex-watch-pr and repeat. Stop after three failed rounds on the same check and report each attempt.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

