Get the FREE Ultimate OpenClaw Setup Guide →

codebase-mapping

npx machina-cli add skill a5c-ai/babysitter/codebase-mapping --openclaw
Files (1)
SKILL.md
1.7 KB

Codebase Mapping

Overview

Auto-indexes the project structure to build a comprehensive codebase map. This map is used for invisible context injection via the UserPromptSubmit hook, providing Claude with project awareness without explicit user prompting.

Map Contents

Project Structure

  • Directory tree with depth-limited enumeration
  • Key file identification (entry points, configs, lock files)

File Type Distribution

  • Language breakdown (TypeScript, JavaScript, Python, etc.)
  • Framework detection (React, Next.js, Express, etc.)

Entry Points

  • Main entry files (index, main, app)
  • CLI entry points
  • API route definitions

Module Dependencies

  • Import graph analysis
  • Package boundary mapping
  • Circular dependency detection

Test Layout

  • Test directory structure
  • Test file patterns and conventions
  • Test framework identification

Context Injection

The codebase map is injected as invisible context during UserPromptSubmit, providing:

  • Project type and framework awareness
  • Convention awareness for code generation
  • Dependency awareness for import suggestions
  • Test pattern awareness for test generation

When to Use

  • Automatically at ClaudeKit session start
  • When project structure changes significantly
  • Before research or specification tasks

Processes Used By

  • claudekit-orchestrator (session initialization)
  • claudekit-research (context for research agents)
  • claudekit-spec-workflow (context for spec creation)

Source

git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/methodologies/claudekit/skills/codebase-mapping/SKILL.mdView on GitHub

Overview

Codebase mapping automatically catalogs project structure, file types, entry points, dependencies, and test layout to create a comprehensive map. This map is injected as invisible context during UserPromptSubmit to provide Claude with project awareness without explicit prompts.

How This Skill Works

The mapper traverses the repository with a depth-limited directory tree, identifies entry points (index, main, app), configs, and lock files, and builds a dependency graph by analyzing imports and package boundaries. It also detects framework indicators and test layouts to capture framework and test conventions.

When to Use It

  • Automatically at ClaudeKit session start
  • When the project structure changes significantly
  • Before research or specification tasks
  • During onboarding of a new repository
  • Before code generation or test scaffolding tasks

Quick Start

  1. Step 1: Enable codebase-mapping in your ClaudeKit session
  2. Step 2: Run the claudekit mapper to crawl the repository and build the map
  3. Step 3: Use the generated map as invisible context during UserPromptSubmit

Best Practices

  • Run the mapper at repo onboarding to establish a baseline
  • Update the map on CI or PRs to reflect changes
  • Verify detection of entry points and API routes
  • Validate the dependency graph and circular dependencies
  • Document test layout conventions exposed by the map

Example Use Cases

  • A Next.js + Express monorepo with multiple packages
  • A Python Django project with several apps and tests
  • A TypeScript library with shared code across packages
  • An API-first repo with REST and GraphQL routes
  • A large monorepo with lockfiles, multiple frameworks, and CLI tools

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers