reason-machines/trending-skills1 file

Codesight AI Context

Universal AI context generator that compiles codebase maps, wiki knowledge bases, and MCP tools to save thousands of tokens per AI conversation.

Specification
Skill ID
reason-machines/trending-skills/codesight-ai-context
Publisher
reason-machines
Repository
trending-skills
Installs
0
Files
1
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

reason-machines/trending-skills/codesight-ai-contextInstalls these files
  • SKILL.md

What this skill tells the agent

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:

npx codesight

Or install globally:

npm install -g codesight
codesight

Requirements: Node.js >= 18, no API keys, no config files needed.

Core Commands

# 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

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:

.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

AI Tool Config Files (--init)

Generates project-root files for each AI tool:

  • CLAUDE.md — Claude Code project instructions
  • .cursorrules — Cursor rules file
  • codex.md — OpenAI Codex context
  • AGENTS.md — general agent instructions

MCP Server Mode

Start CodeSight as an MCP server to give Claude Code or Cursor direct tool access:

npx codesight --mcp

MCP Tool Reference

ToolDescription
codesight_get_contextFull codebase context map
codesight_get_routesAll API routes with methods and handlers
codesight_get_modelsAll database models and schema
codesight_get_componentsUI components with props
codesight_get_blast_radiusImpact analysis for a specific file
codesight_get_high_impact_filesFiles ranked by dependency count
codesight_get_framework_infoDetected frameworks and ORMs
codesight_get_wiki_indexWiki catalog (~200 tokens) for session start
codesight_get_wiki_articleRead one wiki article by name
codesight_lint_wikiWiki health check (orphans, stale, missing links)
codesight_get_knowledgeKnowledge map from markdown notes
codesight_benchmarkToken savings analysis
codesight_get_overviewProject overview summary

Configuring MCP in Claude Code

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"
    }
  }
}

Configuring MCP in Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "codesight": {
      "command": "npx",
      "args": ["codesight", "--mcp"]
    }
  }
}

Language & Framework Support

LanguageAST PrecisionFrameworks Detected
TypeScript✅ Full ASTNext.js, NestJS, Hono, Remix, SvelteKit, Nuxt, Express, Fastify
JavaScriptRegexExpress, Fastify, Koa, Hapi
PythonRegexDjango, FastAPI, Flask, SQLAlchemy
GoRegexGin, Echo, Fiber, Chi
RubyRegexRails, Sinatra
PHPRegexLaravel, Symfony
ElixirRegexPhoenix
JavaRegexSpring Boot
KotlinRegexKtor, Spring Boot
RustRegexAxum, Actix
DartRegexFlutter
SwiftRegexVapor
C#RegexASP.NET Core

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:

# 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.

Pattern 2: Blast Radius Before Refactoring

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.

Pattern 3: CI/CD Integration

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 "action@github.com"
          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

Pattern 4: Git Hook for Local Freshness

npx codesight --hook

This installs a post-commit hook that regenerates .codesight/CODESIGHT.md automatically after every commit.

Pattern 5: Knowledge Mapping for Decision Records

# 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

Consuming the Output in AI Sessions

Loading Context in Claude Code (manual)

Read .codesight/CODESIGHT.md for project context before answering questions.

Loading Wiki at Session Start

Read .codesight/wiki/index.md first. 
Then read the relevant article (e.g. .codesight/wiki/auth.md) 
only when questions about that domain arise.

Loading Combined Context

Read .codesight/CODESIGHT.md for code structure and 
.codesight/KNOWLEDGE.md for architectural decisions.

Token Savings Reference

ApproachTokens per sessionSavings vs baseline
Manual file exploration26K–47Kbaseline

Use this skill in a project

Open any RiverX project, search the Skills panel for reason-machines/trending-skills/codesight-ai-context, and install it in one click.

Use this skill