Get the FREE Ultimate OpenClaw Setup Guide →

researching-codebase

Scanned
npx machina-cli add skill chris-hendrix/claudehub/researching-codebase --openclaw
Files (1)
SKILL.md
2.4 KB

Researching Codebase

Methodology for investigating and documenting codebases.

Philosophy

  • Document, don't evaluate - Describe what exists without suggesting improvements
  • Be precise - Always include file:line references for claims
  • Read thoroughly - Don't skim; understand before explaining
  • Ground observations - Every claim should trace to actual code

Research Types

TypePurposeFocus
LocatingFind where code livesFile paths, directory structure
AnalyzingUnderstand how code worksData flow, logic, architecture
Pattern-findingFind examples to model afterSimilar implementations, conventions

Choose the appropriate type based on what's needed. They can be combined. When multiple research types are needed, always run them in parallel via separate Task calls.

Locating

Find files without analyzing contents:

  • Search by keywords, naming patterns, directory conventions
  • Group findings by purpose (implementation, tests, config, types)
  • Note directory clusters and naming patterns

Analyzing

Trace how code actually works:

  • Start from entry points, follow the code path
  • Map data flow and transformations
  • Identify architectural patterns and integration points
  • Document error handling and configuration

Pattern-Finding

Find existing implementations to reference:

  • Search for similar features or structures
  • Extract concrete code examples with context
  • Show multiple variations when they exist
  • Include test patterns

Output Structure

Structure findings by purpose. Common sections:

SectionContent
Overview2-3 sentence summary
File LocationsPaths grouped by type (impl, tests, config)
ImplementationKey functions with file:line refs
Data FlowHow data moves through the system
PatternsCode examples with context
ConfigurationConfig files, env vars, feature flags

Include sections relevant to the research type. Always include file:line references.

Source

git clone https://github.com/chris-hendrix/claudehub/blob/main/plugins/rpi/skills/researching-codebase/SKILL.mdView on GitHub

Overview

The Researching Codebase skill provides a disciplined approach to understanding a codebase: locating files, analyzing how code behaves, and pattern-finding common implementations. It emphasizes documenting discoveries with file:line references and organizing findings into clearly labeled sections for easy reference.

How This Skill Works

Uses three research types—Locating, Analyzing, and Pattern-Finding—often in parallel when multiple types are needed. Start from entry points, map data flow, identify architectural patterns, and document error handling and configuration. Outputs are structured with sections like Overview, File Locations, Implementation, Data Flow, Patterns, and Configuration, with every claim tied to a file:line reference.

When to Use It

  • Locate where a feature or function is implemented
  • Understand how a component or feature works by tracing data flow
  • Find concrete examples or patterns to model after
  • Explore directory structure and configuration for a module
  • Document error handling and configuration across the codebase

Quick Start

  1. Step 1: Run Locating to identify candidate files using keywords, naming patterns, or directory conventions
  2. Step 2: Run Analyzing and Pattern-Finding (in parallel if needed) to map data flow and identify patterns; collect file:line references
  3. Step 3: Compile findings into the Output Structure with sections: Overview, File Locations, Implementation, Data Flow, Patterns, and Configuration

Best Practices

  • Document, don't evaluate — describe what exists without suggesting improvements
  • Be precise — always include file:line references for claims
  • Read thoroughly — understand before explaining
  • Structure findings by purpose with sections such as Overview, File Locations, Implementation, Data Flow, Patterns, Configuration
  • If multiple research types are needed, run Locating, Analyzing, and Pattern-Finding in parallel via separate Task calls

Example Use Cases

  • Locate the implementation of a function X and capture file:line references
  • Trace the data flow from input to output within a module and note transformation steps
  • Extract several pattern variations (e.g., similar features) with full context and tests
  • Document error handling paths and configuration flags across components
  • Produce a structured report with Overview, File Locations, Implementation, Data Flow, Patterns, and Configuration

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers