analyze-issue

A command for investigating a GitHub issue and producing a plan to resolve it. It gathers the issue description, comments, labels, and related code before explaining the problem and proposed work.

In plain words
What is it for?
Use it to understand an issue's root cause, identify affected code, plan tests and documentation, and consider performance, security, compatibility, and downstream effects.
Why use it?
It turns a scattered issue conversation and codebase investigation into one resolution plan without changing the code.

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/analyze-issue
Clone the repo
git clone --depth 1 https://github.com/payloadcms/payload

Made for: Claude Code.

Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 361 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.00010 $0.00361
Opus 5 $0.00005 $0.00180
Sonnet 5 $0.00002 $0.00072
Haiku 4.5 $0.00001 $0.00036

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

Security

Grade A, and why

analyze-issue 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/analyze-issue.md · 34 lines

What it actually says

Deep-dive on the GitHub issue provided in $ARGUMENTS. Find the problem and generate a plan. Do not write code. Explain the problem clearly and propose a comprehensive plan to solve it.

PROMPT for the issue number or URL if not provided, and stop here.

Steps:

  1. Fetch issue data using: gh issue view $ARGUMENTS --json author,title,number,body,comments,labels
  2. Parse the JSON response to extract:
    • Title and number
    • Description (body)
    • All comments with authors
    • Labels
  3. Format the issue context clearly
  4. Review the issue context and details
  5. Examine the relevant parts of the codebase. Analyze the code thoroughly until you have a solid understanding of how it works.
  6. Explain the issue in detail, including the problem and its root cause. There is no guarantee the issue is valid, so be critical and thorough in your analysis.
  7. Create a comprehensive plan to solve the issue. The plan should include:
    • Required code changes
    • Potential impacts on other parts of the system
    • Necessary tests to be written or updated
    • Documentation updates
    • Performance considerations
    • Security implications
    • Backwards compatibility (if applicable)
    • Include the reference link to the source issue and any related discussions
  8. Think deeply about all aspects of the task. Consider edge cases, potential challenges, and best practices for addressing the issue.

IMPORTANT: ONLY CREATE A PLAN. DO NOT WRITE ANY CODE. Your task is to create a thorough, comprehensive strategy for understanding and resolving the issue.

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 · 34 lines · 10 tokens per session scan A 3cf0141be012

Subscribe to this mod's changes

analyze-issue is a command published in the GitHub repository payloadcms/payload (44,499 stars, last pushed 3d ago), licensed MIT. It adds 10 tokens to every session and 361 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.