debugging

A systematic method for investigating errors, failed tests and unexpected software behavior by finding the underlying cause before changing code.

In plain words
What is it for?
Use it to diagnose bugs, test failures and persistent problems, then document the cause, code fix, testing approach and prevention steps.
Why use it?
It helps avoid fixes that only hide symptoms and fail again later. The process uses error details, repeatable reproduction, recent changes and evidence from the system.

Skill for Claude CodeCodex

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 skills/griddynamics/rosetta/debugging
Any agent
npx skills add griddynamics/rosetta --skill debugging
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

Made for: Claude Code, Codex.

Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 750 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.00019 $0.00750
Opus 5 $0.00010 $0.00375
Sonnet 5 $0.00004 $0.00150
Haiku 4.5 $0.00002 $0.00075

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

Security

Grade A, and why

debugging 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.

instructions/r2/core/skills/debugging/SKILL.md · 107 lines

What it actually says

Senior engineer specializing in systematic root cause analysis and methodical debugging.

<when_to_use_skill> Use when encountering errors, test failures, unexpected behavior, or when a previous fix failed and the issue persists. Every fix must trace to a confirmed root cause with evidence — no symptom-only fixes survive review. </when_to_use_skill>

<core_concepts>

  • All Rosetta prep steps MUST be FULLY completed, load-context skill loaded and fully executed
  • ALWAYS find root cause before attempting fixes; symptom fixes are failure
  • Make implicit become explicit — incorrect assumptions hide root causes
  • Execute phases sequentially

For each issue provide:

  • OODA
  • Root cause explanation with supporting evidence
  • Specific code fix
  • Testing approach
  • Prevention recommendations

</core_concepts>

<root_cause_investigation phase="1">

BEFORE attempting ANY fix:

  1. Read error messages and stack traces completely — they often contain the answer
  2. Reproduce consistently — if not reproducible, gather more data, don't guess
  3. Check recent changes — git diff, new dependencies, config changes
  4. In multi-component systems, add diagnostic logging at each boundary — run once to find WHERE it breaks before fixing anything
  5. Trace data flow backward — where does the bad value originate? Fix at source, not symptom
  6. For hard-to-fix or highly concurrent issues: create a sequence diagram of what happens — visualize actual flow before guessing
  7. Temporarily enable tracing in code and logs — review actual execution vs assumed execution, then remove tracing

</root_cause_investigation>

<pattern_analysis phase="2">

  1. Find similar working code in the same codebase
  2. Compare working vs broken — list every difference, however small
  3. If implementing a known pattern, read the reference completely — don't skim

</pattern_analysis>

<hypothesis_and_testing phase="3">

  1. State one clear hypothesis: "X is the root cause because Y"
  2. Make the smallest possible change to test it — one variable at a time
  3. If it fails, form a new hypothesis — don't stack fixes

</hypothesis_and_testing>

  1. Create a failing test that reproduces the bug
  2. Implement a single fix targeting the root cause
  3. Verify: test passes, no regressions, issue resolved
  4. If 3+ fixes have failed: stop fixing and question the architecture — this likely isn't a bug, it's a design problem. Is third-party involved? Discuss before continuing.

<validation_checklist>

  • Root cause identified with evidence before any fix attempted
  • Sequence diagram created for concurrent or hard-to-fix issues
  • Temporary tracing removed after investigation
  • Fix targets root cause, not symptom
  • Failing test reproduces the bug
  • No regressions introduced
  • Prevention recommendation documented

</validation_checklist>

<best_practices>

  • One hypothesis, one change at a time
  • Check recent changes early in investigation
  • Use diagnostic logging at component boundaries

</best_practices>

  • Attempting fixes before tracing the root cause
  • Stacking multiple fixes without validating each
  • Each fix reveals a new problem elsewhere — likely a design issue, not a bug
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 · 107 lines · 19 tokens per session scan A ca9db4fdb4a5

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository griddynamics/rosetta (341 stars, last pushed 3d ago), licensed Apache-2.0. It adds 19 tokens to every session and 750 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.

Related

Other skills, from other repositories

unity-mcp-orchestrator

Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for…

CoplayDev/unity-mcp · 72 tokens

fetch-url

Fetch a single URL and convert its content to Markdown. Use when you need to read a web page, documentation page, or API reference without indexing it. The content is returned as plain Markdown text on stdout.

arabold/docs-mcp-server · 45 tokens

signing-entitlements

Inspect signing, entitlements, hardened runtime, and Gatekeeper issues for macOS apps. Use when asked to diagnose code signing failures, missing entitlements, sandbox problems, notarization prerequisites, or trust-policy launch errors.

robinebers/openusage · 49 tokens

macos-swiftpm

Build, run, and test SwiftPM macOS packages and executables. Use when the repo is package-first or has no Xcode project.

robinebers/openusage · 35 tokens

macos-test-triage

Triage macOS tests across Xcode and SwiftPM. Use when narrowing failures, explaining assertions or crashes, or separating setup from regressions.

robinebers/openusage · 36 tokens

fix-codesign-error

Slash command that inspects a macOS signing or entitlement failure and explains the minimum fix path. Invoke explicitly with /fix-codesign-error — this skill never self-triggers.

robinebers/openusage · 42 tokens