fix-issue

A command that takes a GitHub issue number and guides an agent through understanding, implementing, testing, reviewing, and submitting the fix. GitHub issues are tracked work items or bug reports.

In plain words
What is it for?
Fixing a GitHub issue from initial investigation through code changes, tests, review, push, and pull-request creation.
Why use it?
It organizes the full issue-to-pull-request process and helps ensure the work targets the correct repository.

Command

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/djrhails/dotfiles/fix-issue
Clone the repo
git clone --depth 1 https://github.com/DJRHails/dotfiles
Per session 0 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,350 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.00000 $0.02350
Opus 5 $0.00000 $0.01175
Sonnet 5 $0.00000 $0.00470
Haiku 4.5 $0.00000 $0.00235

Measured yesterday against content hash f4fc9d4ed0c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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.

modules/agents/commands/fix-issue.md · 239 lines

How it starts

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

Fix GitHub Issue

@source https://github.com/trailofbits/claude-code-config @description End-to-end: plan, implement, test, review, fix, push, and PR for a GitHub issue. @arguments $ISSUE_NUMBER: GitHub issue number to fix

Read GitHub Issue #$ISSUE_NUMBER from the canonical repo (gh issue view $ISSUE_NUMBER --repo <owner/name>) thoroughly. Understand the full context: problem description, acceptance criteria, linked PRs, and any discussion. Follow linked issues, referenced PRs, and external documentation to build complete understanding before planning.

Detect the upstream repository: if a git remote named upstream exists, use it as the canonical repo (fetch from it, base branches on it, and submit PRs to it). Otherwise, fall back to origin. Resolve the canonical repo's owner/name (e.g. from git remote get-url upstream) and store it — use --repo <owner/name> on every gh command (issue views, PR creation, issue comments) to ensure they target the correct repository. Run git fetch <upstream-remote> to ensure you are working with up-to-date code.

Shared-repo guard: determine whether the canonical repo is a solo personal repo — owned by github.com/DJRHails with no other collaborators. Concretely: solo means the owner is DJRHails and gh api repos/<owner>/<repo>/collaborators --jq length returns 1. On solo personal repos, run fully autonomously. On any other repo (a shared org, or any repo with other collaborators), pause before each action that reaches other people — creating the PR (step 9) and commenting on the issue (step 10) — post a short summary of what you are about to send, and wait for explicit user confirmation.

Execute every step below sequentially without pausing for confirmation, except where the shared-repo guard requires it.

1. Research (if needed)

Before planning, determine if the issue requires external context you don't already have — unfamiliar APIs, protocols, libraries, error messages, or domain-specific concepts. If so, search for:

Read the full file on GitHub · 239 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 · 239 lines · 0 tokens per session scan A f4fc9d4ed0c2

Subscribe to this mod's changes

fix-issue is a command published in the GitHub repository DJRHails/dotfiles (2 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,350 tokens. 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-31.