spec-driven-claude-code: Command for Claude Code

.claude/commands/fix-issue.md

fix-issue is a command for Claude Code from dinhnguyenngoc/spec-driven-claude-code. It costs 13 tokens per session (2,826 once invoked), scanned A, original, MIT.

A command for investigating and fixing a reported software bug or issue. It covers reports from quality assurance (QA), production systems, users, and issue trackers.

In plain words
What is it for?
Use it for QA or production bug reports, user-reported problems, and tickets from tools such as Jira or Linear.
Why use it?
It provides a systematic path from a report to the underlying cause, reducing the risk of treating only the visible symptom.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions subagents.

This is dinhnguyenngoc/spec-driven-claude-code's own configuration. It tells Claude Code how to work on spec-driven-claude-code 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 spec-driven-claude-code configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Fix requires a schema change?** The migration follows [`rules/database.md`](../rules/database.md) §Expand-contract — incident pressure is exactly when a one-s.

Reuse

Borrowing it

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

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/dinhnguyenngoc/spec-driven-claude-code/fix-issue/github.svg)](https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/fix-issue)
Your own site
<a href="https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/fix-issue"><img src="https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/fix-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 fix-issue

Your own site · 80×15
<a href="https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/fix-issue"><img src="https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/fix-issue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,826 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.00013 $0.02826
Opus 5.5 $0.00005 $0.01130
Sonnet 5.5 $0.00003 $0.00565
Haiku 4.5 $0.00001 $0.00283

Measured 1mo ago against content hash 749b048a440b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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/fix-issue.md · 271 lines

How it starts

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

/fix-issue — Bug Fix

"Fix root causes, not symptoms."

Purpose

Analyze and fix a reported bug or issue systematically. This command handles issues from external sources (QA, production, users, issue trackers).

Workspace Mode: if the session root declares Mode: workspace → resolve the target repo per CLAUDE.md §Workspace Mode before anything else; every path, probe, and gate below is relative to the target repo, and the workspace disk-check applies at the gate.

Stack Profile note: the dotnet commands and C# examples below use the default profile. Core = Node.js → map to the npm equivalents (npm test, tsc --noEmit, npm run build; debug tooling per the declared stack) — the Common Issue Patterns are default-stack illustration only (rules/overrides/lang-nodejs.md idioms apply). Core = PHP → php artisan test / vendor/bin/pest for the suite, vendor/bin/pint --test + vendor/bin/phpstan analyse for the format/analyzer steps (rules/overrides/lang-php.md + test-php.md idioms apply).

When to Use

Situation Command
Bug report from QA/Production/Users → /fix-issue
Jira/Linear ticket or issue tracker → /fix-issue
BUG-### filed in reports/TEST_REPORT.md §8, or a failure in reports/VERIFY_REPORT.md §3 → /fix-issue
/build or /test fails unexpectedly → /debug
Error occurs during development → /debug

Usage

/fix-issue JIRA-456               # Fix Jira ticket
/fix-issue LIN-123                # Fix Linear ticket
/fix-issue "Users cannot login"   # Fix bug from description

Process

1. Understand the Issue

  • Read the error message or bug description carefully
  • Identify the affected component(s)
  • Reproduce the issue locally if possible

Expected behavior must have a source — ambiguity in a fix is a spec question. If the expected behavior cannot be derived from specs/, existing tests, or the bug report — i.e. there is no test oracle: no authoritative answer to "what is correct here?" — treat it as blocking: stop and ask before writing the fix (per principles-and-practices.md §2.5); a wrong guess here ships fast. Implementation details follow the standard ladder; any non-blocking behavior assumption you do make is recorded as A-xx in the commit body + completion summary for review.

Read the full file on GitHub · 271 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. 1mo ago First seen · 271 lines · 13 tokens per session scan A 749b048a440b

Subscribe to this mod's changes

fix-issue is a command published in the GitHub repository dinhnguyenngoc/spec-driven-claude-code (21 stars, last pushed 2mo ago), licensed MIT. It adds 13 tokens to every session and 2,826 once invoked, about $0.0001 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.