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.
npx agentmods add commands/thibautbaissac/rails_ai_agents/fix-errorgit clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agentsWrote 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.
[](https://agentmods.dev/commands/thibautbaissac/rails_ai_agents/fix-error)<a href="https://agentmods.dev/commands/thibautbaissac/rails_ai_agents/fix-error"><img src="https://agentmods.dev/badge/commands/thibautbaissac/rails_ai_agents/fix-error.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00018 | $0.00727 |
| Opus 5 | $0.00009 | $0.00364 |
| Sonnet 5 | $0.00004 | $0.00145 |
| Haiku 4.5 | $0.00002 | $0.00073 |
Grade A, and why
fix-error 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.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fix Error: Launch Isolated Fix Agent
Launch a background agent in a git worktree to implement and test a fix for a specific Sentry error.
Input
$ARGUMENTS — Sentry issue ID followed by a brief fix description.
Example: /sentry:fix-error 12345 Add nil check before accessing user.email in payment_service.rb
Workflow
-
Parse arguments: Extract the issue ID (first argument, numeric) and the fix description (remaining text).
- If no issue ID is provided, ask the developer for one.
- If no fix description is provided, fetch the issue detail and suggest a fix direction.
-
Fetch error context:
- Call
get_issue_detailwith the issue ID to get the full error details. - Call
map_stacktraceto identify which local files are affected.
- Call
-
Check worktree limit: Run
git worktree listand count branches matchingfix/SENTRY-*.- If there are 3 or more active fix worktrees, stop and notify the developer:
Maximum concurrent fix worktrees reached (3). Run `/sentry:fix-status` to review and close completed worktrees before launching a new fix. - Otherwise, proceed to step 4.
- If there are 3 or more active fix worktrees, stop and notify the developer:
-
Generate branch name:
fix/SENTRY-{short_id}-{slug}where{slug}is derived from the fix description (lowercase, hyphens, max 30 chars). -
Launch background agent: Use the Agent tool with these parameters:
isolation: "worktree"— creates an isolated git worktreerun_in_background: true— runs asynchronouslydescription: "Fix Sentry {short_id}"
Agent prompt (include all of this in the prompt):
You are fixing a production error detected by Sentry. ## Error Details - Issue: {short_id} — {title} - Exception: {exception_type}: {exception_value} - Affected files: {list of mapped local files with line numbers} ## Fix Description {fix description from user} ## Instructions 1. Read the affected source files to understand the context. 2. Implement the fix as described. 3. Detect and run the project's test suite: - If `Rakefile` exists: `bin/rails test` - If `pyproject.toml` exists: `uv run pytest` - If `package.json` exists: `npm test` 4. If tests pass: commit with message `fix: {title} (Sentry {short_id})` 5. If tests fail: report the failures but do NOT commit. 6. Report a summary: branch name, files changed, test results.
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.
- yesterday First seen · 76 lines · 18 tokens per session scan A e39a8facf3d1
fix-error is a command published in the GitHub repository ThibautBaissac/rails_ai_agents (659 stars, last pushed 3mo ago), licensed MIT. It adds 18 tokens to every session and 727 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-03.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.