agentleFS
saintdlesaintdle/agentflow/.agents/skills/diagnosing-bugs/SKILL.md

diagnosing-bugs

Skill2 starsChanged 13 days agoApache-2.0View on GitHub

Diagnose reproducible defects, failing tests, regressions, flaky behavior, performance problems, and unexpected runtime results through an evidence-led feedback loop. Use when the user asks to diagnose, debug, investigate, find a root cause, or fix a reported defect. Diagnose without editing unless the request also authorizes a fix.

193 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, loop-me and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 43 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 55 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 58 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 88 projects that use this

  • LesaniSkill

    writing-shape

    Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.

    Also in 56 projects that use this

  • AWSSkill

    wizard

    Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

    Also in 122 projects that use this

  • +1 more from Lesani
  • +2 more from aws

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 180 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the repository provides an AGENTS.md, apply its shared coding discipline: inspect affected code, callers, tests, and shared utilities …

    line 8
  2. Very specific:

    Read repository instructions, relevant domain skills, nearby tests, CONTEXT.md, and applicable ADRs before changing anything.

    line 13
  3. Distinctive:

    Check active Beads state. When a bug bead exists, keep its symptom, reproduction, evidence, and disposition current.

    line 14
  4. Distinctive:

    Before forming a cause theory, create one command that exercises the reported path and can distinguish the exact failure from success.

    line 18
  5. Distinctive:

    Run it and capture the command plus concise observed evidence.

    line 35
  6. Distinctive:

    Write three to five ranked, falsifiable hypotheses.

    line 42
  7. Distinctive:

    Test one variable at a time.

    line 43
  8. Distinctive:

    Run the regression test green, then rerun the original unminimized loop.

    line 54
  9. Distinctive:

    Run affected repository checks.

    line 55
  10. Distinctive:

    Remove all tagged instrumentation and throwaway harnesses unless the user approved keeping them.

    line 59
  11. Distinctive:

    If blocked, return one decision or dependency, evidence tried, available options, recommendation, current branch/check state, and remaining …

    line 62

“Common” is measured: kept by at least 6 in 10 of the 180 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Diagnose Bugs

When the repository provides an AGENTS.md, apply its shared coding discipline: inspect affected code, callers, tests, and shared utilities before changing code; keep authorized fixes complete and focused; and state material assumptions. Ask only questions that could change scope, correctness, or authority.

Establish authority and context

  1. Determine whether the request authorizes diagnosis only or diagnosis plus a fix. Do not edit product code for a diagnosis-only request.
  2. Read repository instructions, relevant domain skills, nearby tests, CONTEXT.md, and applicable ADRs before changing anything.
  3. Check active Beads state. When a bug bead exists, keep its symptom, reproduction, evidence, and disposition current. Store distilled facts and artifact paths, not raw logs or transcripts.

Build the feedback loop

Before forming a cause theory, create one command that exercises the reported path and can distinguish the exact failure from success.

Prefer, in order:

  1. An existing focused unit, integration, or end-to-end test.
  2. A minimal CLI, API, browser, or fixture-driven reproduction.
  3. A deterministic replay, differential comparison, or benchmark.
  4. A bounded stress loop for intermittent behavior.
  5. A temporary harness around the narrowest real interface.

The loop must be:

  • Red-capable: it detects the user's symptom, not merely a nearby error.
  • Repeatable: repeated runs produce a trustworthy verdict; for flaky defects, record the reproduction rate.
  • Focused: unrelated setup and noise are removed.
  • Agent-runnable: it can run unattended within the authorized environment.

Run it and capture the command plus concise observed evidence. If no trustworthy loop can be built, stop with the missing environment, artifact, access, or user action needed. Do not replace reproduction with speculation.

Evidence from one lane does not prove another. A settings API response or component receipt is not executable readiness. A fix for a hosted-runtime or architecture-specific failure passes its acceptance row only with acceptance set --evidence-lane <lane> after a run in that environment. A whole-chain row needs --evidence-scope whole-chain. While the environment is unavailable, report the row as planned or blocked.

Minimize and explain

  1. Reduce the input, configuration, callers, and environment while preserving the failure.
  2. Write three to five ranked, falsifiable hypotheses. For each, state the observation that would support or refute it.
  3. Test one variable at a time. Prefer debuggers, traces, profilers, and narrow boundary logging over broad log collection.
  4. Mark temporary instrumentation with a unique searchable tag.
  5. Identify the root cause only when evidence rules in one explanation and rules out credible alternatives.

For diagnosis-only work, stop here and return the cause, evidence, impact, and smallest recommended correction. Clearly label anything still unverified.

Fix when authorized

  1. Choose a regression-test seam that observes public behavior and represents the real failure. If no sound seam exists, document that architectural limitation instead of adding a misleading test.
  2. Convert the minimized reproduction into a failing test and run it red.
  3. Make the smallest correction that addresses the established cause. Do not bundle opportunistic refactors.
  4. Run the regression test green, then rerun the original unminimized loop.
  5. Run affected repository checks.

Clean up and return

  • Remove all tagged instrumentation and throwaway harnesses unless the user approved keeping them.
  • Record the correct hypothesis and evidence in the bead, commit, or PR.
  • Report: outcome; diagnosis or fix; reproduction command; root-cause evidence; changed files and commit when applicable; checks; residual risks; and untested lanes.
  • If blocked, return one decision or dependency, evidence tried, available options, recommendation, current branch/check state, and remaining risk.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.