agentleFS
rioX432rioX432/agent-witness/.claude/skills/investigate/SKILL.md

investigate

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

Investigate codebase: trace data flows, map dependencies, assess impact — report only, no implementation

129 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

  • 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

  • GeiserXSkill

    docs-loop

    Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.

    Also in 3 projects that use this

  • +1 more from seek888

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 116 edited versions we read keep these.

  • 4

    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:

    After receiving agent reports:

    line 116
  2. Distinctive:

    Do the findings from different axes contradict each other?

    line 119
  3. Distinctive:

    If gaps remain, launch follow-up Explore agents for specific areas.

    line 121
  4. Very specific:

    Every claim must reference a specific file:line

    line 175
  5. Distinctive:

    If something is unclear, put it in Open Questions — do not guess

    line 177

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

Investigate how something works, trace data flows, map dependencies, and assess impact. Report findings only — no implementation, no proposals.

Use when: "How does X work?", "What would be affected if we change Y?", "Trace the auth flow end-to-end", "What's the current state of module Z?"

Not for: Web research (/think), pre-implementation ambiguity resolution (/dig), finding bugs (/audit)

Process

/investigate <topic>
  │
  Phase 1: Scoping
  │  └─ Define investigation axes and entry points
  │
  Phase 2: Deep Investigation (Explore agents, parallel)
  │  ├─ Code structure & architecture
  │  ├─ Data flow tracing
  │  ├─ Dependency mapping
  │  └─ Test coverage assessment
  │
  Phase 3: Structured Report
  │  ├─ Architecture overview
  │  ├─ Data flow
  │  ├─ Affected files & dependencies
  │  ├─ Existing patterns
  │  ├─ Risks / concerns
  │  └─ Open questions
  │
  ★ Done. No implementation, no proposals.

Phase 1: Scoping

Goal: Define what to investigate and where to start.

  1. Parse $ARGUMENTS:
    • Issue reference (#42, PGR-1234): Fetch issue details, extract keywords and affected areas
    • Feature/module name: Identify entry points via Grep/Glob
    • Free-form question: Extract key terms, identify likely code areas
  2. Decompose into 2-4 investigation axes. Examples:
    • Architecture: Where does this code live? What layer/module?
    • Data flow: How does data enter, transform, and exit?
    • Dependencies: What depends on this? What does this depend on?
    • History: How has this evolved? Recent changes?
  3. Identify entry points for each axis (files, classes, functions)
  4. TaskCreate for each axis to track progress

Phase 2: Deep Investigation

Goal: Thoroughly read and trace relevant code. No speculation.

Launch Explore agents in parallel for each axis:

Agent template

Agent(
  subagent_type: "Explore",
  prompt: "Investigate {axis} for {topic} in this codebase.

  Entry points: {identified files/symbols}

  You MUST:
  1. Read every relevant file — no guessing
  2. Trace calls and data flow through actual code paths
  3. Note public API surfaces and internal boundaries
  4. Check for tests — list what's tested and what's not
  5. List all files involved with their role

  Report: structured findings with file:line references."
)

Investigation checklist

For each axis, the agent must cover:

  • Read the code: Every involved file, not just entry points
  • Trace the flow: Follow function calls, event handlers, data transformations
  • Map boundaries: Module boundaries, public vs internal APIs
  • Check tests: Existing test files, what's covered, what's missing
  • Check history: git log / git blame for recent changes and context

Think Twice

After receiving agent reports:

  1. Did the agents actually read the code, or did they speculate?
  2. Are there code paths or edge cases not covered?
  3. Do the findings from different axes contradict each other?

If gaps remain, launch follow-up Explore agents for specific areas.


Phase 3: Structured Report

Goal: Organize findings into a clear, actionable report.

Present to the user:

## Investigation: {topic}

### Architecture Overview
- Component/module structure relevant to the topic
- Layer boundaries and responsibilities
- Key abstractions and interfaces

### Data Flow
- Entry point → processing → output (with file:line references)
- State management involved
- Side effects (DB writes, API calls, file I/O)

### Affected Files
| File | Role | Lines | Notes |
|------|------|-------|-------|
| `src/...` | Entry point | 45-120 | Handles X |
| `src/...` | Data layer | 10-80 | Queries Y |

### Dependencies
- **Upstream** (what calls this): [list with file:line]
- **Downstream** (what this calls): [list with file:line]
- **External** (libraries, APIs, services): [list]

### Existing Patterns
- How similar features are implemented in this codebase
- Conventions observed (naming, error handling, testing)

### Test Coverage
- Existing tests: [list with file paths]
- Covered scenarios: [list]
- Missing coverage: [list]

### Risks / Concerns
- Potential issues discovered during investigation
- Complexity hotspots
- Missing error handling or edge cases

### Open Questions
- Things that could not be determined from code alone
- Areas that need user clarification

Rules:

  • Every claim must reference a specific file:line
  • Distinguish facts (read from code) from inferences
  • If something is unclear, put it in Open Questions — do not guess

Error Handling

SituationAction
Issue not foundReport error, ask for clarification
Entry points unclearGrep broadly, ask user if ambiguous
Agent returns shallow resultsRe-launch with more specific prompts
Codebase too large for full traceScope down, report what was covered and what was skipped

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.