From aradotso-trending-skills-37
Generates structured codebase context maps (routes, models, components, dependencies) for AI coding assistants, saving thousands of tokens per session. Supports 14 languages, 30+ frameworks, and includes an MCP server with 13 tools.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aradotso-trending-skills-37:codesight-ai-contextThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Skill by ara.so — Daily 2026 Skills collection.
CodeSight compiles your codebase into a compact, structured context map (routes, models, components, dependencies) that AI coding assistants can read in one shot — eliminating thousands of tokens spent on manual file exploration. Supports 14 languages, 30+ frameworks, 13 ORM parsers, and an MCP server with 13 tools.
No installation required. Run directly with npx:
npx codesight
Or install globally:
npm install -g codesight
codesight
Requirements: Node.js >= 18, no API keys, no config files needed.
# Generate context map (default — outputs .codesight/CODESIGHT.md)
npx codesight
# Generate persistent wiki knowledge base (.codesight/wiki/)
npx codesight --wiki
# Generate AI tool config files (CLAUDE.md, .cursorrules, codex.md, AGENTS.md)
npx codesight --init
# Open interactive HTML report in browser
npx codesight --open
# Start as MCP server (13 tools) for Claude Code / Cursor
npx codesight --mcp
# Show blast radius for a specific file
npx codesight --blast src/lib/db.ts
# Generate optimized config for a specific AI tool
npx codesight --profile claude-code
npx codesight --profile cursor
npx codesight --profile copilot
npx codesight --profile codex
# Show token savings breakdown
npx codesight --benchmark
# Map markdown knowledge base (ADRs, meeting notes, Obsidian vault)
npx codesight --mode knowledge
npx codesight --mode knowledge ~/vault
npx codesight --mode knowledge ./docs
# Watch mode — regenerate on file changes
npx codesight --watch
# Git hook — regenerate on every commit
npx codesight --hook
npx codesight)Outputs .codesight/CODESIGHT.md — a structured map including:
--wiki)Outputs .codesight/wiki/ directory:
.codesight/wiki/
index.md — catalog of all articles (~200 tokens)
overview.md — architecture, subsystems, high-impact files
auth.md — auth routes, middleware, session flow
payments.md — payment routes, webhook handling, billing flow
database.md — all models, fields, relations
users.md — user management routes and models
ui.md — UI components with props
log.md — append-only operation log
--init)Generates project-root files for each AI tool:
CLAUDE.md — Claude Code project instructions.cursorrules — Cursor rules filecodex.md — OpenAI Codex contextAGENTS.md — general agent instructionsStart CodeSight as an MCP server to give Claude Code or Cursor direct tool access:
npx codesight --mcp
| Tool | Description |
|---|---|
codesight_get_context | Full codebase context map |
codesight_get_routes | All API routes with methods and handlers |
codesight_get_models | All database models and schema |
codesight_get_components | UI components with props |
codesight_get_blast_radius | Impact analysis for a specific file |
codesight_get_high_impact_files | Files ranked by dependency count |
codesight_get_framework_info | Detected frameworks and ORMs |
codesight_get_wiki_index | Wiki catalog (~200 tokens) for session start |
codesight_get_wiki_article | Read one wiki article by name |
codesight_lint_wiki | Wiki health check (orphans, stale, missing links) |
codesight_get_knowledge | Knowledge map from markdown notes |
codesight_benchmark | Token savings analysis |
codesight_get_overview | Project overview summary |
Add to your Claude Code MCP config (~/.claude/mcp_settings.json or project .mcp.json):
{
"mcpServers": {
"codesight": {
"command": "npx",
"args": ["codesight", "--mcp"],
"cwd": "/path/to/your/project"
}
}
}
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"codesight": {
"command": "npx",
"args": ["codesight", "--mcp"]
}
}
}
| Language | AST Precision | Frameworks Detected |
|---|---|---|
| TypeScript | ✅ Full AST | Next.js, NestJS, Hono, Remix, SvelteKit, Nuxt, Express, Fastify |
| JavaScript | Regex | Express, Fastify, Koa, Hapi |
| Python | Regex | Django, FastAPI, Flask, SQLAlchemy |
| Go | Regex | Gin, Echo, Fiber, Chi |
| Ruby | Regex | Rails, Sinatra |
| PHP | Regex | Laravel, Symfony |
| Elixir | Regex | Phoenix |
| Java | Regex | Spring Boot |
| Kotlin | Regex | Ktor, Spring Boot |
| Rust | Regex | Axum, Actix |
| Dart | Regex | Flutter |
| Swift | Regex | Vapor |
| C# | Regex | ASP.NET Core |
Drizzle, Prisma, TypeORM, Sequelize, Mongoose, MikroORM, SQLAlchemy, Django ORM, ActiveRecord, Eloquent, Ecto, GORM, and more (13 total).
At the beginning of every AI session, load the wiki index instead of the full context map:
# In Claude Code or Cursor, at session start:
Use codesight_get_wiki_index to get project overview,
then codesight_get_wiki_article for "auth" to understand authentication.
Before modifying a shared file, check what breaks:
npx codesight --blast src/lib/database.ts
Output shows every file that imports the target, ranked by impact — critical before refactoring database connections, shared utilities, or types.
Keep context fresh on every push:
# .github/workflows/codesight.yml
name: Update AI Context
on:
push:
branches: [main]
jobs:
update-context:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Generate context map
run: npx codesight
- name: Generate wiki
run: npx codesight --wiki
- name: Generate knowledge map
run: npx codesight --mode knowledge ./docs
- name: Commit updated context
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .codesight/
git diff --staged --quiet || git commit -m "chore: update AI context [skip ci]"
git push
npx codesight --hook
This installs a post-commit hook that regenerates .codesight/CODESIGHT.md automatically after every commit.
# Map ADRs and architecture docs
npx codesight --mode knowledge ./docs/decisions
# Map full Obsidian vault
npx codesight --mode knowledge ~/vault
# Outputs .codesight/KNOWLEDGE.md with:
# - Key decisions extracted from ADR files
# - Open questions surfaced from notes
# - Meeting notes indexed by date
# - Specs and PRDs cataloged
Read .codesight/CODESIGHT.md for project context before answering questions.
Read .codesight/wiki/index.md first.
Then read the relevant article (e.g. .codesight/wiki/auth.md)
only when questions about that domain arise.
Read .codesight/CODESIGHT.md for code structure and
.codesight/KNOWLEDGE.md for architectural decisions.
| Approach | Tokens per session | Savings vs baseline |
|---|---|---|
| Manual file exploration | 26K–47K | baseline |
npx codesight (context map) | 3K–5K | 7x–12x |
--wiki targeted article | ~200 + ~300/question | 60x–130x |
Real benchmark results from production codebases:
| Project | Stack | Files | Output Tokens | Exploration Tokens | Savings |
|---|---|---|---|---|---|
| SaaS A | Hono + Drizzle | 138 | 3,936 | 46,020 | 11.7x |
| SaaS B | Hono + Drizzle (monorepo) | 53 | 3,629 | 26,130 | 7.2x |
| SaaS C | FastAPI + MongoDB | 40 | 4,162 | 47,450 | 11.4x |
| Rails app | Rails + ActiveRecord | 4,172 | 21,711 | 386,100 | 17.8x |
| Laravel app | Laravel + Eloquent | 3,896 | 30,739 | 493,285 | 16x |
.codesight/
CODESIGHT.md — main context map (commit this)
KNOWLEDGE.md — knowledge/decision map (commit this)
wiki/
index.md — wiki catalog (commit this)
overview.md
auth.md
database.md
payments.md
users.md
ui.md
log.md
Add .codesight/ to git to persist context across sessions and team members. The wiki survives session restarts — every new conversation starts with full codebase knowledge from the first message.
Routes not detected:
package.json or equivalent lives)@app.get() / @router.post() decoratorsModels showing 0 for MongoDB:
Wiki articles missing:
npx codesight --wiki first to generate the wiki directorycodesight_lint_wiki MCP tool or check .codesight/wiki/log.md for generation errorsLarge monorepos (10K+ files) are slow:
.codesightignore file (same syntax as .gitignore) to exclude build artifacts, generated files, and node_modules subdirectoriesMCP server not connecting:
node --versioncwd in MCP config points to the actual project rootnpx codesight --mcp manually first to confirm it starts without errors--init overwrites existing CLAUDE.md:
--init on a project with custom AI instructionsnpx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-1 --plugin aradotso-trending-skills-37Generate a structured, self-maintaining codebase map: a set of atomic Markdown docs in .claude/.codebase-info/ that ground every future Claude session in how the project is built. Use when the user asks to "map the codebase", "document the codebase", "create codebase documentation", "generate architecture docs", "onboard me to this project", "what does this codebase do", "bootstrap codebase docs", "set up codebase-mapper", or "analyze the project structure". Works for any language/stack and for both existing projects and brand-new or empty ones. To refresh an existing map after code changes, use update-codebase-map instead.
Auto-generates CLAUDE.md and .rune/ context for AI sessions by scanning codebase structure, config files, and tech stack. Saves re-explaining project context on undocumented repos.