agentleFS
TrecekTrecek/useful-claude-skills/.claude/skills/investigate/SKILL.md

investigate

Skill1 starsChanged 8 months agoMITView on GitHub

Deep investigation of errors, bugs, or codebase questions without making any code changes. Use when user mentions investigate, understand, explore, analyze, or pastes error tracebacks. Spawns parallel subagents for comprehensive exploration.

74 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use qa-only, document-release 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.
  • AICreator-WindSkill

    qa-only

    纯 QA 报告工具。只生成 bug 报告,不修复。

    Also in 10 projects that use this

  • AICreator-WindSkill

    document-release

    技术作家工具。更新项目文档。

    Also in 9 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 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 7 projects that use this

  • Kit4SomeSkill

    unfreeze

    Also in 8 projects that use this

  • CodeWithBehnamSkill

    setup-browser-cookies

    Import cookies from your real browser (Comet, Chrome, Arc, Brave, Edge) into the headless browse session. Opens an interactive picker UI where you select which cookie domains to import. Use before QA testing authenticated pages.

    Also in 7 projects that use this

  • +4 more from AICreator-Wind
  • +1 more from ayuday

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 12 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 64 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create files outside temp/investigate/ directory

    line 31
  2. Distinctive:

    Use subagents for parallel exploration

    line 35
  3. Very specific:

    Write findings as a markdown report with unique name to temp/investigate/ directory

    line 36
  4. Distinctive:

    Check for similar existing patterns in codebase

    line 38
  5. Distinctive:

    Ensure approaches, solutions, and fixes are the appropriate long-term solutions with proper architecture

    line 39
  6. Distinctive:

    Search for similar code elsewhere

    line 75
  7. Distinctive:

    Read relevant architecture.md files

    line 80
  8. Distinctive:

    Check for documented constraints

    line 82
  9. Distinctive:

    Search for error messages in external sources

    line 85
  10. Distinctive:

    Look up known issues in libraries/frameworks

    line 86
  11. Distinctive:

    Check GitHub issues for similar problems

    line 88
  12. Distinctive:

    Search for Stack Overflow discussions

    line 89
  13. Distinctive:

    After subagents complete, consolidate into structured findings:

    line 93
  14. Very specific:

    Write findings to: temp/investigate/investigation_{topic}_{date}.md

    line 106
  15. Distinctive:

    Use this template for each Explore subagent:

    line 144

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

Investigation Skill

Perform deep codebase investigation without making any changes. This skill uses parallel subagents to explore multiple aspects simultaneously.

When to Use

  • User pastes an error traceback and wants root cause analysis
  • User wants to understand how a system/module works
  • User asks "how did tests miss this" or similar
  • User says "investigate", "explore", "understand", or "analyze"
  • User explicitly says "do not change any code"

Critical Constraints

NEVER:

  • Modify any source code files
  • Suggest backward compatibility solutions
  • Suggest fallbacks that hide errors
  • Create files outside temp/investigate/ directory
  • Choose or accept approaches, solutions, and/or fixes that are chosen simply because they are easier

ALWAYS:

  • Use subagents for parallel exploration
  • Write findings as a markdown report with unique name to temp/investigate/ directory
  • Identify how tests missed the issue (if applicable)
  • Check for similar existing patterns in codebase
  • Ensure approaches, solutions, and fixes are the appropriate long-term solutions with proper architecture

Investigation Workflow

Step 1: Parse the Investigation Target

Identify what needs investigation:

  • Error Investigation: Extract error type, message, and stack trace
  • Module Investigation: Identify the module/component to understand
  • Question Investigation: Clarify the specific question being asked

Step 2: Launch Parallel Subagents

Spawn explore subagents to investigate different aspects simultaneously (some aspects may and should require multiple subagents):

Core Implementation

  • Find the primary source files
  • Understand the main logic flow
  • Identify key functions/classes

Dependencies & Consumers

  • What depends on this code?
  • What does this code depend on?
  • Map the dependency graph

Test Coverage

  • Find all tests for this code
  • Identify what scenarios are tested
  • Find gaps in test coverage

Error Context (if error investigation)

  • Trace the error through the stack
  • Find where the bad state originated
  • Identify the root cause

Similar Patterns

  • Search for similar code elsewhere
  • How do other parts handle this?
  • Are there established patterns?

Architecture Context

  • Read relevant architecture.md files
  • Understand design decisions
  • Check for documented constraints

External Research (Web Search)

  • Search for error messages in external sources
  • Look up known issues in libraries/frameworks
  • Find documentation for relevant APIs
  • Check GitHub issues for similar problems
  • Search for Stack Overflow discussions

Step 3: Synthesize Findings

After subagents complete, consolidate into structured findings:

  1. Summary: One paragraph overview
  2. Root Cause (if error): The actual source of the problem
  3. Affected Components: List of files/modules involved
  4. Data Flow: How data moves through the system
  5. Test Gap Analysis: Why tests didn't catch this
  6. Similar Patterns: How similar issues are handled elsewhere
  7. External Research: Relevant findings from web search (if applicable)
  8. Recommendations: Suggested approaches (NOT implementations)

Step 4: Write Report

Write findings to: temp/investigate/investigation_{topic}_{date}.md

Report structure:

# Investigation: {Topic}

**Date:** {YYYY-MM-DD}
**Scope:** {What was investigated}

## Summary
{One paragraph overview}

## Root Cause
{If error investigation - the actual source}

## Affected Components
- {file1}: {role}
- {file2}: {role}

## Data Flow
{How data moves through the system}

## Test Gap Analysis
{Why existing tests didn't catch this}

## Similar Patterns
{How similar scenarios are handled elsewhere}

## External Research
{Relevant findings from web search - library bugs, known issues, documentation insights}
{Include source URLs for reference}

## Recommendations
{Suggested approaches - NOT code changes}

Subagent Prompt Template

Use this template for each Explore subagent:

Investigate {specific aspect} of {target}.

Focus on:
1. {Specific question 1}
2. {Specific question 2}
3. {Specific question 3}

This is a research task - DO NOT modify any code.
Report your findings in a structured format.

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.