github-issue-to-pr

Carry a GitHub issue through validation, implementation, and CI verification into a pull request.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill github-issue-to-pr-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-issue-to-pr
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/github/github-issue-to-pr
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill github-issue-to-pr-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a GitHub issue into a merged pull request often fails through skipped steps: unread issue threads, duplicate PRs, fixes that fight intentional design, regression tests that prove nothing, and dishonest CI claims. This Skill enforces the full discipline from issue to verified PR. ## Core Features & Use Cases - Premise Validation: Reads the full issue thread, sweeps for duplicate PRs and prior commits, and checks git history to confirm the reported bug is not deliberate design. - Class-Level Fixes with Proven Tests: Implements the smallest complete change, fixes the same bug shape at sibling call sites, and sabotage-tests the regression test to confirm it fails without the fix. - Honest CI Shepherding: Opens the PR immediately to start CI, distinguishes real failures from baseline or infra flakes, and closes the loop by commenting the PR link on the issue. - Use Case: A maintainer says "Fix issue #123 and open a PR" — the Skill reads the thread, rules out duplicates, reproduces the bug, ships a tested fix, and reports live CI state. ## Quick Start Fix GitHub issue number 123 in this repository and open a pull request with a verified regression test and honest CI status.

Frequently Asked Questions about github-issue-to-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a GitHub issue into a pull request?

Read the full issue thread with gh issue view, sweep for duplicate PRs, reproduce the problem on current code, then implement a tested fix on a branch and open the PR immediately so CI starts. Verify CI state from live checks before claiming completion.

How to check for duplicate PRs before fixing a GitHub issue?

Run gh pr list --search with the issue number plus at least two keyword or synonym variants of the symptom across all states. Also inspect recent commits with git log on the relevant files to catch fixes already merged.

How do I verify a regression test actually catches the bug?

Perform a sabotage run: temporarily restore the pre-fix behavior of the exact function under test, run the new test, and confirm it fails. Then restore the fix and confirm it passes, proving the test bites.

When should I not use an issue-to-PR workflow?

Skip it when reviewing an existing PR or answering a code question with no requested change. Also pause when git history shows the reported bug is intentional design, and challenge the issue premise instead of implementing blindly.

Why do CI failures on a PR not always mean my change broke something?

Failures can come from pre-existing baseline issues or infrastructure flakes rather than your diff. Reproduce the failure on the default branch when unsure, and rerun only once for genuine infrastructure flakes.