researching-codebase
Scannednpx machina-cli add skill chris-hendrix/claudehub/researching-codebase --openclawResearching Codebase
Methodology for investigating and documenting codebases.
Philosophy
- Document, don't evaluate - Describe what exists without suggesting improvements
- Be precise - Always include
file:linereferences for claims - Read thoroughly - Don't skim; understand before explaining
- Ground observations - Every claim should trace to actual code
Research Types
| Type | Purpose | Focus |
|---|---|---|
| Locating | Find where code lives | File paths, directory structure |
| Analyzing | Understand how code works | Data flow, logic, architecture |
| Pattern-finding | Find examples to model after | Similar 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:
| Section | Content |
|---|---|
| Overview | 2-3 sentence summary |
| File Locations | Paths grouped by type (impl, tests, config) |
| Implementation | Key functions with file:line refs |
| Data Flow | How data moves through the system |
| Patterns | Code examples with context |
| Configuration | Config 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
- Step 1: Run Locating to identify candidate files using keywords, naming patterns, or directory conventions
- Step 2: Run Analyzing and Pattern-Finding (in parallel if needed) to map data flow and identify patterns; collect file:line references
- 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