alpacalyzer-algo-trader: Command for Claude Code

.agents/commands/fix-issue.md

fix-issue is a command for Claude Code from kimrejstrom/alpacalyzer-algo-trader. It costs 0 tokens per session (609 once invoked), scanned A, original, MIT.

A coding command that fetches a GitHub issue, finds the related code, writes a test, implements a fix, and opens a pull request. A GitHub issue is a tracked bug or task, and a pull request proposes code changes for review.

In plain words
What is it for?
Use it with an issue number to investigate and fix a GitHub issue, run the relevant tests, and prepare the change for review.
Why use it?
It turns the usual issue-fixing steps into one guided workflow. This helps keep the fix tied to the reported problem and checked by a test.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: positional $N argument; mentions Claude Code; installed under .agents/ (shared by several agents).

This is kimrejstrom/alpacalyzer-algo-trader's own configuration. It tells Claude Code how to work on alpacalyzer-algo-trader 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 alpacalyzer-algo-trader configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kimrejstrom/alpacalyzer-algo-trader. 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/kimrejstrom/alpacalyzer-algo-trader/main/.agents/commands/fix-issue.md
Clone the repo
git clone --depth 1 https://github.com/kimrejstrom/alpacalyzer-algo-trader

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/kimrejstrom/alpacalyzer-algo-trader/fix-issue/github.svg)](https://agentmods.dev/commands/kimrejstrom/alpacalyzer-algo-trader/fix-issue)
Your own site
<a href="https://agentmods.dev/commands/kimrejstrom/alpacalyzer-algo-trader/fix-issue"><img src="https://agentmods.dev/badge/commands/kimrejstrom/alpacalyzer-algo-trader/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/kimrejstrom/alpacalyzer-algo-trader/fix-issue"><img src="https://agentmods.dev/badge/commands/kimrejstrom/alpacalyzer-algo-trader/fix-issue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 609 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.00000 $0.00609
Opus 5 $0.00000 $0.00304
Sonnet 5 $0.00000 $0.00122
Haiku 4.5 $0.00000 $0.00061

Measured 10d ago against content hash f393742c851d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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.

.agents/commands/fix-issue.md · 143 lines

How it starts

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

Fix Issue Command

Fetch issue details, find relevant code, implement fix, and open PR.

Usage

/fix-issue <issue_number>

Arguments:

  • issue_number: The GitHub issue number to fix

Argument Indexing

  • Claude Code: Use $1 for the first argument (issue number)
  • OpenCode: Use $ARGUMENTS to get all arguments

Steps

1. Get Repo Info

git remote get-url origin

Parse owner and repo name.

2. Fetch Issue

Use gh CLI to fetch the issue:

gh issue view <issue_number> --repo <owner>/<repo>

3. Analyze Issue

Read the issue description:

  • What needs to be fixed?
  • What are the acceptance criteria?
  • Are there any hints about where the code lives?

4. Find Relevant Code

Search for relevant code:

# Search for keywords
rg "keyword" src/

# Find test files
ls tests/test_*.py

5. Create Branch

git checkout -b fix/issue-<issue_number>-<short-description>

6. Write Test First

Create test that reproduces the issue:

def test_bug_fix():
    """Test for issue #XX"""
    # Test that demonstrates the bug
    pass

Run test to confirm it fails.

7. Implement Fix

Implement the fix to make the test pass.

8. Run Tests

uv run pytest tests -x -q

9. Run Linting

uv run ruff check .
uv run ruff format .

10. Run Type Checking

uv run ty check src

11. Commit

git add -A
git commit -m "fix(scope): description for #XX"

12. Push and Create PR

git push -u origin fix/issue-XX-description
gh pr create --repo <owner>/<repo> \
  --title "fix(scope): description for #XX" \
  --head fix/issue-XX-description \
  --base main \
  --body-file - <<'EOF'
## Summary
<description>

## Issue
Fixes #XX
EOF

13. Trigger Code Review

@code-reviewer Please review:
- ISSUE_NUMBER: <issue_number>
- PR_NUMBER: <pr_number>
- OWNER: <owner>
- REPO: <repo>
- FEATURE_DESCRIPTION: <brief description>

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

Subscribe to this mod's changes

fix-issue is a command published in the GitHub repository kimrejstrom/alpacalyzer-algo-trader (2 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 609 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.