Omniscio

OmniscioSkills examplesDebugging

A Claude Code debugging skill you can copy

One complete SKILL.md for the job that eats the most time: working out why something that used to pass now fails. What a skill is and how the folder mechanism works are covered in the skills guide; the rest of this page is the file, where it goes and how to check it loaded.

Checked against Anthropic's documentation on November 25, 2026. By the Omniscio team. Updated .

When this skill fires

Claude matches your request against the description, so it names the words people actually type: an error, a failing test, a crash, something that is broken.

  • On its own when you say "this test is failing", "why is this crashing", "it worked yesterday", "find out why the endpoint returns 500", or paste an error and ask what is going on.
  • Directly when you type /debug-issue, optionally followed by the symptom or the test file: /debug-issue src/cart.test.ts.

Model invocation stays on, so Claude can reach for the skill without you typing the command. It changes no code until it has a reproduced failure, and asking for a diagnosis is exactly the kind of request that should reach it.

The whole skill, ready to copy

Save this as SKILL.md inside a folder named debug-issue. The opening three dashes must be the file's first line, with the frontmatter (the settings block) between them.

---
name: debug-issue
description: Reproduces a failure before changing code, names the mechanism that causes it, fixes the cause, and proves the fix with a test that fails first. Use when the user reports an error, a failing test, a crash, or says something is broken.
argument-hint: [error-text-or-test]
allowed-tools: Read Grep Glob Bash(git log *) Bash(git status *)
---

## What changed recently

!`git log --oneline -15`
!`git status --short`

## Reproduce it first

The arguments name the symptom, the error text or a failing test. If they are empty, ask which failure to investigate before running anything.

Reproduce it yourself: run the failing test, or the smallest command that shows the error. Quote the output you saw. A failure you have not reproduced is a guess, and a guess is not a diagnosis.

## Name the mechanism

Work back from the observed failure to the line that produces it. State the mechanism in one sentence: this input reaches this function, which does this, so this happens. If you cannot state it in one sentence, you have a symptom, not a cause.

Check the recent commits above against the failure before assuming the bug is old. A change that landed this week is the cheapest explanation to confirm or rule out.

## Fix the cause

Write the smallest test that fails for the stated reason. Run it and show the failure output before you change any code. Then fix the cause.

These are not fixes, and are not acceptable as one:

- A catch that swallows the error or logs it and carries on.
- A retry around a call that is broken.
- A special case for the exact input that failed.
- A sleep or a longer timeout that hides a race.

## Prove it

Run the new test again, then the suite that covers the file. Show the failing run and the passing run.

Do not commit. Report, in this order: the command that reproduced it, the mechanism in one sentence, the file and line you changed, and the test that failed before the fix and passes after.

The body is about thirty lines, well inside Anthropic's guidance to keep a SKILL.md under 500. That matters because once a skill loads, its rendered content stays in the conversation for the rest of the session and costs tokens on every later turn.

What each part does

Every field is optional, and only description is recommended. A field name must match the documentation exactly, hyphens included, because Claude Code ignores an unrecognised one without reporting an error.

The four frontmatter fields in this file, and what each one changes.
FieldWhat it does here
name: debug-issueSets the command shown in the / menu. Without it, the folder name becomes the command
descriptionWhat the skill does and when to use it. This is the text Claude matches a request against, so it carries the words a user would say about a failure
argument-hint: [error-text-or-test]The hint shown during autocomplete, after the command name. Use square brackets: the hint displays as typed, so angle brackets would show literally
allowed-tools: Read Grep Glob Bash(git log *) Bash(git status *)Lets Claude read, search and list files without asking during the turn the skill runs, and pre-approves the two injected git commands, which are otherwise permission-checked and can abort the whole invocation. The grant clears on your next message and restricts nothing else
  • The two injected lines are dynamic context: Claude Code runs git log and git status before Claude sees the file and replaces each line with its output. The diagnosis therefore starts with the change history already in front of it.
  • "Quote the output you saw" is what separates a diagnosis from a plausible story. Without it the answer tends to describe what usually causes that error rather than what caused this one.
  • The mechanism sentence is a gate. A fix that cannot be explained in one sentence is a change made in the hope that the failure goes away.
  • The four anti-patterns exist because each of them makes the suite green while leaving the defect in place, and the next reader has no way to tell.
  • "Do not commit" keeps the skill a diagnostician. Committing is a separate decision with its own message.
  • The grant stops at reading and git. Running the failing test executes code, so it still asks for approval once per run; add your own test command to allowed-tools if you would rather not be asked.

Where to put it: personal or project

The same file, two locations, two audiences.
ChoosePathWho gets it
Personal~/.claude/skills/debug-issue/SKILL.mdYou, in every project on this machine, but not Cowork or cloud sessions
Project.claude/skills/debug-issue/SKILL.mdEveryone in this repository once it is committed

If both exist, personal wins: enterprise beats personal and personal beats project, so a home-folder copy runs instead of the repository's. Debugging habits are personal, so the home folder is the better default here unless the team has a house rule about reproducing failures.

Do not name it debug. /debug is one of the bundled skills Claude Code ships, and a skill of your own with that name replaces it.

Claude Code watches both skills directories and takes an added, edited or removed skill within the session, except in bare mode, where the change is not picked up. If a new skill does not appear, run /reload-skills. Live detection covers the SKILL.md text only, so after changing a supporting file, run /reload-skills too.

How to confirm it loads

  1. Look for the command. Type / and find debug-issue, or open the /skills menu, which lists the skills you can run and lets you filter them by name.
  2. Ask the listing question. What skills are available? should name it. If it does not, the folder or the file name is the usual cause: the folder must hold a file called SKILL.md.
  3. Run it directly in a git repository. The answer should refer to your recent commits and uncommitted changes, which is how you know the injection ran.
  4. Then test the automatic route. Break a test on purpose and ask "why is this failing". If the direct route works and this one does not, rewrite the description with the words you used.

For the cost side, /doctor estimates what the skill listing costs and names its biggest contributors, while /skill-doctor reports what each skill costs and how often it is used.

The common failure

This skill can refuse to run at all. Both injected lines are real commands, and a failed injected command aborts the entire invocation rather than just its own line, so Claude never sees the instructions. The error reads Shell command failed for pattern "..." and includes the command's own output.

  • Not a git repository. Run it in a folder with no repository and git log exits non-zero, which aborts the skill. Start Claude Code inside the repository, or delete the two injected lines.
  • A repository with no commits. git log fails on an empty repository too. Replace the line with !`git log --oneline -15 || true`, which injects nothing and lets the skill load.
  • A permission rule blocks it. Injected commands never prompt while the skill renders. Outside auto mode, Claude Code checks each one against your permission rules and aborts on anything that is not an allow, unless the command is pre-approved in allowed-tools; a deny or an ask rule still aborts even then. That is what the Bash(git log *) and Bash(git status *) entries are for. In auto mode it loads with an instruction to run the command first instead.
  • It fires on requests that are not bugs. "How does this function work" is not a debugging request. If Claude keeps reaching for the skill, make the description narrower or set disable-model-invocation: true.

One silent trap sits above all of these: if the opening three dashes are not the file's first line, the frontmatter is treated as body text. With no description field, Claude falls back to the first non-empty line, which is now the literal ---, so the skill still runs when named and effectively never fires on its own.

Where this fits

If the investigation should happen away from your conversation, in a new isolated context, that is a subagent — or this same skill with context: fork in its frontmatter — rather than a skill that runs in your own session, and the debugger subagent is that shape. This page is the version you own: instructions in your own session, with the change history injected before Claude reads them.

More copyable examples, including a review checklist and a test writer, are in the skills examples library. What a skill is, every load location and the full frontmatter reference is the Claude Code skills guide.

Where these answers come from

  • Extend Claude with skills, read November 25, 2026: the folder and file, the frontmatter fields used here, allowed-tools, dynamic context and its permission checks, where skills load, live change detection, the content lifecycle and the troubleshooting order.
  • When an injected command fails: why one failed command aborts the whole invocation, and which exit codes count as a failure.
  • The changelog: release 2.1.332, dated November 25, 2026, the newest listed on the day this page was checked.

Common questions

Is this the same as the built-in /debug skill?

No. /debug ships with Claude Code; this is a skill you own, with your own reproduction rule and your own list of fixes you refuse to accept.

Why does it need git?

The two injected lines put your recent commits and your uncommitted changes in front of Claude before it starts, which is usually the cheapest explanation of a regression. If the project is not a repository, delete those lines and the rest of the skill works unchanged.

Can it run the whole test suite?

It can, but the body asks for the failing test and the suite that covers the changed file, not everything. A full suite on a large repository takes minutes and tells you nothing the narrower run did not.

Why does it refuse to commit?

Because a diagnosis and a commit are two decisions. Read the report first; if the change is what you want, ask for the commit as a separate request, ideally through the commit message skill.