fix-issue

A command that investigates and fixes a GitHub issue, which is a reported task or bug in a code repository.

In plain words
What is it for?
Use it to inspect issue details, search the codebase, create a failing test or reproduction, implement the fix, and update tests.
Why use it?
It turns the issue description into a checked workflow: understand the report, reproduce the problem, make a focused change, and test it.

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/intellegix/intellegix-code-agent-toolkit/fix-issue
Clone the repo
git clone --depth 1 https://github.com/intellegix/intellegix-code-agent-toolkit
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 711 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.00711
Opus 5 $0.00000 $0.00356
Sonnet 5 $0.00000 $0.00142
Haiku 4.5 $0.00000 $0.00071

Measured 2d ago against content hash e2243b0d13be, 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 2d 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.

commands/fix-issue.md · 135 lines

How it starts

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

Fix GitHub Issue

Analyze and fix the GitHub issue: $ARGUMENTS

Process

Phase 1: Understand the Issue

  1. Fetch Issue Details

    gh issue view $ARGUMENTS --json title,body,labels,assignees,comments
    
  2. Analyze the Problem

    • Read the issue description carefully
    • Check comments for additional context
    • Identify reproduction steps if provided
    • Note any related issues or PRs mentioned
  3. Search the Codebase

    • Find affected files by searching for relevant terms
    • Identify the root cause location
    • Check git blame for recent changes to the area

Phase 2: Reproduce & Verify

  1. Create Reproduction

    • Write a failing test that demonstrates the bug
    • Or create a minimal reproduction scenario
    • Document how to trigger the issue
    # Run existing tests to establish baseline
    npm test -- --testPathPattern="[affected-area]"
    # or
    pytest tests/[affected_area] -v
    

Phase 3: Implement the Fix

  1. Make Minimum Necessary Changes

    • Fix the root cause, not just the symptom
    • Avoid scope creep - don't refactor unrelated code
    • Follow existing code patterns
  2. Update/Add Tests

    • Ensure the failing test now passes
    • Add edge case tests if needed
    • Verify no regressions

Phase 4: Verify the Fix

  1. Run Verification

    # Type checking
    npm run type-check || mypy src/
    
    # Full test suite
    npm test || pytest
    
    # Linting
    npm run lint || ruff check .
    
  2. Manual Verification

    • Test the fix manually if applicable
    • Verify in relevant environments

Phase 5: Create Commit

  1. Stage and Commit
    git add -A
    git commit -m "fix([scope]): [brief description]
    
    [Longer explanation if needed]
    
    - [Bullet point of what changed]
    - [Another bullet point]
    
    Fixes #$ARGUMENTS"
    

Output Format

## Issue Analysis: #[NUMBER]

### Problem Summary
[1-2 sentence description of the bug]

### Root Cause
[Technical explanation of why this was happening]

### Solution
[What was done to fix it]

### Files Modified
| File | Change |
|------|--------|
| `path/to/file` | [Description of change] |

### Testing
- [x] Added failing test
- [x] Test now passes
- [x] No regressions

### Verification Commands Run
```bash
npm test -- --testPathPattern="affected"
npm run type-check

Commit

fix(scope): description

Read the full file on GitHub · 135 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. 2d ago First seen · 135 lines · 0 tokens per session scan A e2243b0d13be

Subscribe to this mod's changes

fix-issue is a command published in the GitHub repository intellegix/intellegix-code-agent-toolkit (57 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 711 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-30.