Solve Issue
Resolve one GitHub issue through a verified pull request. Treat the issue number or URL supplied by the user as the target; if none is supplied, identify the issue from the current conversation or ask the user before changing code.
Notes
- Only send pull requests to the user's designated private repository, never
to the upstream/public community repository (社群 repo). For example, use
https://github.com/yenhao-huang/TensorRTas the private PR target; do not send PRs tohttps://github.com/nvidia/tensorrt. Verify the destination before creating or retargeting a PR; do not infer it from the issue URL or GitHub's default upstream selection.
Workflow
Read
STATE.md, reset it fromreferences/template/STATE.template.mdfor a new run, and record the repository and target issue.Use
github-issuesto fetch the issue, labels, comments, linked work, and current state. Stop and ask before proceeding if the issue is closed, cannot be identified, or has materially ambiguous requirements.Read the full discussion before writing any code: every comment, linked or merged pull request, duplicate-issue link, and commit that references the issue number. Pay particular attention to the original reporter's own follow-up comments — reporters often post a workaround, root cause, or a working fix themselves after opening the issue, and that can be the fastest path to a correct answer or proof the issue no longer needs work. Determine whether the issue is already resolved — fixed on a branch, closed via a merged PR, declared a duplicate, resolved by a workaround the reporter confirmed works, or otherwise handled by someone else.
- If already resolved: do not implement anything. Record the finding and
its evidence (comment or PR link) in
STATE.mdas the run's outcome. If this issue was chosen from a backlog or list rather than pinned by the user, pick the next unresolved candidate from that list and repeat this check; if the user pinned this specific issue, report the finding to the user and ask how to proceed instead of silently substituting a different issue. - If not resolved, continue to implementation — but reuse the reporter's workaround or diagnosis as a starting point when it points to the fix.
- If already resolved: do not implement anything. Record the finding and
its evidence (comment or PR link) in
Read the repository instructions and references/report_template.md. Create an issue report at the repository's established report location (for example,
docs/howard/<issue-number>.md) and record its path inSTATE.md. Before implementation, organize acceptance criteria from the issue and discussion: give each criterion an ID, expected behavior, verification method, and required evidence. Then usedevwith these ordered development substeps:- reproduce: Run the smallest reproducer on the unmodified baseline. Record the commit, environment, exact command, expected versus actual behavior, exit code, and relevant output. If reproduction is blocked or unsuccessful, record the limitation and investigate before claiming a reproduced bug; never invent baseline evidence.
- dev: Diagnose the root cause and implement the smallest complete fix. Explain the changed behavior and map the changes to acceptance criteria in the report. Review the diff and resolve actionable findings.
- regression test: Add or update a focused regression test for the original failure and run it against both baseline and fixed code where feasible, recording failure before and success after. Rerun the original reproducer on the fix and check relevant adjacent behavior. Record exact commands, results, and any checks that could not run with their reasons.
Complete the report's fixed demo and acceptance table with evidence for every criterion. Mark each as passed, failed, or blocked; unexecuted checks are blocked, not passed. Do not claim acceptance while any required criterion is failed or blocked. Keep
STATE.mdaligned with this evidence.Commit and push the branch to the user's designated private repository for validation. Confirm the remote points to that repository.
Use
github-pr-workflowto open a pull request only against that private repository, linking the issue and acceptance report and reporting validation evidence and remaining blockers. Specify the destination explicitly (for example,gh pr create --repo yenhao-huang/TensorRT) so the PR cannot default to the community upstream. If the private destination is unknown, ask for it before publishing. Do not offer or request approval to publish a community PR as part of this workflow.Monitor CI and review feedback, address failures or actionable comments, and merge only when the user explicitly requested merging or repository policy clearly grants that authority.
Summarize the result, validation, pull request state, and any follow-up or residual risk. Mark the run complete in
STATE.mdonly when the requested lifecycle is actually finished.
Guardrails
- Use a purpose-built installed skill for each workflow phase when available.
- Keep concise work notes in
STATE.mdat meaningful checkpoints so later turns can resume without reconstructing context. - After a command returns empty or unexpected output, run a read-only state
check before taking the next mutating action. For example, retry
gh issue vieworgh pr viewwith--json, inspectgit statusafter file-moving commands, and verify a remote branch before deleting it. - If code changes, make each commit a coherent logical unit and validate it in proportion to risk.
- Committing, pushing, and opening the PR in the user's designated private
repository are in scope when solving an issue. Never create or retarget a
PR against the upstream/public community repository; follow
Notesand explicitly verify the PR destination. - Do not merge, close an issue, force-push, delete a branch, or perform another consequential remote action unless the user's request or established repository workflow authorizes it.
- Never start implementation before reading the issue's comments and linked work in full. An issue whose discussion shows it is already fixed, duplicated, or resolved elsewhere is a bypass, not a coding task: record it and move to the next candidate instead of re-solving already-solved work.
Provenance
Adapted from plugins/base-tools/skills/solve-issue in
canpok1/claude-code-plugins at commit
04f81f5ffc0d83dab157171203520e1d635742cb. See
references/LICENSE.txt for the upstream MIT license.