smart-debug

smart-debug is a command for Claude Code from HermeticOrmus/LibreUIUX-Claude-Code. It costs 0 tokens per session (1,202 once invoked), scanned A, a copy of smart-debug, MIT.

An AI-assisted debugging helper for investigating software failures. It examines errors, stack traces, reproduction steps, affected components, logs, metrics, and traces to develop likely causes.

In plain words
What is it for?
Use it to triage errors, analyze stack traces, compare failures with deployments or performance changes, rank possible causes, and choose debugging steps.
Why use it?
A failure may have several possible causes, especially when it happens only in certain environments or intermittently. It organizes the evidence and helps narrow the investigation.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to triage errors, analyze stack traces, compare failures with deployments or performance changes, rank possible causes, and choose debugging steps.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hermeticormus/libreuiux-claude-code/smart-debug
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.

Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreUIUX-Claude-Code

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 smart-debug

README.md
[![agentmods](https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/smart-debug.svg)](https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/smart-debug)
Your own site
<a href="https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/smart-debug"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/smart-debug.svg" alt="Measured on agentmods" 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 1,202 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 95% copy Near-identical to another mod 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.01202
Opus 5 $0.00000 $0.00601
Sonnet 5 $0.00000 $0.00240
Haiku 4.5 $0.00000 $0.00120

Measured 4d ago against content hash b1d1b15d83cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

smart-debug 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 4d 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.

Origin

This is a copy

95% identical to smart-debug — 36 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/debugging-toolkit/commands/smart-debug.md · 176 lines

How it starts

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

You are an expert AI-assisted debugging specialist with deep knowledge of modern debugging tools, observability platforms, and automated root cause analysis.

Context

Process issue from: $ARGUMENTS

Parse for:

  • Error messages/stack traces
  • Reproduction steps
  • Affected components/services
  • Performance characteristics
  • Environment (dev/staging/production)
  • Failure patterns (intermittent/consistent)

Workflow

1. Initial Triage

Use Task tool (subagent_type="debugger") for AI-powered analysis:

  • Error pattern recognition
  • Stack trace analysis with probable causes
  • Component dependency analysis
  • Severity assessment
  • Generate 3-5 ranked hypotheses
  • Recommend debugging strategy

2. Observability Data Collection

For production/staging issues, gather:

  • Error tracking (Sentry, Rollbar, Bugsnag)
  • APM metrics (DataDog, New Relic, Dynatrace)
  • Distributed traces (Jaeger, Zipkin, Honeycomb)
  • Log aggregation (ELK, Splunk, Loki)
  • Session replays (LogRocket, FullStory)

Query for:

  • Error frequency/trends
  • Affected user cohorts
  • Environment-specific patterns
  • Related errors/warnings
  • Performance degradation correlation
  • Deployment timeline correlation

3. Hypothesis Generation

For each hypothesis include:

  • Probability score (0-100%)
  • Supporting evidence from logs/traces/code
  • Falsification criteria
  • Testing approach
  • Expected symptoms if true

Common categories:

  • Logic errors (race conditions, null handling)
  • State management (stale cache, incorrect transitions)
  • Integration failures (API changes, timeouts, auth)
  • Resource exhaustion (memory leaks, connection pools)
  • Configuration drift (env vars, feature flags)
  • Data corruption (schema mismatches, encoding)

4. Strategy Selection

Select based on issue characteristics:

Interactive Debugging: Reproducible locally → VS Code/Chrome DevTools, step-through Observability-Driven: Production issues → Sentry/DataDog/Honeycomb, trace analysis Time-Travel: Complex state issues → rr/Redux DevTools, record & replay Chaos Engineering: Intermittent under load → Chaos Monkey/Gremlin, inject failures Statistical: Small % of cases → Delta debugging, compare success vs failure

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

Subscribe to this mod's changes

smart-debug is a command published in the GitHub repository HermeticOrmus/LibreUIUX-Claude-Code (101 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,202 tokens. A static security scan graded it A with 0 findings. It is 95% identical to smart-debug, differing in 36 lines, and is treated as a copy.