moth-debug-first-fix

moth-debug-first-fix is a skill for Claude Code from stfade/moth. It costs 64 tokens per session (338 once invoked), scanned A, original, MIT.

A workflow for investigating a software error before changing code. It covers failed tests, builds, type checks, lint checks, runtime errors, stack traces, and error logs.

In plain words
What is it for?
Use it to capture the failure, identify a likely cause and first fix, apply the change, run verification, and remember the result only when it clearly passed or failed.
Why use it?
It focuses the first fix on the evidence and smallest relevant code area instead of starting with a broad refactor or a guess.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the moth plugin — 3 skills shipped together

Good fit Use it to capture the failure, identify a likely cause and first fix, apply the change, run verification, and remember the result only when it clearly passed or failed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/stfade/moth/moth-debug-first-fix
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.

Any agent
npx skills add stfade/moth --skill moth-debug-first-fix
Clone the repo
git clone --depth 1 https://github.com/stfade/moth

Made for: Claude Code.

Or install moth, the plugin that ships this one along with the rest of its 3 skills.

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 moth-debug-first-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/stfade/moth/moth-debug-first-fix/github.svg)](https://agentmods.dev/skills/stfade/moth/moth-debug-first-fix)
Your own site
<a href="https://agentmods.dev/skills/stfade/moth/moth-debug-first-fix"><img src="https://agentmods.dev/badge/skills/stfade/moth/moth-debug-first-fix/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 moth-debug-first-fix

Your own site · 80×15
<a href="https://agentmods.dev/skills/stfade/moth/moth-debug-first-fix"><img src="https://agentmods.dev/badge/skills/stfade/moth/moth-debug-first-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 338 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.00064 $0.00338
Opus 5.5 $0.00026 $0.00135
Sonnet 5.5 $0.00013 $0.00068
Haiku 4.5 $0.00006 $0.00034

Measured 1mo ago against content hash aa7a6f544bbb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

moth-debug-first-fix 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 1mo 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.

integrations/claude-code/skills/moth-debug-first-fix/SKILL.md · 25 lines

What it actually says

Moth Debug First Fix

Workflow

  1. Capture the exact failing command, error output, package context, and the smallest relevant file excerpts.
  2. Redact secrets before storing, quoting, or sending the error anywhere.
  3. Call analyze_error when available. Treat its likely_cause, best_first_fix, avoid, and confidence as a starting brief, not certainty.
  4. If context is missing, gather only the narrow missing context named by the brief.
  5. Patch the smallest code surface that explains the key error line.
  6. Follow the verified memory lifecycle: analyze_error -> apply/attempt fix -> run verification command -> call remember_fix_result with verification_command and verification_result.
  7. Call remember_fix_result only when a fix/change was actually attempted, the verification command was actually run, and the result is unambiguously passed or failed.

Guardrails

  • Do not start with a broad refactor.
  • Do not scan the whole repository unless the user explicitly asks.
  • Do not treat Moth confidence as proof.
  • Do not call remember_fix_result for suggestions, unapplied changes, skipped changes, missing verification, ambiguous results, or guesses.
  • Do not record full sensitive logs in memory.
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. 1mo ago First seen · 25 lines · 64 tokens per session scan A aa7a6f544bbb

Subscribe to this mod's changes

moth-debug-first-fix is a skill published in the GitHub repository stfade/moth (2 stars, last pushed 5mo ago), licensed MIT. It adds 64 tokens to every session and 338 once invoked, about $0.0003 per session on Opus 5.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-31.

Related

Other skills, from other repositories

report-issue-local

File a bug or feature request against this MCP server's own repo. Use for server-specific issues — tool logic, service integrations, config problems, or domain bugs that aren't caused by the framework.

cyanheads/obsidian-mcp-server · 44 tokens

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — Diagnostics issues first, then errors, failed tool calls, latency, regressions, and low online-eval scores. With the Opik MCP connected it lists the project's agentinsightsissue entities, offers to turn Diagnostics on when the project has it…

comet-ml/opik-mcp · 187 tokens

opik-explain

Root-cause a specific Opik trace, or a pattern across traces, and return a grounded explanation. Uses the hosted Opik MCP when it is connected, and falls back to SDK scripting otherwise. Returns the root cause, the evidence spans as clickable Opik UI links, and one suggested next step. Use for "why did this trace…

comet-ml/opik-mcp · 113 tokens

isuzu-unity-cli

Drive the open Unity Editor from the shell with the isuzu-unity-cli command: console errors, compiling and tests, scenes, GameObjects and components, prefabs, play mode, uGUI clicks, and C# run inside the Editor. SKILL.md gives a command for each common task, so no tool list is needed.

isuzu-shiranui/UnityMCP · 73 tokens

push-notification-tester

Test VoIP push notifications for Telnyx WebRTC iOS (APNs) and Android (FCM) apps. Use when debugging push notification delivery, validating certificate/credential setup, or testing that a device receives VoIP pushes correctly.

team-telnyx/ai · 55 tokens

gh-fix-ci

Use when a user asks to debug or fix failing GitHub PR checks that run in GitHub Actions; use gh to inspect checks and logs, summarize failure context, draft a fix plan, and implement only after explicit approval. Treat external providers (for example Buildkite) as out of scope and report only the details URL.

rojim666/SztuCode · 72 tokens