noah-sheldon/ai-dev-kit/codebase-onboarding

Claude Code and agent skill by noah-sheldon/ai-dev-kit

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Codebase onboarding methodology: dependency mapping, architecture discovery, key file identification, domain terminology extraction, first task identification, learning checklist, and knowledge gap tracking. Includes scripts for automated codebase analysis.

Install

npx vskill@latest install noah-sheldon/ai-dev-kit/codebase-onboarding

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as noah-sheldon/ai-dev-kit/codebase-onboarding.

Codebase Onboarding

Systematic methodology for onboarding to an unfamiliar codebase: dependency mapping, architecture discovery, key file identification, domain terminology extraction, first task identification, learning checklist, knowledge gap tracking, and automated analysis scripts.

When to Use

  • Joining a new project or taking over maintenance of an existing codebase
  • Starting a code review or audit of unfamiliar repositories
  • Preparing to refactor or migrate a system you don't own
  • Building a mental model of architecture, data flow, and domain concepts
  • Creating onboarding documentation for new team members
  • Assessing codebase health and technical debt

Core Concepts

1. Architecture Discovery Pipeline
┌──────────────┐ ┌──────────────┐ ┌───────────────┐ ┌──────────────┐
│ FILE TREE │───▶│ DEPENDENCY │───▶│ ENTRY POINT │───▶│ DATA FLOW │
│ MAP │ │ GRAPH │ │ IDENTIFICATION│ │ MAPPING │
│ │ │ │ │ │ │ │
│ - Directories│ │ - Imports │ │ - main() │ │ - API routes │
│ - Key files │ │ - Packages │ │ - app factory │ │ - DB models │
│ - Config │ │ - Circular │ │ - entrypoints │ │ - Event flow │
│ - Size stats │ │ - External │ │ - CLI commands│ │ - Side effects│
└──────────────┘ └──────────────┘ └───────────────┘ └──────────────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ TERMINOLOGY │◀─────────────────────────────────────────────│ DOMAIN MODEL│
│ GLOSSARY │ │ EXTRACTION │
│ │ │ │
│ - Domain │◀─────────────────────────────────────────────│ - Entities │
│ terms │ │ - Relations │
│ - Acronyms │ │ - Invariants │
│ - Conventions│ │ - Boundaries │
└──────────────┘ └──────────────┘
2. Automated Codebase Analysis Script

Python — Full Codebase Scanner:

python
#!/usr/bin/env python3
"""
codebase-scanner.py — Automated codebase analysis for onboarding.
Usage:
python codebase-scanner /path/to/project
Outputs:
- File tree with size statistics
- Dependency graph (imports/requires)
- Entry point identification
- TODO/FIXME inventory
- Dependency manifest
- Architecture summary (JSON + markdown)
"""
import os
import sys
import json
import ast
import re
from pathlib import Path
from dataclasses import dataclass, field, asdict
from collections import Counter, defaultdict
from typing import Optional
@dataclass
class FileInfo:
path: str
lines: int
size_bytes: int
imports: list[str] = field(default_factory=list)
classes: list[str] = field(default_factory=list)
functions: list[str] = field(default_factory=list)
has_tests: bool = False
complexity_score: int = 0 # Approximate: branches + loops
@dataclass
class ProjectReport:
root: str
total_files: int = 0
total_lines: int = 0
total_size_mb: float = 0.0
language_breakdown: dict = field(default_factory=dict)
files: list[FileInfo] = field(default_factory=list)
dependencies: dict[str, list[str]] = field(default_factory=dict)
entry_points: list[str] = field(default_factory=list)
todos: list[dict] = field(default_factory=list)
config_files: list[str] = field(default_factory=list)
test_coverage_estimate: float = 0.0 # Ratio of test files to source files
IGNORED_DIRS = {
"node_modules", "__pycache__", ".git", ".venv", "venv", "dist", "build",
".next", ".cache", "coverage", ".tox", ".mypy_cache", ".pytest_cache",
"site-packages", ".terraform", ".serverless",
}
IGNORED_EXTENSIONS = {
".png", ".jpg", ".gif", ".svg", ".ico", ".woff", ".woff2", ".ttf",
".eot", ".map", ".lock", ".pyc", ".pyo", ".so", ".dylib", ".db",
".sqlite", ".sqlite3",
}
LANGUAGE_EXTENSIONS = {
"python": {".py"},
"typescript": {".ts", ".tsx"},
"javascript": {".js", ".jsx", ".mjs"},
"rust": {".rs"},
"go": {".go"},
"java": {".java"},
"ruby": {".rb"},
"shell": {".sh", ".bash", ".zsh"},
"config": {".json", ".yaml", ".yml", ".toml", ".ini", ".env.example"},
"docs": {".md", ".rst", ".txt"},
}
def scan_directory(root: str) -> ProjectReport:
"""Scan a directory and produce a comprehensive project report."""
report = ProjectReport(root=os.path.abspath(root))
ext_to_lang = {}
for lang, exts in LANGUAGE_EXTENSIONS.items():
for ext in exts:
ext_to_lang[ext] = lang
source_files = 0
test_files = 0
for dirpath, dirnames, filenames in os.walk(root):
# Prune ignored directories
dirnames[:] = [d for d in dirnames if d not in IGNORED_DIRS and not d.startswith(".")]
for filename in filenames:
filepath = os.path.join(dirpath, filename)
ext = os.path.splitext(filename)[1].lower()
if ext in IGNORED_EXTENSIONS:
continue
rel_path = os.path.relpath(filepath, root)
is_test = any(
kw in filename.lower()
for kw in ["test", "spec", "_test.", ".spec.", ".test."]
)
try:
size = os.path.getsize(filepath)
with open(filepath, "r", encoding="utf-8", errors="ignore") as f:
content = f.read()
lines = content.count("\n") + 1
except (OSError, IOError):
continue
file_info = FileInfo(
path=rel_path,
lines=lines,
size_bytes=size,
has_tests=is_test,
)
# Language tracking
lang = ext_to_lang.get(ext, "other")
report.language_breakdown.setdefault(lang, 0)
report.language_breakdown[lang] += 1
if is_test:
test_files += 1
else:
source_files += 1
# Python AST analysis
if ext == ".py":
analyze_python(content, file_info)
# TypeScript/JavaScript analysis
if ext in {".ts", ".tsx", ".js", ".jsx"}:
analyze_typescript(content, file_info)
# TODO/FIXME extraction
for match in re.finditer(r"#?\s*(TODO|FIXME|HACK|XXX|NOTE)\s*[:\s]\s*(.+)", content):
report.todos.append({
"file": rel_path,
"line": content[:match.start()].count("\n") + 1,
"type": match.group(1),
"text": match.group(2).strip()[:100],
})
# Config file detection
if filename.lower() in {
"package.json", "requirements.txt", "pyproject.toml",
"setup.py", "setup.cfg", "Cargo.toml", "go.mod",
"Gemfile", "pom.xml", "build.gradle", "Makefile",
"dockerfile", "docker-compose.yml", ".github/workflows",
}:
report.config_files.append(rel_path)
# Entry point detection
if is_entry_point(filename, content, ext):
report.entry_points.append(rel_path)
report.files.append(file_info)
report.total_files += 1
report.total_lines += lines
report.total_size_mb += size / (1024 * 1024)
report.total_size_mb = round(report.total_size_mb, 2)
if source_files > 0:
report.test_coverage_estimate = round(test_files / (source_files + test_files) * 100, 1)
# Build dependency summary (top 20 most imported modules)
all_imports = []
for f in report.files:
all_imports.extend(f.imports)
import_counts = Counter(all_imports)
report.dependencies = dict(import_counts.most_common(20))
return report
def analyze_python(content: str, file_info: FileInfo) -> None:
"""Parse Python AST to extract imports, classes, functions."""
try:
tree = ast.parse(content)
except SyntaxError:
return
for node in ast.walk(tree):
if isinstance(node, (ast.Import, ast.ImportFrom)):
if isinstance(node, ast.ImportFrom) and node.module:
file_info.imports.append(node.module.split(".")[0])
elif isinstance(node, ast.Import):
for alias in node.names:
file_info.imports.append(alias.name.split(".")[0])
elif isinstance(node, ast.ClassDef):
file_info.classes.append(node.name)
elif isinstance(node, ast.FunctionDef | ast.AsyncFunctionDef):
file_info.functions.append(node.name)
# Approximate complexity: count branches
for child in ast.walk(node):
if isinstance(child, (ast.If, ast.For, ast.While, ast.ExceptHandler,
ast.With, ast.Assert, ast.BoolOp)):
file_info.complexity_score += 1
def analyze_typescript(content: str, file_info: FileInfo) -> None:
"""Simple regex-based extraction for TypeScript/JavaScript."""
# Import extraction
for match in re.finditer(
r'(?:import\s+(?:.*\s+from\s+)?|require\()["\']([^"\']+)["\']',
content,
):
module = match.group(1)
# External vs internal
if not module.startswith(".") and not module.startswith("/"):
# Scoped package: @org/pkg or plain pkg
parts = module.split("/")
pkg = parts[1] if parts[0].startswith("@") else parts[0]
file_info.imports.append(pkg)
# Class/function extraction (simple regex, not AST)
for match in re.finditer(r'(?:export\s+)?(?:abstract\s+)?class\s+(\w+)', content):
file_info.classes.append(match.group(1))
for match in re.finditer(
r'(?:export\s+)?(?:async\s+)?function\s+(\w+)', content,
):
file_info.functions.append(match.group(1))
def is_entry_point(filename: str, content: str, ext: str) -> bool:
"""Detect if a file is likely an entry point."""
# Python entry points
if ext == ".py":
if filename == "main.py" or filename == "__main__.py":
return True
if 'if __name__ ==' in content and '"__main__"' in content:
return True
if "app = FastAPI()" in content or "app = Flask(" in content:
return True
# Node.js entry points
if ext in {".ts", ".js"}:
if filename in {"index.ts", "index.js", "main.ts", "main.js", "server.ts", "server.js"}:
return True
if "express()" in content or "createServer(" in content:
return True
return False
def generate_markdown_report(report: ProjectReport) -> str:
"""Generate a human-readable markdown onboarding report."""
lines = [
f"# Codebase Onboarding Report: {os.path.basename(report.root)}",
"",
"## Overview",
f"- **Total files:** {report.total_files}",
f"- **Total lines:** {report.total_lines:,}",
f"- **Total size:** {report.total_size_mb} MB",
f"- **Estimated test ratio:** {report.test_coverage_estimate}%",
"",
"## Language Breakdown",
]
for lang, count in sorted(report.language_breakdown.items(), key=lambda x: -x[1]):
lines.append(f"- **{lang}:** {count} files")
lines += [
"",
"## Entry Points",
]
for ep in report.entry_points:
lines.append(f"- `{ep}`")
lines += [
"",
"## Configuration Files",
]
for cf in report.config_files:
lines.append(f"- `{cf}`")

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/noah-sheldon/ai-dev-kit/codebase-onboarding/badge)](https://verified-skill.com/skills/noah-sheldon/ai-dev-kit/codebase-onboarding)

Something wrong with this skill or its page? Tell us.