debug-toolbar: Command for Claude Code

.claude/commands/fix-issue.md

fix-issue is a command for Claude Code from JacobCoffee/debug-toolbar. It costs 10 tokens per session (650 once invoked), scanned A, original, MIT.

A workflow for fixing a GitHub issue, a tracked report of a software problem or requested change. It moves from understanding and investigating the issue to implementing a fix and adding or updating tests.

In plain words
What is it for?
Use it to inspect issue details, find the root cause, follow existing code patterns, make a focused change, and test the result.
Why use it?
It gives issue work a clear sequence and helps prevent coding before the cause and expected behaviour are understood.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

This is JacobCoffee/debug-toolbar's own configuration. It tells Claude Code how to work on debug-toolbar 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 debug-toolbar configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JacobCoffee/debug-toolbar. 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/JacobCoffee/debug-toolbar/main/.claude/commands/fix-issue.md
Clone the repo
git clone --depth 1 https://github.com/JacobCoffee/debug-toolbar

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 fix-issue

README.md
[![agentmods](https://agentmods.dev/badge/commands/jacobcoffee/debug-toolbar/fix-issue.svg)](https://agentmods.dev/commands/jacobcoffee/debug-toolbar/fix-issue)
Your own site
<a href="https://agentmods.dev/commands/jacobcoffee/debug-toolbar/fix-issue"><img src="https://agentmods.dev/badge/commands/jacobcoffee/debug-toolbar/fix-issue.svg" alt="Measured on agentmods" 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 650 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.1 $0.00010 $0.00650
Opus 5 $0.00005 $0.00325
Sonnet 5 $0.00002 $0.00130
Haiku 4.5 $0.00001 $0.00065

Measured yesterday against content hash c3c8575f81a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

fix-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/fix-issue.md · 159 lines

How it starts

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

Fix GitHub Issue

You are fixing issue: $ARGUMENTS

Workflow

Phase 1: Issue Analysis

Fetch issue details:

gh issue view {issue_number}

Understand the issue:

  1. What is the problem?
  2. What is the expected behavior?
  3. What is the actual behavior?
  4. Can it be reproduced?

Output: "✓ Phase 1 complete - Issue understood"


Phase 2: Root Cause Investigation

Use debug tools:

mcp__zen__debug(
    step="Investigating issue #{issue_number}",
    step_number=1,
    total_steps=3,
    next_step_required=True,
    findings="Initial investigation..."
)

Search codebase:

# Find related code
grep -r "{keyword}" src/

# Find related tests
grep -r "{keyword}" tests/

Output: "✓ Phase 2 complete - Root cause identified"


Phase 3: Fix Implementation

Follow existing patterns:

  1. Read similar fixes in git history
  2. Follow code style from CLAUDE.md
  3. Maintain type safety

Implement fix:

  1. Make minimal necessary changes
  2. Don't over-engineer
  3. Add or update tests

Output: "✓ Phase 3 complete - Fix implemented"


Phase 4: Testing

Write test for the fix:

"""Test for issue #{issue_number} fix."""

from __future__ import annotations

import pytest


class TestIssueNumber:
    """Test that issue #{issue_number} is fixed."""

    def test_issue_scenario(self) -> None:
        """Should not exhibit the bug behavior."""
        # Arrange: Set up the scenario from the issue
        # Act: Perform the action that caused the bug
        # Assert: Verify the fix works

Run tests:

make test

Output: "✓ Phase 4 complete - Tests passing"


Phase 5: Quality Verification

Run quality gates:

make lint
make type-check
make fmt-check

Output: "✓ Phase 5 complete - Quality gates passed"


Phase 6: Commit

Create commit with issue reference:

git add -A
git commit -m "fix: description of fix

Fixes #{issue_number}"

Read the full file on GitHub · 159 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 · 159 lines · 10 tokens per session scan A c3c8575f81a4

Subscribe to this mod's changes

fix-issue is a command published in the GitHub repository JacobCoffee/debug-toolbar (7 stars, last pushed 5mo ago), licensed MIT. It adds 10 tokens to every session and 650 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-09-04.