explore-codebase

Perform in-depth codebase exploration at the start of a coding session. Builds comprehensive understanding of project structure, architecture, key components, and patterns.

⭐2stars🔀1forks📁View on GitHub🕐Updated Jan 10, 2026

When & Why to Use This Skill

The Codebase Exploration skill is an essential developer tool designed to automate the process of understanding complex software projects. It performs a systematic analysis of project structures, architectural patterns, and core components to build a comprehensive mental model of the codebase. By identifying key files, dependencies, and design conventions, it provides the necessary context to ensure that subsequent coding tasks are accurate, consistent with existing patterns, and architecturally sound.

Use Cases

  • Developer Onboarding: Rapidly familiarize yourself with an unfamiliar repository by generating a structured overview of its purpose, architecture, and key files.
  • Session Context Initialization: Use at the start of a new coding session to refresh context and ensure a deep understanding of the project's current state before making changes.
  • Legacy Code Analysis: Systematically explore and document the communication patterns and data models within complex or undocumented legacy systems.
  • Pre-Refactoring Research: Identify dependencies and 'areas of concern' to assess the impact of structural changes before initiating a major refactor.
  • Architectural Auditing: Verify if the current implementation aligns with intended design patterns and naming conventions across the entire codebase.
nameexploring-codebase
description>-

Codebase Exploration

Performs thorough codebase exploration to build deep understanding before coding work begins.


Exploration Approach

Use the Task tool with subagent_type: Explore to investigate the codebase. Focus on understanding:

  1. Project purpose and structure - README, documentation, directory layout
  2. Architecture - Main components, how they interact, communication patterns
  3. Core code - Key classes, data models, utilities
  4. Configuration - How the project is configured and customized
  5. Dependencies - External libraries and integrations
  6. Patterns and conventions - Coding style, naming conventions, design patterns

Adapt exploration depth based on project size and complexity. For small projects, a quick overview suffices. For large projects, explore systematically.


Guiding Questions

Answer these questions during exploration:

Architecture

  • What is the main entry point or controller?
  • How do components communicate (IPC, APIs, events)?
  • What external systems does this integrate with?

Patterns

  • What naming conventions are used?
  • What design patterns appear (factories, dataclasses, protocols)?
  • How is configuration managed?

Structure

  • Where is the core business logic?
  • Where are tests located?
  • What build/tooling configuration exists?

Output Format

Provide a structured summary including:

  • Project purpose (1-2 sentences)
  • Key components table
  • Important files list with paths
  • Notable patterns or conventions
  • Any areas of complexity or concern

Example Output

## Project Purpose

Manages scientific data acquisition systems for the Sun Lab at Cornell University. Currently implements
the Mesoscope-VR two-photon imaging system combining brain imaging with virtual reality behavioral tasks.

## Key Components

| Component              | Location                                     | Purpose                                          |
|------------------------|----------------------------------------------|--------------------------------------------------|
| CLI Entry Points       | src/sl_experiment/command_line_interfaces/   | sl-get, sl-manage, sl-run commands               |
| Mesoscope-VR System    | src/sl_experiment/mesoscope_vr/              | Two-photon imaging with VR behavior integration  |
| Shared Components      | src/sl_experiment/shared_components/         | Cross-system utilities for all acquisition types |

## Important Files

- `src/sl_experiment/command_line_interfaces/sl_run.py` - Main experiment execution CLI
- `src/sl_experiment/command_line_interfaces/sl_manage.py` - Session and data management CLI
- `src/sl_experiment/command_line_interfaces/sl_get.py` - Data retrieval CLI
- `src/sl_experiment/mesoscope_vr/runtime.py` - Mesoscope-VR experiment runtime
- `src/sl_experiment/shared_components/session_manager.py` - Session-based data management

## Notable Patterns

- Hardware abstraction via binding classes (Zaber motors, cameras, microcontrollers)
- Shared memory IPC for GUI-runtime communication
- Session-based data management with distributed storage
- MyPy strict mode with full type annotations

## Areas of Concern

- Hardware dependencies require physical equipment for full testing
- Cross-library coordination with sl-shared-assets and ataraxis-video-system

Usage

Invoke at session start to ensure full context before making changes. Prevents blind modifications and ensures understanding of existing patterns.