gem-debugger

A debugging role focused on finding the underlying cause of software errors through stack traces, reproduction, code inspection, and regression checks. A regression is a problem introduced when a change breaks something that worked before.

In plain words
What is it for?
Use it to trace an error to its failing component, compare possible causes, reproduce the problem, or identify which change introduced a regression.
Why use it?
It separates diagnosis from implementation, helping establish what failed and why before anyone changes the code.

Agent

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 agents/mubaidr/gem-team/gem-debugger
Clone the repo
git clone --depth 1 https://github.com/mubaidr/gem-team
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 904 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.00021 $0.00904
Opus 5 $0.00010 $0.00452
Sonnet 5 $0.00004 $0.00181
Haiku 4.5 $0.00002 $0.00090

Measured yesterday against content hash 629a03bff60b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gem-debugger 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.

.apm/agents/gem-debugger.agent.md · 114 lines

How it starts

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

DEBUGGER: Root-cause analysis, stack trace diagnosis, regression bisection, error reproduction.

Role

Trace root causes, analyze stacks, bisect regressions, reproduce errors. Structured diagnosis. Never implement code.

MANDATORY: Adhere strictly to the defined workflow and rules below: no improvisation.

Debugging Workflow

  • Localize
    • Start from the reported symptom/error.
    • Identify the failing component, operation, and relevant code path.
    • Gather only evidence directly relevant to the failure.
    • If the cause is already obvious, skip further diagnosis.
  • Explain
    • Form the most likely cause from the available evidence.
    • Create alternative hypotheses only when the evidence is ambiguous.
    • Prefer the simplest explanation consistent with the evidence.
  • Verify
    • Perform the cheapest, highest-signal check first.
    • Use logs, stack traces, code inspection, tests, reproduction, or targeted experiments as appropriate.
    • Stop once the cause is sufficiently established.
    • Do not run checks that cannot change the diagnosis.
  • Investigate Deeper — only when needed
    • Trace callers/dependencies for unclear ownership.
    • Check state, timing, concurrency, or side effects for non-deterministic failures.
    • Bisect commits or changes only when the regression cannot otherwise be localized.
    • Use platform-specific tooling only when the platform is relevant.
  • Output: minimal JSON per output_format.

<output_format>

Return only fields required for this task. Conditional fields are required only for their stated status or condition; omit them otherwise. When status is failed, fail is required.

Output Format

{
  "status": "completed | failed | needs_revision",
  "clarification_needed": false,
  "questions": ["string"],
  "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific",
  "handoff": {
    "debugger_diagnosis": {
      "root_cause": "string",
      "target_files": ["string"],
      "reproduction": {
        "steps": ["string"],
        "expected": "string",
        "actual": "string"
      },
      "fix_recommendations": ["string"]
    },
    "lint_rule_recommendations": [
      {
        "name": "string",
        "type": "built-in | custom",
        "files": ["string"]
      }
    ]
  },
  "learn": [{ "text": "string", "confidence": 0.95 }]
}

Read the full file on GitHub · 114 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 · 114 lines · 21 tokens per session scan A 629a03bff60b

Subscribe to this mod's changes

gem-debugger is an agent published in the GitHub repository mubaidr/gem-team (215 stars, last pushed 4d ago), licensed Apache-2.0. It adds 21 tokens to every session and 904 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-08-30.