diagnosing-bugs logo

diagnosing-bugs

Agent Skill

Use this skill when a user reports a difficult bug, failure, or performance regression. It guides a coding agent through building a bug-specific feedback loop, reproducing and minimizing the case, testing ranked hypotheses, and verifying a fix.

Bug diagnosisPerformance regression investigationReproduction and regression testing

Last reviewed: · Source pinned to commit 5863806

  • Official. Written and maintained by the company or project behind the service the skill works with, so usually kept in step with it. Not audited by us.

  • Community. Written and maintained by an independent developer or group, not by the company behind the service. The company has not reviewed it, and updates depend on its author.

Maintainer not verified: we have not confirmed who maintains this skill. Treat it like a community skill until you have checked.

About this skill

Diagnosing Bugs is a structured workflow for investigating hard bugs and performance regressions. It starts by building a fast, deterministic pass or fail loop that can detect the user's specific symptom. That loop guides reproduction, hypothesis testing, instrumentation, and verification. Reach for it when a bug is difficult to reproduce or a performance regression needs investigation. The workflow asks the agent to reproduce and minimize the case before proposing causes, then test ranked, falsifiable hypotheses and verify the fix against both a regression test and the original scenario.

What it does

  • Checks for a GLOSSARY.md file and relevant architecture decision records while exploring the codebase.
  • Builds a bug-specific feedback loop, such as a failing test, HTTP script, CLI check, browser script, trace replay, harness, fuzz loop, bisection, or differential test.
  • Tightens the loop for speed, a sharper symptom signal, and determinism. For intermittent bugs, tries to increase the reproduction rate.
  • Runs the loop, confirms it matches the user's reported failure, captures the symptom, and reduces the case one element at a time.
  • Shows the user three to five ranked, falsifiable hypotheses before testing them, then uses targeted probes that change one variable at a time.
  • For performance regressions, establishes a baseline measurement before investigating, and uses bisection rather than relying on logs.
  • Writes a regression test before the fix when a correct test seam exists, applies the fix, and checks that the test and original scenario pass.
  • Removes tagged debug instrumentation and throwaway prototypes, then checks that the original repro no longer occurs. Redacts secrets from shown commands, outputs, and captured artifacts.

Who it's for

  • Developers using coding agents to investigate hard-to-reproduce bugs or failures in a codebase.
  • Developers investigating performance regressions.
  • People who can provide access to a reproducing environment, redacted diagnostic artifacts, or permission for temporary production instrumentation when a feedback loop cannot be built.

How to use it

The skill is triggered when the user asks to diagnose or debug something, or reports that it is broken, throwing, failing, or slow. A person can ask an agent to investigate a hard-to-reproduce bug or performance regression in a codebase.

Example request
Debug a failure that only happens intermittently in this codebase. First build a fast check that catches the exact symptom, then reproduce and minimize it before testing ranked hypotheses. Redact secrets from any diagnostic output you show.

Good to know before you use it

  • Contains runnable script files (scripts/hitl-loop.template.sh); review them before use.
  • The workflow requires a tight, red-capable feedback loop before proceeding to hypotheses.
  • If a loop cannot be built, the agent should stop and request access to a reproducing environment, a redacted captured artifact, or permission for temporary production instrumentation.
  • The regression test should use a correct seam that exercises the bug at its real call site. If no such seam exists, the agent documents that finding.
  • For non-deterministic bugs, the workflow aims to raise the reproduction rate rather than require a clean reproduction.
Before you installA skill's instructions steer your AI agent, so a few minutes of checking is worth it.
Security checklistSix checks before you add a skill to your agent

Skills are not only code. A harmful skill can be written in plain sentences that a code scanner does not flag. Research on public skill registries has found skills with malicious instructions and scripts.

  1. Read the skill itself. A skill is a folder with a SKILL.md file and sometimes scripts. The SKILL.md is not just documentation: it is text your AI agent follows. Read it, and read every script, before you install. Be wary of instructions that do not fit the stated task, such as reading keys or .env files, sending data elsewhere, or fetching code from the internet while it runs.
  2. Look for scripts. A skill that only contains text is far less risky than one that runs scripts on your computer. Check which files the folder contains and what each script does.
  3. Check the source. Make sure the repository belongs to the author or vendor you expect, and beware of lookalike names. Install the exact version (commit) you reviewed, and read changes before you upgrade.
  4. Use the least access that works. Run a new skill in a test project or sandbox first, without your production credentials, and keep your agent’s confirmation prompts switched on for actions that write, delete, send or spend.
  5. Have it scanned. Several tools check skills for known risks before you install: the security audits shown on each skill’s page on skills.sh (from partners such as Snyk and Socket), Snyk’s Skill Inspector, and the open-source Cisco Skill Scanner. Use them as one layer, not as proof.
  6. Ask an AI model to review it, with care. Asking an LLM to read the skill and report anything suspicious before you install it is a useful extra check, and it is what many people do. It is not a guarantee: the reviewer reads text that may have been written to manipulate it, so give it the skill as data to analyse, never let it run anything, and combine it with a scanner and your own reading. A pass is not proof that a skill is safe.

Scanners to try: skills.sh audits, Snyk Skill Inspector and Cisco Skill Scanner (open source).

Who published this skill?Pinned source: mattpocock/skills

The pinned source is the GitHub repository mattpocock/skills. Check that this is the author or company you expect.

Published by the vendor
Written and maintained by the company or project behind the service the skill works with. It is usually kept in step with that service, but this describes who maintains it, not that it has been audited by us.
Community skill
Written and maintained by an independent developer or group, not by the company behind the service it works with. It can be excellent and widely used, but the company has not reviewed it and updates depend on its author, who can stop at any time.
How installing a skill works

A skill is a folder. Your agent finds it in a skills folder: for example, Claude Code reads skills from a skills folder in your project or in your home folder, and other agents have their own location, so check your agent's documentation for the exact place.

In general you either copy the skill folder from its source (at the commit pinned on this page) into that folder, or use your agent's own command for adding skills. After installing, ask your agent to list its skills to confirm it was picked up.

We do not show a ready-made install command for each skill: a command that is copied wrongly or changed is a way to install something else, so take it only from the source itself, after you have read the checklist above.

This page is general information, not security or legal advice, and listing a skill is not an endorsement or a security review. We do not create, host, install or run skills, and listing details can be out of date, so check the source. You use skills at your own risk. See the section on third-party products in our Terms of Service.