Skip to content
exploration logo

Exploration Skill

exploration

Codebase exploration techniques for rapid discovery, architecture analysis, pattern detection, and dependency mapping.

SKILL.md

Full skill instructions

Session: ${CLAUDE_SESSION_ID}

Exploration Skill

Exploration Protocol

Phase 1: Initial Reconnaissance

# List root files
ls -la

# Find config files
find . -maxdepth 2 -name "package.json" -o -name "*.config.*" -o -name "pyproject.toml" -o -name "go.mod" -o -name "Cargo.toml" 2>/​dev/​null

# Check for common entry points
ls -la src/ app/ lib/ cmd/ 2>/​dev/​null

Phase 2: Structure Mapping

# Tree view (excluding common noise)
tree -L 3 -I 'node_modules|dist|build|.git|__pycache__|.next|target|vendor' 2>/​dev/​null || find . -type d -maxdepth 3 | head -50

# Identify main directories
ls -la src/ lib/ app/ internal/ pkg/ 2>/​dev/​null

Phase 3: Entry Points Detection

# JavaScript/​TypeScript
grep -rn "main\|index\|app.listen\|createServer\|export default" --include="*.{js,ts,jsx,tsx}" | head -20

# Python
grep -rn "if __name__\|main()\|app.run\|uvicorn" --include="*.py" | head -20

# Go
grep -rn "func main\|http.ListenAndServe" --include="*.go" | head -20

# Rust
grep -rn "fn main" --include="*.rs" | head -10

Phase 4: Dependency Analysis

# Node.js
cat package.json 2>/​dev/​null | head -50

# Python
cat pyproject.toml requirements.txt setup.py 2>/​dev/​null | head -50

# Go
cat go.mod 2>/​dev/​null

# Rust
cat Cargo.toml 2>/​dev/​null | head -50

# PHP
cat composer.json 2>/​dev/​null | head -50

Phase 5: Pattern Detection

Search for architectural patterns:

# MVC patterns
ls -la controllers/ models/ views/ routes/ 2>/​dev/​null

# Clean/​Hexagonal Architecture
ls -la domain/ application/ infrastructure/ interfaces/ adapters/ ports/ 2>/​dev/​null

# Feature-based
ls -la features/ modules/ 2>/​dev/​null

# Next.js App Router
ls -la app/ pages/ components/ 2>/​dev/​null

Architecture Pattern Detection

Pattern Indicators

PatternKey DirectoriesIndicators
MVCcontrollers/, models/, views/Rails, Laravel, Express
Clean Architecturedomain/, application/, infrastructure/DDD, Use cases
Hexagonaladapters/, ports/, core/Ports & adapters
Feature-basedfeatures/[name]/All layers per feature
Layeredpresentation/, business/, data/Traditional 3-tier
MonolithSingle src/Mixed concerns
MicroservicesMultiple services/Separate repos/​folders
Next.js App Routerapp/, components/, lib/Server/​Client components
Modular Monolithmodules/[name]/Bounded contexts

Tech Stack Detection

JavaScript/​TypeScript

FileTechnology
package.jsonDependencies, scripts
tsconfig.jsonTypeScript config
next.config.*Next.js
vite.config.*Vite
webpack.config.*Webpack
tailwind.config.*Tailwind CSS
.eslintrc.*ESLint
prisma/​schema.prismaPrisma ORM

Detection commands:

# Framework detection
grep -l "next\|react\|vue\|angular\|svelte" package.json 2>/​dev/​null

# Database/​ORM
ls prisma/ drizzle/ migrations/ 2>/​dev/​null

# State management
grep -E "zustand|redux|@reduxjs|jotai|recoil" package.json 2>/​dev/​null

Python

FileTechnology
pyproject.tomlModern Python project
requirements.txtDependencies
setup.pyPackage setup
manage.pyDjango
alembic.iniDatabase migrations

Detection commands:

# Framework detection
grep -E "django|flask|fastapi|starlette" pyproject.toml requirements.txt 2>/​dev/​null

# ORM
grep -E "sqlalchemy|django|tortoise|peewee" pyproject.toml requirements.txt 2>/​dev/​null

Go

FileTechnology
go.modModule definition
go.sumDependencies lock
cmd/Entry points
internal/Private packages
pkg/Public packages

Detection commands:

# Framework detection
grep -E "gin|echo|fiber|chi|gorilla" go.mod 2>/​dev/​null

# Database
grep -E "gorm|sqlx|ent|pgx" go.mod 2>/​dev/​null

PHP

FileTechnology
composer.jsonDependencies
artisanLaravel
bin/​consoleSymfony

Rust

FileTechnology
Cargo.tomlDependencies
src/​lib.rsLibrary crate
src/​main.rsBinary crate

Code Organization Assessment

Check Interface Separation

# TypeScript/​JavaScript
ls -la src/​interfaces/ src/​types/ types/ 2>/​dev/​null

# Check for interfaces in components (violation)
grep -r "interface.*Props\|type.*Props" --include="*.tsx" src/​components/ 2>/​dev/​null | head -10

Check Business Logic Location

# Hooks for business logic
ls -la src/​hooks/ hooks/ 2>/​dev/​null

# Check for logic in components (violation)
grep -rn "useState\|useEffect\|async" --include="*.tsx" src/​components/ 2>/​dev/​null | wc -l

Check State Management

# Store files
ls -la src/​stores/ stores/ src/​store/ 2>/​dev/​null

# Store usage
grep -r "useStore\|useSelector\|create(" --include="*.{ts,tsx}" src/ 2>/​dev/​null | head -10

Response Format

## 🗺️ Codebase Exploration: [Project Name]

### Structure Overview
- **Type**: Monolith / Microservices / Library / Monorepo
- **Tech Stack**: [Languages], [Frameworks], [Tools]
- **Architecture**: [Pattern detected]
- **Entry Points**: [Main files]

### Key Directories

src/ ├── [dir1]/ # [Purpose] ├── [dir2]/ # [Purpose] └── [dir3]/ # [Purpose]


### Dependencies
- **Runtime**: [Key dependencies]
- **Dev**: [Build tools, linters]
- **Database**: [ORM, driver]

### Architecture Patterns
- [Pattern 1]: [Evidence]
- [Pattern 2]: [Evidence]

### Code Organization
- **Interfaces**: [Location or ❌ mixed with components]
- **Business Logic**: [Location or ❌ in components]
- **State**: [Store location or ❌ prop drilling]
- **File Sizes**: [Compliant or ❌ violations found]

### Potential Issues
- ⚠️ [Issue 1]
- ⚠️ [Issue 2]

### Recommendations
- 💡 [Suggestion 1]
- 💡 [Suggestion 2]

Quick Analysis Commands

Full Stack Assessment

# One-liner for quick assessment
echo "=== Package Manager ===" && ls package.json pyproject.toml go.mod Cargo.toml composer.json 2>/​dev/​null && echo "=== Framework ===" && head -20 package.json 2>/​dev/​null | grep -E "next|react|vue|express" && echo "=== Structure ===" && ls -la src/ app/ lib/ 2>/​dev/​null

File Count by Type

# Count files by extension
find . -type f -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" 2>/​dev/​null | wc -l
find . -type f -name "*.py" 2>/​dev/​null | wc -l
find . -type f -name "*.go" 2>/​dev/​null | wc -l

Large Files Detection

# Find files > 100 lines (potential violations)
find . -name "*.ts" -o -name "*.tsx" -o -name "*.py" 2>/​dev/​null | xargs wc -l 2>/​dev/​null | sort -rn | head -20

Forbidden Behaviors

  • ❌ Make assumptions without code evidence
  • ❌ Ignore configuration files
  • ❌ Overlook test directories
  • ❌ Skip dependency analysis
  • ❌ Miss entry points
  • ❌ Assume architecture without verification

Behavioral Traits

  • Systematic and methodical
  • Pattern-focused detection
  • Context-aware analysis
  • Comprehensive yet concise
  • Evidence-based insights
  • Quick reconnaissance before deep dive

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View