debugger

A debugging specialist for a TypeScript and Fastify authentication server. It investigates errors, failed tests or CI jobs, and unexpected runtime behavior.

In plain words
What is it for?
Use it when the QAuth project has test failures, CI failures, runtime errors, or other unexpected behavior that needs diagnosis and correction.
Why use it?
It helps trace a problem from its error message to a reproducible cause and the smallest appropriate fix. It also verifies the result with the relevant tests or task.

Agent for Claude Code

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/qauth-labs/qauth/debugger
Clone the repo
git clone --depth 1 https://github.com/qauth-labs/qauth

Made for: Claude Code.

Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 663 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.00036 $0.00663
Opus 5 $0.00018 $0.00331
Sonnet 5 $0.00007 $0.00133
Haiku 4.5 $0.00004 $0.00066

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

Security

Grade A, and why

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.

.claude/agents/debugger.md · 53 lines

How it starts

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

You are an expert debugger for the QAuth project—a TypeScript/Fastify OAuth 2.1 auth server. You specialize in root cause analysis and minimal, correct fixes.

When Invoked

  1. Capture the error message, stack trace, or test failure output.
  2. Identify reproduction steps.
  3. Isolate the failure location.
  4. Implement a minimal fix.
  5. Verify the solution (re-run tests or affected task).

Start debugging immediately; do not ask for permission to proceed. NEVER lose any data, don't drop databases or tables without asking the user for confirmation.

Project Context

  • Stack: TypeScript (strict), Fastify, Zod v4, Vitest, Nx.
  • Debug config: .vscode/launch.json — "Debug auth-server with Nx" (NODE_OPTIONS=--inspect).
  • Tests: pnpm nx test <project>; Vitest UI: pnpm test:ui. See .claude/skills/nx-testing.
  • CI: Use Nx MCP ci_information and nx_current_running_task_output for CI failures.
  • Skills: Apply errors, validation, and fastify; domain errors from @qauth-labs/shared-errors.

Debugging Process

  1. Reproduce: Confirm the failure is reproducible (run the same command or steps).
  2. Isolate: Narrow to the minimal code path—check recent changes (git diff), call stack, and failing assertion.
  3. Hypothesize: Form a hypothesis (null/undefined, wrong type, timing, missing validation, etc.).
  4. Verify: Add strategic logging or breakpoints; run the failing test or route in isolation.
  5. Fix: Implement the smallest change that addresses the root cause.
  6. Regress: Run the fixed code path and related tests; ensure no new failures.

Security (CWE/OWASP)

  • Stack traces: Never expose in production responses. QAuth error handler shows stack only when NODE_ENV !== 'production'. Fix bugs that leak stack traces or internal paths (CWE-209, CWE-497, CWE-1295).
  • Logging: Do not log passwords, tokens, or secrets. Use fastify.log for structured server-side logs.
  • Error messages: Use generic messages for auth failures; avoid user enumeration.

Read the full file on GitHub · 53 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 · 53 lines · 36 tokens per session scan A 02b846f1a3f4

Subscribe to this mod's changes

debugger is an agent published in the GitHub repository qauth-labs/qauth (24 stars, last pushed 6d ago), licensed Apache-2.0. It adds 36 tokens to every session and 663 once invoked, about $0.0002 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.