by Haaaiawd
AI-native codebase intelligence skills — generate persistent .nexus-map/ knowledge bases and instantly query file structure, dependency graphs, and change impact. Built for Copilot, Cursor, and any tool-calling LLM. 面向 AI 编程助手的代码库感知技能——生成持久化知识图谱,精准查询文件结构、依赖关系与改动影响半径。
# Add to your Claude Code skills
git clone https://github.com/Haaaiawd/Nexus-skills| Skill | What It Does | When to Use |
|-------|-------------|-------------|
| nexus-mapper | Analyzes the full repository and writes a persistent .nexus-map/ knowledge base for future AI sessions | When starting on an unfamiliar repo, onboarding a team, or preparing for major architectural work |
| nexus-query | Queries file structure, reverse dependencies, change impact radius, and coupling hotspots directly from AST data | During active development — before interface changes, refactoring sprints, or legacy codebase navigation |
Both skills use the same underlying scripts. nexus-query can reuse a .nexus-map/ produced by nexus-mapper, or generate its own ast_nodes.json on demand.
nexus-mapper is a repository-mapping skill for AI agents. It analyzes a local codebase, writes a persistent .nexus-map/ knowledge base, and gives the next session a concrete place to start instead of forcing it to rediscover architecture from scratch.
This is not a generic "summarize the repo" prompt. The skill runs a gated PROBE workflow, challenges its own first-pass assumptions, and only then writes final assets. That design matters: it reduces the usual AI failure mode of turning first impressions into fake certainty.
.nexus-map/
├── INDEX.md ← Load this first. Full architectural context, under 2000 tokens.
├── arch/
│ ├── systems.md ← Every subsystem: what it owns, exactly where it sits in the repo.
│ ├── dependencies.md ← How components connect. Rendered as a Mermaid dependency graph.
│ └── test_coverage.md ← Static test surface: what is tested, what is not, and where evidence is thin.
├── concepts/
│ ├── concept_model.json ← Machine-readable knowledge graph. Structured for programmatic use.
│ └── domains.md ← The domain language this codebase speaks, in plain terms.
├── hotspots/ ← Present when git metadata is available.
│ └── git_forensics.md ← Files that change constantly, and pairs that always change together.
└── raw/ ← Source data: AST nodes, git statistics, filtered file tree.
INDEX.md is the entry point and routing hub. After reading it, load all five companion files before taking action — they are intentionally kept short (typically under 5000 tokens combined).
nexus-query gives precise, instant answers to structural questions during active development — without reading the entire codebase.
# File skeleton: classes, methods, line numbers, imports
python skills/nexus-query/scripts/query...
No comments yet. Be the first to share your thoughts!