Skip to content

feat: add issue triage skill#200

Merged
ilblackdragon merged 2 commits intomainfrom
feat/issue-triage-skill
Feb 19, 2026
Merged

feat: add issue triage skill#200
ilblackdragon merged 2 commits intomainfrom
feat/issue-triage-skill

Conversation

@ilblackdragon
Copy link
Copy Markdown
Member

Summary

  • Adds a /triage-issues slash command that classifies all open GitHub issues into bugs and feature requests
  • Ranks bugs by a severity score (impact × 2 + urgency + scope, max 17) and features by an opportunity score (value × 2 + effort + readiness, max 17)
  • Assesses each issue's detail level (well-specified / adequate / under-specified) and suggests clarifying questions for vague issues
  • Detects duplicates, stale issues, already-fixed issues, and suggests concrete next actions
  • Supports --label and --milestone filters

Test plan

  • Run /triage-issues on a repo with mixed open issues and verify classification
  • Run with --label=bug filter and confirm only matching issues appear
  • Verify scoring produces sensible ordering (critical bugs first, quick-win features highlighted)
  • Confirm read-only — no comments posted or issues modified

🤖 Generated with Claude Code

Adds a /triage-issues skill that classifies open GitHub issues into bugs
and feature requests, ranks bugs by severity and features by opportunity,
and flags under-specified issues needing clarification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 19, 2026 01:34
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @ilblackdragon, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a powerful new skill for automated GitHub issue triage. It significantly enhances issue management by providing a structured approach to classify, rank, and analyze open issues, offering maintainers actionable insights and streamlining the process of identifying critical bugs, high-opportunity features, and issues requiring further clarification. The new command aims to improve project efficiency by making issue backlogs more manageable and transparent.

Highlights

  • New Slash Command: Introduced a /triage-issues slash command to automate GitHub issue classification and analysis.
  • Issue Classification: Implemented classification of open GitHub issues into 'bugs' and 'feature requests'.
  • Scoring Mechanism: Added a ranking system for bugs by severity (impact × 2 + urgency + scope) and features by opportunity (value × 2 + effort + readiness).
  • Detail Level Assessment: Included assessment of each issue's detail level (well-specified, adequate, under-specified) with suggestions for clarifying vague issues.
  • Issue Detection: Incorporated detection for duplicates, stale issues, and already-fixed issues, along with suggestions for next actions.
  • Filtering Options: Provided support for --label and --milestone filters to refine issue triage.
Changelog
  • .claude/commands/triage-issues.md
    • Added a new command definition for the issue triage skill, outlining its functionality, steps, scoring criteria, and report format.
Activity
  • No specific activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new issue triage skill, which is well-structured and detailed. I've found a few issues in the skill definition that could cause errors or incorrect behavior. Specifically, there are problems with the gh commands used for fetching issues, including a non-portable date command and an invalid field in the JSON output. Additionally, the formulas for calculating bug severity and feature opportunity scores have incorrect maximum values. My review comments provide specific suggestions to fix these issues.

Comment thread .claude/commands/triage-issues.md Outdated
Fetch every open issue with metadata:

```
gh issue list --state open --limit 200 --json number,title,author,labels,assignees,createdAt,updatedAt,body,comments,milestone
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The gh issue list command uses an invalid field comments in the --json flag. This will likely cause the command to fail or not return the intended data. You should replace comments with commentsCount. To better support the logic on line 251 for ranking by engagement, you could also add reactionGroups. Full comment content should be fetched with gh issue view as implied on line 245.

Suggested change
gh issue list --state open --limit 200 --json number,title,author,labels,assignees,createdAt,updatedAt,body,comments,milestone
gh issue list --state open --limit 200 --json number,title,author,labels,assignees,createdAt,updatedAt,body,commentsCount,reactionGroups,milestone

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8f02d8b — changed to commentsCount and added reactionGroups for engagement scoring.

Also fetch recently closed issues (last 14 days) to detect duplicates and already-resolved work:

```
gh issue list --state closed --search "closed:>=$(date -v-14d +%Y-%m-%d)" --limit 100 --json number,title,body,labels,closedAt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The date -v-14d command is specific to BSD/macOS. It will fail on GNU/Linux systems, which are common in containerized environments where this skill might run. To make the command portable, you should use the GNU date syntax: date -d '14 days ago'.

Suggested change
gh issue list --state closed --search "closed:>=$(date -v-14d +%Y-%m-%d)" --limit 100 --json number,title,body,labels,closedAt
gh issue list --state closed --search "closed:>=$(date -d '14 days ago' +%Y-%m-%d)" --limit 100 --json number,title,body,labels,closedAt

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changing — this matches the existing triage-prs.md pattern (date -v-7d) and the project targets macOS (darwin). Keeping BSD syntax for consistency across skills.

Comment thread .claude/commands/triage-issues.md Outdated
| 2 | **Moderate** | Affects one module or a specific configuration |
| 1 | **Narrow** | Affects edge case or single obscure path |

**Bug severity score** = Impact × 2 + Urgency + Scope (max 17)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a miscalculation in the bug severity score. The formula is Impact × 2 + Urgency + Scope. With maximum values of Impact=4, Urgency=3, and Scope=3, the maximum score is 4*2 + 3 + 3 = 14, not 17 as stated. This should be corrected to reflect the correct maximum base score.

Suggested change
**Bug severity score** = Impact × 2 + Urgency + Scope (max 17)
**Bug severity score** = Impact × 2 + Urgency + Scope (max 14)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8f02d8b — corrected to "base max 14" with one-time +2 boost (max 16). Also adjusted the severity thresholds in the report section.

Comment thread .claude/commands/triage-issues.md Outdated
| 2 | **Almost ready** | Needs minor clarification, but scope is understood |
| 1 | **Not ready** | Needs design discussion, has open questions, blocked by other work |

**Opportunity score** = Value × 2 + Effort + Readiness (max 17)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the bug severity score, there's a miscalculation in the feature opportunity score. The formula is Value × 2 + Effort + Readiness. With maximum values of Value=4, Effort=3, and Readiness=3, the maximum score is 4*2 + 3 + 3 = 14, not 17 as stated. This should be corrected to reflect the correct maximum base score.

Suggested change
**Opportunity score** = Value × 2 + Effort + Readiness (max 17)
**Opportunity score** = Value × 2 + Effort + Readiness (max 14)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8f02d8b — same correction applied: "base max 14", one-time +2 boost (max 16).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive issue triage slash command (/triage-issues) that provides automated classification and prioritization of GitHub issues. The command categorizes open issues into bugs and feature requests, scores them using multi-dimensional rubrics (bugs by severity, features by opportunity), assesses specification quality, and generates an actionable triage report with recommendations. It supports filtering by labels and milestones and is designed as a read-only analysis tool.

Changes:

  • Added /triage-issues command with intelligent bug/feature classification, multi-factor scoring system (severity and opportunity), and comprehensive triage reporting
  • Implemented detail level assessment (well-specified/adequate/under-specified) and detection of duplicates, stale issues, and already-fixed issues
  • Added support for --label and --milestone filtering with actionable recommendations for issue management

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .claude/commands/triage-issues.md Outdated
Comment on lines +94 to +96
**Bug severity score** = Impact × 2 + Urgency + Scope (max 17)

Also boost the score by +2 if the issue:
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stated maximum score of 17 is mathematically incorrect. The base formula (Impact × 2 + Urgency + Scope) has a maximum of 13 (4×2 + 3 + 3 = 13). The boost conditions (lines 96-99) add +2 per condition, but it's unclear whether this is +2 total or +2 per matching condition. If +2 per condition, the actual maximum is 19 (13 + 6). If +2 total for any condition, the maximum is 15 (13 + 2). Either way, stating "max 17" is inaccurate and could confuse users about the scoring system. Please clarify the boost logic and correct the maximum value accordingly.

Suggested change
**Bug severity score** = Impact × 2 + Urgency + Scope (max 17)
Also boost the score by +2 if the issue:
**Bug severity score** = Impact × 2 + Urgency + Scope (base max 13, boosted max 19)
Also boost the score by +2 for each of the following that applies:

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8f02d8b — corrected to "base max 14". Note: 4×2+3+3=14, not 13. Boost is clarified as one-time +2 (max 16).

Comment thread .claude/commands/triage-issues.md Outdated
Comment on lines +133 to +135
**Opportunity score** = Value × 2 + Effort + Readiness (max 17)

Also boost by +2 if:
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stated maximum score of 17 is mathematically incorrect. The base formula (Value × 2 + Effort + Readiness) has a maximum of 13 (4×2 + 3 + 3 = 13). The boost conditions (lines 135-138) add +2, but it's unclear whether this is +2 total or +2 per matching condition. If +2 per condition, the actual maximum is 19 (13 + 6). If +2 total for any condition, the maximum is 15 (13 + 2). Either way, stating "max 17" is inaccurate. This should match the clarification made for bug severity scoring to maintain consistency.

Suggested change
**Opportunity score** = Value × 2 + Effort + Readiness (max 17)
Also boost by +2 if:
**Opportunity score** = Value × 2 + Effort + Readiness (base range: 1–13)
Then add a one-time +2 bonus (not per bullet, overall max 15) if any of the following are true:

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8f02d8b — corrected max and clarified boost is one-time +2 (max 16), matching the bug severity pattern.

Comment thread .claude/commands/triage-issues.md Outdated
gh issue list --state closed --search "closed:>=$(date -v-14d +%Y-%m-%d)" --limit 100 --json number,title,body,labels,closedAt
```

**Exclude pull requests** — `gh issue list` may include PRs. Filter out any item whose number matches an open PR, or that has a `pull_request` field.
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instruction to exclude pull requests lacks implementation guidance. Line 28 says to "Filter out any item whose number matches an open PR, or that has a pull_request field," but the gh issue list command on line 17 doesn't provide information to enable this filtering. The implementer would need additional instructions on how to obtain the list of open PRs or how to check if an issue number corresponds to a PR. Consider adding explicit instructions such as: "First fetch the list of open PR numbers with 'gh pr list --state open --json number' and exclude any issue numbers that match."

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8f02d8b — added explicit gh pr list --state open --json number --jq '.[].number' command for filtering.

Comment on lines +98 to +99
- Is labeled `security`
- Is a regression (worked before, broken now)
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scoring system may double-count security issues and regressions. Line 83 defines Urgency level 3 as including "Security issue" and "regression in recent release," but lines 98-99 also add a +2 boost for issues labeled security or identified as regressions. This means a security regression could receive both a high Urgency score (3) and two separate +2 boosts (one for security, one for regression), effectively counting these attributes multiple times. Consider clarifying whether the boost is intended as additional emphasis beyond the urgency score, or whether issues that already have high urgency due to these factors should not receive the boost to avoid double-counting.

Suggested change
- Is labeled `security`
- Is a regression (worked before, broken now)
- Is labeled `security` and was **not** already rated **Urgent (3)** primarily because it is a security issue
- Is a regression (worked before, broken now) and was **not** already rated **Urgent (3)** primarily because it is a regression

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The double-counting is intentional. Urgency captures time-sensitivity for scoring, while the boost is an organizational signal to float critical items to the very top. A security regression should rank higher than a regular security bug.

gh issue list --state open --limit 200 --json number,title,author,labels,assignees,createdAt,updatedAt,body,comments,milestone
```

If `$ARGUMENTS` contains `--label=<X>`, append `--label '<X>'` to the command. If it contains `--milestone=<X>`, append `--milestone '<X>'` to the command.
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instructions at this line direct composing a gh issue list shell command by interpolating user-controlled arguments (--label=<X>, --milestone=<X>) into a single-quoted string without escaping embedded quotes. An attacker who controls the argument value (e.g., by getting someone to run /triage-issues --label='foo'; rm -rf ~; ') can break out of the quotes and inject arbitrary shell commands executed by the Bash tool, leading to code execution on the operator’s machine. To fix this, avoid constructing shell commands via string concatenation and instead pass arguments as separate, safely-escaped parameters or ensure any single quotes in <X> are robustly escaped before use.

Suggested change
If `$ARGUMENTS` contains `--label=<X>`, append `--label '<X>'` to the command. If it contains `--milestone=<X>`, append `--milestone '<X>'` to the command.
If `$ARGUMENTS` contains `--label=<X>`, extract `<X>` into a variable (for example `LABEL_FILTER`) and pass it to the tool as a separate, safely quoted argument, e.g. `gh issue list ... --label "$LABEL_FILTER"`. Likewise, if it contains `--milestone=<X>`, extract `<X>` into `MILESTONE_FILTER` and pass it as `--milestone "$MILESTONE_FILTER"`; avoid constructing a single shell command string with unescaped interpolation.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not applicable — this is a skill prompt interpreted by Claude Code, not a shell script. $ARGUMENTS is expanded by the skill system before Claude sees it, and Claude constructs the gh command itself. No string concatenation or shell injection vector. Matches the identical pattern in triage-prs.md line 20.

- Fix invalid `comments` field to `commentsCount` + add `reactionGroups`
- Correct severity/opportunity max scores from 17 to base 14 (boosted 16)
- Clarify boost is one-time (+2 if any condition matches)
- Add explicit `gh pr list` command for PR exclusion filtering
- Adjust severity/opportunity thresholds in report section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ilblackdragon ilblackdragon merged commit 5c95466 into main Feb 19, 2026
2 checks passed
@ilblackdragon ilblackdragon deleted the feat/issue-triage-skill branch February 19, 2026 02:18
@github-actions github-actions Bot mentioned this pull request Feb 19, 2026
jaswinder6991 pushed a commit to jaswinder6991/ironclaw that referenced this pull request Feb 26, 2026
* feat: add issue triage skill

Adds a /triage-issues skill that classifies open GitHub issues into bugs
and feature requests, ranks bugs by severity and features by opportunity,
and flags under-specified issues needing clarification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address PR review feedback on issue triage skill

- Fix invalid `comments` field to `commentsCount` + add `reactionGroups`
- Correct severity/opportunity max scores from 17 to base 14 (boosted 16)
- Clarify boost is one-time (+2 if any condition matches)
- Add explicit `gh pr list` command for PR exclusion filtering
- Adjust severity/opportunity thresholds in report section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Illia Polosukhin <ilblacdragon@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
bkutasi pushed a commit to bkutasi/ironclaw that referenced this pull request Mar 28, 2026
* feat: add issue triage skill

Adds a /triage-issues skill that classifies open GitHub issues into bugs
and feature requests, ranks bugs by severity and features by opportunity,
and flags under-specified issues needing clarification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address PR review feedback on issue triage skill

- Fix invalid `comments` field to `commentsCount` + add `reactionGroups`
- Correct severity/opportunity max scores from 17 to base 14 (boosted 16)
- Clarify boost is one-time (+2 if any condition matches)
- Add explicit `gh pr list` command for PR exclusion filtering
- Adjust severity/opportunity thresholds in report section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Illia Polosukhin <ilblacdragon@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants