Agent skill

Codebase Onboarding

by affaan-m in affaan-m/ECC

Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md.

MITAuto-check passedDevelopment

Install Codebase Onboarding

skills CLI
$ npx skills add affaan-m/ECC --skill codebase-onboarding -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC codebase-onboarding --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/codebase-onboarding .claude/skills/codebase-onboarding && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codebase-onboarding
GitHub stars
275k
Used in
3 other repos
Token cost
~2k tokens
SKILL.md length
601 words
Files
1
Skills in repo
645
Repo updated
First seen
Licence
MIT

At a glance

Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md.

  • Works in 4 steps: Reconnaissance → Architecture Mapping → Convention Detection → …
  • Joining a new project
  • SKILL.md covers When to Use, How It Works, Best Practices and Anti-Patterns to Avoid, plus 1 more section
  • Calls git

What it does

Codebase Onboarding is an agent skill from affaan-m/ECC. Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md. Use when joining a new project or setting up Claude Code for the first time in a repo.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Codebase onboarding and Agent instruction files. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

When your agent uses it

  • Joining a new project
  • Setting up Claude Code for the first time in a repo

Example prompts

  • “/codebase-onboarding”

Requirements

  • Node.js
  • Docker

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Reconnaissance
  2. Architecture Mapping
  3. Convention Detection
  4. Generate Onboarding Artifacts

What it can do on your machine

Read from SKILL.md and the folder at commit ef648e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codebase Onboarding loads about 2k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 601 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit ef648e0, republished under its MIT licence (© affaan-m). 601 words, ~2,042 tokens.

Download SKILL.mdSave it as .claude/skills/codebase-onboarding/SKILL.md (or your agent's skills folder).
name
codebase-onboarding
description
Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md. Use when joining a new project or setting up Claude Code for the first time in a repo.
metadata.origin
ECC

Codebase Onboarding

Systematically analyze an unfamiliar codebase and produce a structured onboarding guide. Designed for developers joining a new project or setting up Claude Code in an existing repo for the first time.

When to Use

  • First time opening a project with Claude Code
  • Joining a new team or repository
  • User asks "help me understand this codebase"
  • User asks to generate a CLAUDE.md for a project
  • User says "onboard me" or "walk me through this repo"

How It Works

Phase 1: Reconnaissance

Gather raw signals about the project without reading every file. Run these checks in parallel:

1. Package manifest detection
   → package.json, go.mod, Cargo.toml, pyproject.toml, pom.xml, build.gradle,
     Gemfile, composer.json, mix.exs, pubspec.yaml

2. Framework fingerprinting
   → next.config.*, nuxt.config.*, angular.json, vite.config.*,
     django settings, flask app factory, fastapi main, rails config

3. Entry point identification
   → main.*, index.*, app.*, server.*, cmd/, src/main/

4. Directory structure snapshot
   → Top 2 levels of the directory tree, ignoring node_modules, vendor,
     .git, dist, build, __pycache__, .next

5. Config and tooling detection
   → .eslintrc*, .prettierrc*, tsconfig.json, Makefile, Dockerfile,
     docker-compose*, .github/workflows/, .env.example, CI configs

6. Test structure detection
   → tests/, test/, __tests__/, *_test.go, *.spec.ts, *.test.js,
     pytest.ini, jest.config.*, vitest.config.*
Phase 2: Architecture Mapping

From the reconnaissance data, identify:

Tech Stack

  • Language(s) and version constraints
  • Framework(s) and major libraries
  • Database(s) and ORMs
  • Build tools and bundlers
  • CI/CD platform

Architecture Pattern

  • Monolith, monorepo, microservices, or serverless
  • Frontend/backend split or full-stack
  • API style: REST, GraphQL, gRPC, tRPC

Key Directories Map the top-level directories to their purpose:

<!-- Example for a React project — replace with detected directories -->
src/components/  → React UI components
src/api/         → API route handlers
src/lib/         → Shared utilities
src/db/          → Database models and migrations
tests/           → Test suites
scripts/         → Build and deployment scripts

Data Flow Trace one request from entry to response:

  • Where does a request enter? (router, handler, controller)
  • How is it validated? (middleware, schemas, guards)
  • Where is business logic? (services, models, use cases)
  • How does it reach the database? (ORM, raw queries, repositories)
Phase 3: Convention Detection

Identify patterns the codebase already follows:

Naming Conventions

  • File naming: kebab-case, camelCase, PascalCase, snake_case
  • Component/class naming patterns
  • Test file naming: *.test.ts, *.spec.ts, *_test.go

Code Patterns

  • Error handling style: try/catch, Result types, error codes
  • Dependency injection or direct imports
  • State management approach
  • Async patterns: callbacks, promises, async/await, channels

Git Conventions

  • Branch naming from recent branches
  • Commit message style from recent commits
  • PR workflow (squash, merge, rebase)
  • If the repo has no commits yet or only a shallow history (e.g. git clone --depth 1), skip this section and note "Git history unavailable or too shallow to detect conventions"
Phase 4: Generate Onboarding Artifacts

Produce two outputs:

Output 1: Onboarding Guide
markdown
# Onboarding Guide: [Project Name]

## Overview
[2-3 sentences: what this project does and who it serves]

## Tech Stack
<!-- Example for a Next.js project — replace with detected stack -->
| Layer | Technology | Version |
|-------|-----------|---------|
| Language | TypeScript | 5.x |
| Framework | Next.js | 14.x |
| Database | PostgreSQL | 16 |
| ORM | Prisma | 5.x |
| Testing | Jest + Playwright | - |

## Architecture
[Diagram or description of how components connect]

## Key Entry Points
<!-- Example for a Next.js project — replace with detected paths -->
- **API routes**: `src/app/api/` — Next.js route handlers
- **UI pages**: `src/app/(dashboard)/` — authenticated pages
- **Database**: `prisma/schema.prisma` — data model source of truth
- **Config**: `next.config.ts` — build and runtime config

## Directory Map
[Top-level directory → purpose mapping]

## Request Lifecycle
[Trace one API request from entry to response]

## Conventions
- [File naming pattern]
- [Error handling approach]
- [Testing patterns]
- [Git workflow]

## Common Tasks
<!-- Example for a Node.js project — replace with detected commands -->
- **Run dev server**: `npm run dev`
- **Run tests**: `npm test`
- **Run linter**: `npm run lint`
- **Database migrations**: `npx prisma migrate dev`
- **Build for production**: `npm run build`

## Where to Look
<!-- Example for a Next.js project — replace with detected paths -->
| I want to... | Look at... |
|--------------|-----------|
| Add an API endpoint | `src/app/api/` |
| Add a UI page | `src/app/(dashboard)/` |
| Add a database table | `prisma/schema.prisma` |
| Add a test | `tests/` matching the source path |
| Change build config | `next.config.ts` |
Output 2: Starter CLAUDE.md

Generate or update a project-specific CLAUDE.md based on detected conventions. If CLAUDE.md already exists, read it first and enhance it — preserve existing project-specific instructions and clearly call out what was added or changed.

markdown
# Project Instructions

## Tech Stack
[Detected stack summary]

## Code Style
- [Detected naming conventions]
- [Detected patterns to follow]

## Testing
- Run tests: `[detected test command]`
- Test pattern: [detected test file convention]
- Coverage: [if configured, the coverage command]

## Build & Run
- Dev: `[detected dev command]`
- Build: `[detected build command]`
- Lint: `[detected lint command]`

## Project Structure
[Key directory → purpose map]

## Conventions
- [Commit style if detectable]
- [PR workflow if detectable]
- [Error handling patterns]
Show full SKILL.md (259 more words)Show less

Best Practices

  1. Don't read everything — reconnaissance should use Glob and Grep, not Read on every file. Read selectively only for ambiguous signals.
  2. Verify, don't guess — if a framework is detected from config but the actual code uses something different, trust the code.
  3. Respect existing CLAUDE.md — if one already exists, enhance it rather than replacing it. Call out what's new vs existing.
  4. Stay concise — the onboarding guide should be scannable in 2 minutes. Details belong in the code, not the guide.
  5. Flag unknowns — if a convention can't be confidently detected, say so rather than guessing. "Could not determine test runner" is better than a wrong answer.

Anti-Patterns to Avoid

  • Generating a CLAUDE.md that's longer than 100 lines — keep it focused
  • Listing every dependency — highlight only the ones that shape how you write code
  • Describing obvious directory names — src/ doesn't need an explanation
  • Copying the README — the onboarding guide adds structural insight the README lacks

Examples

Example 1: First time in a new repo

User: "Onboard me to this codebase" Action: Run full 4-phase workflow → produce Onboarding Guide + Starter CLAUDE.md Output: Onboarding Guide printed directly to the conversation, plus a CLAUDE.md written to the project root

Example 2: Generate CLAUDE.md for existing project

User: "Generate a CLAUDE.md for this project" Action: Run Phases 1-3, skip Onboarding Guide, produce only CLAUDE.md Output: Project-specific CLAUDE.md with detected conventions

Example 3: Enhance existing CLAUDE.md

User: "Update the CLAUDE.md with current project conventions" Action: Read existing CLAUDE.md, run Phases 1-3, merge new findings Output: Updated CLAUDE.md with additions clearly marked

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/codebase-onboarding of affaan-m/ECC.

Open the folder on GitHubat commit ef648e0

Used in 3 other repositories

We found 9 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in affaan-m/ECC, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Codebase Onboarding next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codebase Onboarding compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codebase Onboarding this skillaffaan-m/ECC275k3 repos~2kAutomated safety check: PassMIT
Init Deep AGENTS.md Generatorcode-yeongyu/oh-my-openagent70k—~3.5kAutomated safety check: PassCustom licence
Drydock Repo Harness SetupYeachan-Heo/oh-my-claudecode40k—~5.2kAutomated safety check: PassMIT
Analyze Codebasedivar-ir/ai-doc-gen766—~899Automated safety check: PassMIT
Hierarchical AGENTS.md GeneratorYeachan-Heo/oh-my-claudecode40k—~2.3kAutomated safety check: PassMIT
Claude Project Bootstrapmp-web3/claude-starter-kit109—~1.9kAutomated safety check: NotesMIT

Similar skills

  • Init Deep AGENTS.md Generator

    code-yeongyu/oh-my-openagent

    Generates a tree of AGENTS.md files for a repository, one at the root and more in complex subdirectories, so agents learn its structure and conventions.

    70k GitHub stars~3.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Drydock Repo Harness Setup

    Yeachan-Heo/oh-my-claudecode

    Sets up a shared repo environment for people and agents: CLAUDE.md, a CONTEXT.md glossary, ADRs, standards and a design-system folder, and audits drift with --check.

    40k GitHub stars~5.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Analyze Codebase

    divar-ir/ai-doc-gen

    Run a multi-agent deep analysis of a codebase, producing AI-readable analysis documents in .ai/docs/ covering structure, dependencies, data flow, request flow, and APIs.

    766 GitHub stars~899 tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Hierarchical AGENTS.md Generator

    Yeachan-Heo/oh-my-claudecode

    Maps a codebase directory by directory and writes linked AGENTS.md files, each pointing to its parent, to document what each area contains.

    40k GitHub stars~2.3k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Claude Project Bootstrap

    mp-web3/claude-starter-kit

    Sets up a project for Claude Code by surveying it and writing a .claude folder with a short CLAUDE.md, a CODEBASE.md overview, module docs and optional skills and hooks.

    109 GitHub stars~1.9k tokensUpdated 6 mo ago
    Agent WorkflowsAuto-check: notes
  • Rules Create Global

    coleam00/skills

    Set up your project's global rules, a lean and well-structured root CLAUDE.md (plus a starter .claude/), following the course methodology.

    670 GitHub stars~3.2k tokensUpdated yesterday
    Product & Project ManagementAuto-check passed

More from affaan-m/ECC

All 645 skills in this repo
  • Videodb

    affaan-m/ECC

    Ingest, index, search, edit, and monitor video and audio with the VideoDB Python SDK — upload from files, URLs, or RTSP feeds, build spoken and scene indexes with timestamped search and playable…

    275k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    275k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    275k GitHub stars~2.9k tokensUpdated 3 days ago
    Auto-check passed
  • Measures whether agents actually follow a skill, rule or agent definition by generating scenarios at three strictness levels and scoring tool-call traces.

    275k GitHub starsUsed in 1 repo~623 tokens
    Auto-check passed
  • Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

    275k GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed
  • Adds one optional external Codex critique that tries to break a council's decision draft, sent to OpenAI only after you consent.

    275k GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Codebase Onboarding

What does Codebase Onboarding do?

Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md. Codebase Onboarding is an agent skill from affaan-m/ECC.md.

When should I use Codebase Onboarding?

Codebase Onboarding fits situations like: joining a new project; setting up Claude Code for the first time in a repo.

How do I install Codebase Onboarding in Claude Code?

Run `npx skills add affaan-m/ECC --skill codebase-onboarding -a claude-code`. Or copy the skill folder (skills/codebase-onboarding in affaan-m/ECC) into .claude/skills/codebase-onboarding in your project. Claude Code loads it when a task matches its description.

How do I install Codebase Onboarding in Codex?

Run `npx skills add affaan-m/ECC --skill codebase-onboarding -a codex`. Or copy the skill folder (skills/codebase-onboarding in affaan-m/ECC) into .agents/skills/codebase-onboarding in your project. Codex loads it when a task matches its description.

Can I use Codebase Onboarding in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill codebase-onboarding -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codebase-onboarding, .gemini/skills/codebase-onboarding, .github/skills/codebase-onboarding and .opencode/skills/codebase-onboarding in your project.

What does Codebase Onboarding need to run?

Going by SKILL.md and its folder, Codebase Onboarding needs the command-line tools its instructions call (git). Our summary lists: Node.js; Docker.

Does Codebase Onboarding access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Codebase Onboarding safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codebase Onboarding use?

Codebase Onboarding is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codebase Onboarding use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codebase Onboarding?

Skills that share tags, products or a category with Codebase Onboarding: Init Deep AGENTS.md Generator (code-yeongyu/oh-my-openagent, 70k stars), Drydock Repo Harness Setup (Yeachan-Heo/oh-my-claudecode, 40k stars), Analyze Codebase (divar-ir/ai-doc-gen, 766 stars) and Hierarchical AGENTS.md Generator (Yeachan-Heo/oh-my-claudecode, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codebase Onboarding?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 275,023 GitHub stars. The repository holds 645 skills in this directory. The repository was last updated on October 5, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.