payload: Command for Claude Code

.claude/commands/analyze-issue.md

analyze-issue is a command for Claude Code from payloadcms/payload. It costs 10 tokens per session (361 once invoked), scanned A, original, MIT.

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

Written for Claude Code: argument-hint in frontmatter.

This is payloadcms/payload's own configuration. It tells Claude Code how to work on payload itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything payload configures →

About the project

Payload is an open-source, full-stack framework for Next.js that provides a TypeScript backend and an administration panel for managing application data and content. Developers use it as a headless content management system or as the backend and application framework for their own projects. The catalogue add-ons help agents work with Payload projects and their development workflows.

payloadcms/payload · 45,565 stars · on GitHub · payloadcms.com

Reuse

Borrowing it

Nothing to install: this file belongs to payloadcms/payload. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/payloadcms/payload/main/.claude/commands/analyze-issue.md
Clone the repo
git clone --depth 1 https://github.com/payloadcms/payload

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-issue

README.md
[![agentmods](https://agentmods.dev/badge/commands/payloadcms/payload/analyze-issue/github.svg)](https://agentmods.dev/commands/payloadcms/payload/analyze-issue)
Your own site
<a href="https://agentmods.dev/commands/payloadcms/payload/analyze-issue"><img src="https://agentmods.dev/badge/commands/payloadcms/payload/analyze-issue/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyze-issue

Your own site · 80×15
<a href="https://agentmods.dev/commands/payloadcms/payload/analyze-issue"><img src="https://agentmods.dev/badge/commands/payloadcms/payload/analyze-issue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00010 $0.00361
Opus 5.5 $0.00004 $0.00144
Sonnet 5.5 $0.00002 $0.00072
Haiku 4.5 $0.00001 $0.00036

Measured 1mo ago against content hash 3cf0141be012, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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. 1mo ago 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 (45,565 stars, last pushed today), licensed MIT. It adds 10 tokens to every session and 361 once invoked, about $0.0000 per session on Opus 5.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.