CodeSight — AI Context Generator
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.
Installation
No installation required. Run directly with npx:
Or install globally:
Requirements: Node.js >= 18, no API keys, no config files needed.
Core Commands
What Gets Generated
Default Scan (npx codesight)
Outputs .codesight/CODESIGHT.md — a structured map including:
- Project metadata (stack, language, framework, package manager)
- All routes with HTTP methods and handler locations
- Database models with fields and relations
- UI components with props
- High-impact files ranked by dependency count
- Framework and ORM detection results
Wiki Knowledge Base (--wiki)
Outputs .codesight/wiki/ directory:
AI Tool Config Files (--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 instructions
MCP Server Mode
Start CodeSight as an MCP server to give Claude Code or Cursor direct tool access:
MCP Tool Reference
Configuring MCP in Claude Code
Add to your Claude Code MCP config (~/.claude/mcp_settings.json or project .mcp.json):
Configuring MCP in Cursor
Add to .cursor/mcp.json in your project root:
Language & Framework Support
ORM / Database Support
Drizzle, Prisma, TypeORM, Sequelize, Mongoose, MikroORM, SQLAlchemy, Django ORM, ActiveRecord, Eloquent, Ecto, GORM, and more (13 total).
Real Usage Patterns
Pattern 1: Session Start with Wiki
At the beginning of every AI session, load the wiki index instead of the full context map:
Pattern 2: Blast Radius Before Refactoring
Before modifying a shared file, check what breaks:
Output shows every file that imports the target, ranked by impact — critical before refactoring database connections, shared utilities, or types.
Pattern 3: CI/CD Integration
Keep context fresh on every push:
Pattern 4: Git Hook for Local Freshness
This installs a post-commit hook that regenerates .codesight/CODESIGHT.md automatically after every commit.
Pattern 5: Knowledge Mapping for Decision Records
Consuming the Output in AI Sessions
Loading Context in Claude Code (manual)
Loading Wiki at Session Start
Loading Combined Context
Token Savings Reference
Real benchmark results from production codebases:
.codesight Directory Structure
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.
Troubleshooting
Routes not detected:
- Ensure you're running from the project root (where
package.jsonor equivalent lives) - TypeScript projects get full AST parsing; other languages use regex — check that route files follow standard framework conventions
- For Python FastAPI, ensure router files use standard
@app.get()/@router.post()decorators
Models showing 0 for MongoDB:
- This is correct behavior — codesight parses SQL ORM declarations. MongoDB collections without Mongoose schemas won't appear. Define Mongoose schemas explicitly to get model detection.
Wiki articles missing:
- Run
npx codesight --wikifirst to generate the wiki directory - Use
codesight_lint_wikiMCP tool or check.codesight/wiki/log.mdfor generation errors
Large monorepos (10K+ files) are slow:
- Add a
.codesightignorefile (same syntax as.gitignore) to exclude build artifacts, generated files, andnode_modulessubdirectories - Typical scan time: 186ms–890ms for projects under 5K files
MCP server not connecting:
- Verify Node.js >= 18:
node --version - Check
cwdin MCP config points to the actual project root - Run
npx codesight --mcpmanually first to confirm it starts without errors
--init overwrites existing CLAUDE.md:
- Back up existing files before running
--initon a project with custom AI instructions - Generated files are additive starting points — merge with your existing content manually



