← スキル一覧に戻る

fix-bug-pr
by graysurf
codex-kit tracks Codex CLI setup to keep workflows consistent across machines.
⭐ 0🍴 0📅 2026年1月25日
SKILL.md
name: fix-bug-pr description: Find bug-type PRs with unresolved bug items (Issues Found table), fix and push updates, comment with what changed, and keep PR body status synced (set to fixed when complete).
Fix Bug PR
Contract
Prereqs:
- Run inside the target git repo.
gitandghavailable onPATH, andgh auth statussucceeds.python3available onPATH(helper scripts parse/patch PR Markdown deterministically).- Start from a clean working tree (avoid staging unrelated local changes).
Inputs:
- Optional PR number to operate on; otherwise resolve an open bug-type PR automatically.
- Optional label filters to narrow candidate PRs (defaults:
bug,type: bug).
Outputs:
- If a matching PR exists:
- Code fix committed and pushed to the PR head branch.
- PR comment describing what changed, tests run, and which bug IDs were updated.
- PR body updated so the Issues Found table reflects latest bug Status; if all bugs are fixed, set overall
Status: fixed.
- If no bug-type PR exists (or none with unresolved bugs): no repo changes; report “no related issues”.
Exit codes:
- N/A (workflow skill). Helper scripts define their own exit codes.
Failure modes:
- No matching bug-type PR found, or PR body does not include a parseable
## Issues Foundtable. - Missing tooling (
gh/git/python3) orghnot authenticated. - Dirty working tree, merge conflicts, or failing tests prevent a safe commit/push.
- High-risk areas (auth/billing/migrations/deploy) should stop or be skipped.
Workflow
-
Resolve the target PR:
- Auto-pick an open PR with unresolved bug items:
$CODEX_HOME/skills/automation/fix-bug-pr/scripts/bug-pr-resolve.sh
- Or target a specific PR:
$CODEX_HOME/skills/automation/fix-bug-pr/scripts/bug-pr-resolve.sh --pr <number>
- If it exits
2: stop and report “No relevant issues found (no bug-type PR found).”
- Auto-pick an open PR with unresolved bug items:
-
Checkout the PR branch:
gh pr checkout <number>
-
Identify the next unresolved bug item:
- Use
next_bug_idfrombug-pr-resolve.shoutput. - Fix one bug item per run unless multiple items share the same root cause.
- Use
-
Implement the minimal fix + validation:
- Prefer small, targeted diffs; avoid refactors.
- Follow the target repo’s testing/build docs and CI workflow: install required tooling/deps, then run the most relevant lint/test/build commands.
- If docs are missing/unclear, infer likely commands from common entrypoints (package.json scripts, Makefile/Justfile/Taskfile, language defaults).
- Treat validation as a gate: if checks fail, do not commit/push; fix and re-run (or stop and report). If checks cannot be run, document why in the PR comment.
-
Commit + push:
- Use
semantic-commit-autostage(end-to-end automation) unless the user explicitly wants manual staging. - Push to the PR head branch.
- Use
-
Update PR body progress (status sync):
- Mark the fixed bug ID(s) as
fixedand recompute overall status:$CODEX_HOME/skills/automation/fix-bug-pr/scripts/bug-pr-patch.sh --pr <number> --mark-fixed <bug_id>
- If all bug items are fixed, the PR body will be updated to
Status: fixed.
- Mark the fixed bug ID(s) as
-
Comment on the PR with what changed:
- Include: fixed bug IDs, summary, tests run, and any remaining open items.
- Use
skills/automation/fix-bug-pr/references/COMMENT_TEMPLATE.mdas the structure.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です