agentleFS
GusevV1987GusevV1987/ai-workspace-kit/skills/investigate/SKILL.md

investigate

Skill2 starsChanged 8 months agoMITView on GitHub

Use when something breaks or behaves unexpectedly — diagnose with evidence before fixing, sized to the problem: a short path for a small confirmed cause, full root-cause analysis for an unknown one.

128 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pair-agent, plan-devex-review 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.
  • seek888Skill

    pair-agent

    Pair a remote AI agent with your browser. One command generates a setup key and prints instructions the other agent can follow to connect. Works with OpenClaw, Hermes, Codex, Cursor, or any agent that can make HTTP requests. The remote agent gets its own tab with scoped access (read+write by default, admin on request). Use when asked to "pair agent", "connect agent", "share browser", "remote browser", "let another agent use my browser", or "give browser access". (gstack) Voice triggers (speech-to-text aliases): "pair agent", "connect agent", "share my browser", "remote browser access".

    Also in 10 projects that use this

  • seek888Skill

    plan-devex-review

    Interactive developer experience plan review. Explores developer personas, benchmarks against competitors, designs magical moments, and traces friction points before scoring. Three modes: DX EXPANSION (competitive advantage), DX POLISH (bulletproof every touchpoint), DX TRIAGE (critical gaps only). Use when asked to "DX review", "developer experience audit", "devex review", or "API design review". Proactively suggest when the user has a plan for developer-facing products (APIs, CLIs, SDKs, libraries, platforms, docs). (gstack) Voice triggers (speech-to-text aliases): "dx review", "developer experience review", "devex review", "devex audit", "API design review", "onboarding review".

    Also in 13 projects that use this

  • ShreyRaviSkill

    landing-report

    Read-only queue dashboard for workspace-aware ship. Shows which VERSION slots are currently claimed by open PRs, which sibling Conductor workspaces have WIP work likely to ship soon, and what slot /ship would pick next. No mutations — just a snapshot. Use when asked to "landing report", "what's in the queue", "show me open PRs", or "which version do I claim next". (gstack)

    Also in 7 projects that use this

  • ayudaySkill

    setup-deploy

    Configure deployment settings for /land-and-deploy. Detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom), production URL, health check endpoints, and deploy status commands. Writes the configuration to CLAUDE.md so all future deploys are automatic. Use when: "setup deploy", "configure deployment", "set up land-and-deploy", "how do I deploy with gstack", "add deploy config".

    Also in 14 projects that use this

  • ayudaySkill

    cso

    Chief Security Officer mode. Performs OWASP Top 10 audit, STRIDE threat modeling, attack surface analysis, auth flow verification, secret detection, dependency CVE scanning, supply chain risk assessment, and data classification review. Use when: "security audit", "threat model", "pentest review", "OWASP", "CSO review".

    Also in 17 projects that use this

  • ramybarsoumSkill

    document-release

    Post-ship documentation update. Reads all project docs, cross-references the diff, updates README/ARCHITECTURE/CONTRIBUTING/CLAUDE.md to match what shipped, polishes CHANGELOG voice, cleans up TODOS, and optionally bumps VERSION. Use when asked to "update the docs", "sync documentation", or "post-ship docs". Proactively suggest after a PR is merged or code is shipped.

    Also in 18 projects that use this

  • +1 more from seek888

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 115 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you haven't figured out WHY the bug exists, you are not ready to fix it.

    line 16
  2. Distinctive:

    Use this ESPECIALLY when you feel rushed or when the fix seems "obvious." Obvious fixes often mask deeper problems.

    line 29
  3. Distinctive:

    Cause unknown, intermittent, or recurring: use the 5 phases below.

    line 37
  4. Distinctive:

    Never guess at access: Do not switch accounts, reset credentials, widen permissions, delete user data, or change production settings to see …

    line 38
  5. Distinctive:

    Before touching any code:

    line 46
  6. Distinctive:

    If you have tried 3 or more hypotheses and none confirmed:

    line 96
  7. Distinctive:

    STOP: Do not attempt hypothesis number 4.

    line 98
  8. Distinctive:

    Should you rewrite this part instead of patching it?

    line 103
  9. Distinctive:

    If you catch yourself thinking any of these, go back to Phase 1:

    line 108

“Common” is measured: kept by at least 6 in 10 of the 115 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

Investigate

The Iron Rule

No fixes without root cause investigation first.

Investigate first, fix second. No random attempts. No guessing.

If you haven't figured out WHY the bug exists, you are not ready to fix it.

Size the investigation to the problem: a small cause you have already confirmed counts as found (see "Size It to the Problem").

When to Use

Any time something breaks, behaves unexpectedly, or produces errors:

  • Test failures
  • Crashes or error messages
  • Wrong output or unexpected behavior
  • Performance issues
  • Build or deployment failures

Use this ESPECIALLY when you feel rushed or when the fix seems "obvious." Obvious fixes often mask deeper problems.

Size It to the Problem

Fit the investigation to the problem. "Seems obvious" is not the same as confirmed.

  • Small cause, already confirmed (you can reproduce the problem and point to the exact cause): take the short path. State the cause and its evidence. Where a meaningful automated test can show the bug, see it fail for the right reason before the fix; a failing test or check you already have counts (see tdd). Where none applies, such as a formatting or configuration fix, say so. Then make the smallest fix and rerun the original scenario, the checks covering the change, and every check the project requires.
  • Cause unknown, intermittent, or recurring: use the 5 phases below.
  • Never guess at access. Do not switch accounts, reset credentials, widen permissions, delete user data, or change production settings to see whether a problem goes away. If the evidence points there, stop and bring it to the owner.

The 5 Phases

For an unknown cause, complete each phase before moving to the next.

Phase 1: Root Cause Investigation

Before touching any code:

  1. Read the error carefully -- full message, file paths, line numbers. Errors often tell you exactly what went wrong.
  2. Check known gotchas -- search MEMORY.md for similar error messages or patterns. Many bugs are repeat offenders. A 30-second search can save 30 minutes of debugging.
  3. Reproduce it -- can you trigger the bug reliably? What are the exact steps? If you cannot reproduce it, gather more data instead of guessing.
  4. Check what changed recently -- new code, updated settings, changed dependencies, different environment. Something changed; find what.
  5. Trace the data flow -- where does the bad value come from? Follow it backward through the system until you find the source.

Output: a specific, testable claim about what's wrong and why.

Phase 2: Pattern Analysis

  1. Find working examples -- locate similar code in the same project that works correctly.
  2. Compare working vs. broken -- list every difference, no matter how small. Do not assume anything is irrelevant.
  3. Check dependencies -- what settings, services, or components does the broken part rely on? Are they all working?
  4. Match against known signatures:
PatternSignature
Race conditionIntermittent, timing-dependent
Nil/null propagationTypeError, "undefined is not a function"
State corruptionInconsistent or partial data
Integration failureTimeouts, unexpected responses
Configuration driftWorks locally, breaks in production
Stale cacheOld data, clears on refresh
Permission/ownershipEACCES, "permission denied"

Phase 3: Form Hypothesis

  1. State your theory clearly -- "I believe the bug is caused by X because of evidence Y."
  2. Confirm with logs/assertions BEFORE writing any fix -- prove the hypothesis with evidence, not with a code change.
  3. Test one thing at a time -- make the smallest possible change to confirm or reject your theory.
  4. If wrong, form a new hypothesis -- do not pile fixes on top of each other. One change, one test, one conclusion.

Phase 4: Implement Targeted Fix

  1. Write a test that exposes the bug (when possible) -- proves the fix works and prevents the bug from returning.
  2. Fix the root cause, not the symptom -- one change, directly addressing what you identified.
  3. Minimal diff -- fewest files and lines possible. If the fix touches more than 5 files, flag the blast radius before proceeding.
  4. Write a regression test that fails without the fix and passes with it.

Phase 5: Verify and Record

  1. Reproduce the original scenario -- confirm the bug is gone.
  2. Run the checks the change calls for -- the tests covering the changed behavior, plus every check the project requires. Run the full suite when the change is broad or touches shared code.
  3. Pass on the lesson -- if the bug was non-obvious, return it as a gotcha to the designated closer. Only the closer records shared notes, under the close rules.
  4. Never say "this should fix it" -- prove it with test output.

The 3-Strike Rule

If you have tried 3 or more hypotheses and none confirmed:

STOP. Do not attempt hypothesis number 4.

This signals an architectural issue, not a simple bug. Step back entirely:

  • Is the overall design flawed?
  • Are you fixing symptoms while the real problem is structural?
  • Should you rewrite this part instead of patching it?
  • Escalate to the user with what you know so far.

Red Flags -- Stop and Restart Investigation

If you catch yourself thinking any of these, go back to Phase 1:

  • "Let me just try this quick fix"
  • "It's probably X, let me change it and see"
  • "I'll investigate later, let me patch it for now"
  • "I don't fully understand it, but this might work"
  • "Let me change multiple things and run it again"

Guessing is not debugging.

Quick Reference

PhaseWhat to doDone when
1. Root Cause InvestigationRead errors, check gotchas, reproduce, check changes, trace dataYou have a specific testable claim
2. Pattern AnalysisCompare working vs. broken, match known signatures, check depsYou know WHERE it differs
3. Form HypothesisState theory, confirm with evidence before codingYou know WHY it happens
4. Targeted FixWrite test, fix root cause, minimal diffBug is gone, nothing else broke
5. Verify and RecordReproduce, run the checks that fit, pass the gotcha to the closerProven fixed with evidence

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.