debugging

A step-by-step method for finding and fixing software problems, including errors, crashes, wrong results, and unexpected behavior.

In plain words
What is it for?
Use it to investigate bugs, stack traces, undefined or null values, failed tests, performance problems, incorrect database results, and change-history questions.
Why use it?
It helps establish the correct system, output, file, and cause before changing code, avoiding fixes aimed at the wrong place.

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

Made for: Claude Code, Codex.

Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,830 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.00063 $0.05830
Opus 5 $0.00032 $0.02915
Sonnet 5 $0.00013 $0.01166
Haiku 4.5 $0.00006 $0.00583

Measured 2d ago against content hash c6a6609eaab1, 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 2d 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.

.agents/skills/debugging/SKILL.md · 732 lines

How it starts

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

Debugging Protocol (v2 -- Friction-Hardened)

Built from 169 real sessions. Addresses 38 "wrong approach" events, 30 "buggy code" events, 17 "misunderstood request" events. Every rule below exists because it was violated in production.

When This Skill Activates

  • "Debug this", "fix this bug", "not working"
  • Error messages, stack traces
  • "Undefined", "null", "crash", "fails"
  • Unexpected behavior
  • Performance issues
  • Database query returning wrong data
  • "Who changed X?" / audit trail questions

STOP-THINK-ACT Protocol (MANDATORY -- Execute Before EVERY Action)

Origin: 38 sessions had "wrong approach" friction -- Claude jumped to the wrong tool, wrong file, or wrong strategy before understanding context. This protocol is non-negotiable.

STOP -- Before writing code, running commands, or choosing an approach:

Check Question If Unclear
System Which system/environment is this? Local app? Remote server? Database? ASK the user. Never assume.
Output format What format does the user want? SQL? Code fix? Plan document? Working code? ASK if ambiguous.
Target file Am I editing the right file? Local vs remote? Config vs code? Is there a secondary config file? Verify path before editing.
Database Which database connection? Which server? Confirm before querying.
Branch/Env Am I on the right branch? Right environment? Check with git branch or ask.

THINK -- Before stating conclusions:

Check Question Violation Example
Evidence Do I have concrete evidence? Saying "User X broke this" without a git blame diff
Schema Have I verified actual schemas via MCP? Assuming a column TransactionDate exists when it's actually TRANSDATE
Scope Am I about to explore when I should execute, or code when asked for a plan? Spending 45 minutes reading files when user wants a one-line fix
Attribution Am I about to blame someone/something without proof? "This was probably caused by the last deployment" -- prove it

Read the full file on GitHub · 732 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. 2d ago First seen · 732 lines · 63 tokens per session scan A c6a6609eaab1

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository abdullah1854/MCPGateway (15 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 5,830 once invoked, about $0.0003 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

xcodebuildmcp-structured-output-review

Use when reviewing XcodeBuildMCP structured output schema changes, schema versioning, manifest outputSchema metadata, and JSON fixture compatibility.

getsentry/XcodeBuildMCP · 37 tokens

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — errors, failed tool calls, latency, regressions, and low online-eval scores — plus Diagnostics issues. Reads live/production traces via the SDK (searchtraces and agentinsights) and works with no MCP; uses the MCP issue entity when connected.…

comet-ml/opik-mcp · 147 tokens

cortex-automate

Set up automation — prospective memory triggers, neuro-symbolic rules, and CLAUDE.md sync. Use when the user says 'remind me when', 'trigger when', 'create a rule', 'auto-remember', 'sync to CLAUDE.md', 'push insights', 'set up trigger', 'when I open this file', 'when this keyword appears', or when you want to…

cdeust/Cortex · 93 tokens

tabnexus-mcp-evals

Generate, validate, and run isolated Codex-to-TabNexus MCP evaluations with a curated 600-query dataset, executable gold tool labels, safety checks, and best-of-three stability scoring. Use when testing TabNexus MCP tool coverage, Agent behavior, regression quality, destructive-action safety, prompt changes, or a…

KaichenCurry/TabNexus · 75 tokens

compare

Structured comparison of 2+ alternatives with consistent criteria and decision matrix.

n24q02m/wet-mcp · 15 tokens

maya-shot-export

Pipeline stage — shot-level export: frame ranges, cameras, FBX / Alembic packaging for editorial. Use when packaging shot data for downstream departments. Not for full pipeline publish (maya-pipeline) or scene assembly (maya-scene-assembly).

dcc-mcp/dcc-mcp-maya · 60 tokens