triage

A command for triaging a GitHub issue, meaning checking whether it is valid and locating the relevant code. It gathers the issue context and investigates the code without making changes.

In plain words
What is it for?
Use it to fetch an issue, inspect related code, judge whether the report is valid, assign a confidence level, and suggest a failing test or resolution plan.
Why use it?
It provides an early assessment before implementation, reducing time spent fixing issues that are invalid, unclear, or caused by a different part of the system.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/payloadcms/payload/triage
Clone the repo
git clone --depth 1 https://github.com/payloadcms/payload

Made for: Claude Code.

Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 769 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.00769
Opus 5 $0.00013 $0.00385
Sonnet 5 $0.00005 $0.00154
Haiku 4.5 $0.00003 $0.00077

Measured yesterday against content hash 730d5a7414f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

triage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/triage.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Triage GitHub Issue

Quickly triage GitHub issues to determine validity and identify where the issue exists in code. Do not write code during triage.

Process

Step 1: Validate & Fetch

  1. Check if $ARGUMENTS provided - if missing, ask user and stop
  2. Create TodoWrite with: Fetch and validate issue data | Investigate codebase | Analyze validity and generate report | Offer next steps
  3. Fetch issue data: gh issue view $ARGUMENTS --json author,title,number,body,comments,labels,url
  4. If command fails: Inform user and stop
  5. Extract title, body, comments, labels, state, URL
  6. Verify issue has sufficient info to investigate

Step 2: Investigate

  1. Use Task tool with subagent_type=Explore to examine relevant parts of codebase
  2. Think step by step through the code paths involved until you understand the relevant files, functions, and logic
  3. Focus on understanding the problem space before judging validity

Step 3: Analyze & Report

  1. Think step by step about whether this issue is valid - be critical and consider alternative explanations
  2. Determine verdict: Valid | Invalid | Needs Info
  3. Determine confidence: High | Medium | Low
  4. If valid: Think deeply about the root cause before proposing fix direction
  5. Generate findings using output structure below
  6. Auto-save to .claude/artifacts/triage-<issue-number>.md
  7. Present findings to user

Step 4: Offer Next Steps

Use AskUserQuestion with multiSelect: true:

"What would you like to do next?"

  • Create failing test - Write integration test that reproduces the issue
  • Create resolution plan - Generate full plan using /superpowers:write-plan
  • Done for now - End triage

If user selects test: Write an integration test that reproduces the issue. If user selects plan: Use /superpowers:write-plan to create detailed implementation plan.

Output Structure

# Triage: #<issue-number> - <title>

**Verdict:** Valid | Invalid | Needs Info
**Confidence:** High | Medium | Low

## Problem

1-2 sentences on what's broken and why.

## Reproduction

Steps to reproduce from investigation:

1. ...
2. ...

## Code Locations

- `path/file.ts:123` - what's here
- `path/other.ts:456` - related

## Fix Direction

Brief hints on potential approach (not full plan):

- Consider X
- May need to change Y

## Issue Link

<url>

Read the full file on GitHub · 109 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 109 lines · 25 tokens per session scan A 730d5a7414f1

Subscribe to this mod's changes

triage is a command published in the GitHub repository payloadcms/payload (44,499 stars, last pushed 3d ago), licensed MIT. It adds 25 tokens to every session and 769 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.