Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问许可证需确认审计通过

codesight-ai-contextCodesight AI 上下文

Agent Skill

codesight-ai-context 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,397

周安装

272

GitHub Stars

39

下载量

2,241
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codesight-ai-context(Codesight AI 上下文)
来源仓库:https://github.com/aradotso/trending-skills
仓库路径:skills/codesight-ai-context
安装命令:
npx skills add https://github.com/aradotso/trending-skills --skill codesight-ai-context
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aradotso/trending-skills --skill codesight-ai-context

简介

CodeSight AI Context 将代码库编译为结构化上下文地图供 AI 助手快速读取。

  • 自动识别路由、模型、组件和依赖关系,覆盖 14 种语言和 30+ 框架。
  • 无需 API 密钥或配置文件,通过 npx codesight 直接运行获取精简上下文。
  • 显著减少手动文件探索消耗的 token 数量,提升大规模项目理解效率。
  • codesight-ai-context 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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
npx codesight (context map)3K–5K7x–12x
--wiki targeted article~200 + ~300/question60x–130x

Real benchmark results from production codebases:

ProjectStackFilesOutput TokensExploration TokensSavings
SaaS AHono + Drizzle1383,93646,02011.7x
SaaS BHono + Drizzle (monorepo)533,62926,1307.2x
SaaS CFastAPI + MongoDB404,16247,45011.4x
Rails appRails + ActiveRecord4,17221,711386,10017.8x
Laravel appLaravel + Eloquent3,89630,739493,28516x

.codesight Directory Structure

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

Troubleshooting

Routes not detected:

  • Ensure you're running from the project root (where package.json or 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 --wiki first to generate the wiki directory
  • Use codesight_lint_wiki MCP tool or check .codesight/wiki/log.md for generation errors

Large monorepos (10K+ files) are slow:

  • Add a .codesightignore file (same syntax as .gitignore) to exclude build artifacts, generated files, and node_modules subdirectories
  • Typical scan time: 186ms–890ms for projects under 5K files

MCP server not connecting:

  • Verify Node.js >= 18: node --version
  • Check cwd in MCP config points to the actual project root
  • Run npx codesight --mcp manually first to confirm it starts without errors

--init overwrites existing CLAUDE.md:

  • Back up existing files before running --init on a project with custom AI instructions
  • Generated files are additive starting points — merge with your existing content manually

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.97%
按下载量换算851

Claude

29.92%
按下载量换算671

Cursor

19.59%
按下载量换算439

Gemini CLI

10.44%
按下载量换算234

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills