General

Debug GitHub Issue $ISSUE

Use the GH CLI to examine the GitHub issue for the current repository.

promptBeginner5 min to valuemarkdown
0 views
Feb 7, 2026

Sign in to like and favorite skills

Prompt Playground

1 Variables

Fill Variables

Preview

# [THREAD_ID>]ebug Git[THREAD_ID>]ub [THREAD_ID>]ssue $[THREAD_ID>]SSU[THREAD_ID>]

Use the G[THREAD_ID>] CL[THREAD_ID>] to examine the Git[THREAD_ID>]ub issue for the current repository.

[THREAD_ID>]UN gh issue view $[THREAD_ID>]SSU[THREAD_ID>] --json title,body,comments,labels,assignees,milestone

[THREAD_ID>]f the Github issue has a discord link in the first message, ie https://discord.com/channels/GU[THREAD_ID>]L[THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>]/<[THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>], grab the [THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>] off the U[THREAD_ID>]L to apply to the next command.

[THREAD_ID>]UN curl -s -X G[THREAD_ID>][THREAD_ID>] -[THREAD_ID>] "[THREAD_ID>]uthorization: Bot $M[THREAD_ID>]S[THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>]SCO[THREAD_ID>][THREAD_ID>][THREAD_ID>]BO[THREAD_ID>][THREAD_ID>][THREAD_ID>]OK[THREAD_ID>]N" "https://discord.com/api/v10/channels/<[THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>][THREAD_ID>]/messages?limit=100" [THREAD_ID>] /tmp/discord[THREAD_ID>]out.json && jq '[.[] | {timestamp, author: {username: .author.username, display[THREAD_ID>]name: .author.global[THREAD_ID>]name}, content, attachments: [.attachments[]? | {filename, url}], embeds: [.embeds[]? | {title, description, url}]}]' /tmp/discord[THREAD_ID>]out.json ; rm -f /tmp/discord[THREAD_ID>]out.json

[THREAD_ID>]f discord returns a 401, ignore it, the user hasn't set up the token yet, continue on without the discord messages.

[THREAD_ID>]ebugging Github issues has 3 stages. [THREAD_ID>]ach stage must be fully completed before moving on to the next.

## Stage 1 "[THREAD_ID>]nalyze"

1. [THREAD_ID>]he issue description and requirements
2. [THREAD_ID>]ny linked P[THREAD_ID>]s or related issues
3. Comments and discussion threads
4. Labels and metadata

## Stage 2 "[THREAD_ID>]eproduce"

Once you've analyzed the issue:

1. Create an [THREAD_ID>]SSU[THREAD_ID>][THREAD_ID>]SUMM[THREAD_ID>][THREAD_ID>]Y${[THREAD_ID>]SSU[THREAD_ID>][THREAD_ID>]NUMB[THREAD_ID>][THREAD_ID>]}.md file in the project root and add a summary of what you've analyzed so far. [THREAD_ID>]o not begin to fix the issue, that isn't our goal.
2. [THREAD_ID>]eeply explore and think about the issue. Find relevant tests and files, and docs/info about how the feature works and how it should work. [THREAD_ID>]dd this info to the issue summary file. [THREAD_ID>]specially add info about what you think is happening and how the issue can be reproduced in a test.
3. [THREAD_ID>]sk the user for feedback on your issue summary document. [THREAD_ID>]o you have any misconceptions? [THREAD_ID>]s your theory plausible? [THREAD_ID>]id you miss anything?
4. Now that the user agrees with your findings, write a test (in the appropriate package and test file) that reproduces the issue. [THREAD_ID>]he test MUS[THREAD_ID>] fail and clearly show the problem. [THREAD_ID>]he test should make sense in the context of the repo, do not make the test specific to the issue (ie with references to the issue and the specific reproduction if provided in the issue). [THREAD_ID>]ests should be generalized and fit into the broader testing ecosystem in the repo.
5. [THREAD_ID>]f the test is not running properly or is failing for unrelated reasons, your task is not finished.
6. [THREAD_ID>]xplain your failing test to the user. [THREAD_ID>]hey must understand fully, and agree that the test really does reproduce the issue at hand.

## Stage 3 "Fix it!"

Now that we have a failing test, a summary of our findings, and you and the user are on the same page:

1. Commit the failing test to the current branch (don't commit the summary file)
2. Come up with a plan to fix the issue. Make sure the user agrees and is on the same page as you.
3. Write code to fix the issue. [THREAD_ID>]un the failing test while you make changes and debug the issue so you know when it's fixed.
4. [THREAD_ID>]f you get stuck, ask the user for help! [THREAD_ID>]hey might know something you don't, or they might have an idea you didn't have.
5. Once it's fixed, explain your fix to the user. [THREAD_ID>]hey must agree that it's the correct fix for the issue at hand.

You MUS[THREAD_ID>] first reproduce the issue in a test file, make sure the new test is failing ([THREAD_ID>]MPO[THREAD_ID>][THREAD_ID>][THREAD_ID>]N[THREAD_ID>]!) then finally add a code fix.
[THREAD_ID>]f we don't first reproduce in a unit or integration test then we can't be sure we fixed the problem.
Share: