/ 目录 / 演练场 / Nexus-skills
● 社区 Haaaiawd ⚡ 即开即用

Nexus-skills

作者 Haaaiawd · Haaaiawd/Nexus-skills

Codebase intelligence skills — build a persistent .nexus-map/ knowledge base and query file structure, dependencies, and change impact.

Nexus Skills makes Claude Code and other agents codebase-aware. Run it once to generate a .nexus-map/ knowledge base with file structure, dependency graphs, and call sites. After that, queries like 'what breaks if I change this function?' get precise answers instead of guesses. Useful in large, unfamiliar repos.

为什么要用

核心特性

实时演示

实际使用效果

nexus-skill.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "nexus-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Haaaiawd/Nexus-skills",
        "~/.claude/skills/Nexus-skills"
      ],
      "_inferred": true
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "nexus-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Haaaiawd/Nexus-skills",
        "~/.claude/skills/Nexus-skills"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "nexus-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Haaaiawd/Nexus-skills",
        "~/.claude/skills/Nexus-skills"
      ],
      "_inferred": true
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "nexus-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Haaaiawd/Nexus-skills",
        "~/.claude/skills/Nexus-skills"
      ],
      "_inferred": true
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "nexus-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Haaaiawd/Nexus-skills",
        "~/.claude/skills/Nexus-skills"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "nexus-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/Haaaiawd/Nexus-skills",
          "~/.claude/skills/Nexus-skills"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add nexus-skill -- git clone https://github.com/Haaaiawd/Nexus-skills ~/.claude/skills/Nexus-skills

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: Nexus-skills

How to onboard to an unfamiliar codebase fast

👤 Engineers joining a new team or team inheriting a codebase ⏱ ~60 min intermediate

何时使用: Day one in a repo you've never seen; you want a map before making changes.

前置条件
  • Skill installed — git clone https://github.com/Haaaiawd/Nexus-skills ~/.claude/skills/nexus-skills
步骤
  1. Build the map
    Use nexus-skills to scan this repo and build .nexus-map/.✓ 已复制
    → Progress output + map files produced
  2. Get the tour
    Using .nexus-map, tell me: entry points, top 10 most-imported modules, and any orphaned files.✓ 已复制
    → Repo overview keyed to actual files
  3. Dig into a subsystem
    Show me the payments subsystem — files, dependencies, external calls.✓ 已复制
    → Scoped subsystem view

结果: A factual mental model of the repo built in under an hour.

注意事项
  • Map goes stale after big merges — Re-run nexus update; it's incremental

Check blast radius before changing a core function

👤 Engineers about to touch a widely-used utility ⏱ ~30 min intermediate

何时使用: You're about to rename or change the signature of a function and want to see every call site.

前置条件
  • .nexus-map/ already built — Run once per repo; incremental after
步骤
  1. Query impact
    What calls formatCurrency(), and what would break if I change the signature to accept a locale?✓ 已复制
    → Call-site list with each caller's likely break mode
  2. Generate migration
    Produce the minimal diff across all call sites to add the new locale param with a sensible default.✓ 已复制
    → Multi-file patch

结果: A change with known blast radius and a prepared diff.

Find dead code and unused exports

👤 Engineers cleaning up before a refactor ⏱ ~40 min intermediate

何时使用: Before a refactor you want to know what's truly unused.

步骤
  1. Query map
    Using .nexus-map, list files with no imports from elsewhere, and exports with no external references.✓ 已复制
    → Ranked list with confidence per finding
  2. Verify
    For the top 10 candidates, double-check by searching for string-based usage (reflection, dynamic imports).✓ 已复制
    → Filtered list with false-positive caveats

结果: A dead-code delete list you can actually ship.

注意事项
  • Dynamic imports look dead statically — Always run the string-based sweep before deleting

组合

与其他 MCP 搭配,撬动十倍杠杆

Security-impact queries: where does tainted input flow?

Using nexus-map, trace every call path from the /ingest endpoint into the DB layer. Then OWASP review those paths.✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
build_map repo_root Once per repo initially compute (local)
update_map changed_files After large merges compute (local)
query_structure question Answering structure questions Claude tokens
change_impact symbol or file Before breaking changes Claude tokens
dead_code - Pre-refactor cleanup Claude tokens

成本与限制

运行它的成本

API 配额
None
每次调用 Token 数
Map build is local compute (fast); queries consume Claude tokens
费用
Free
提示
Build once, query often. Re-build only when repo shape changes materially.

安全

权限、密钥、影响范围

凭据存储: No credentials. .nexus-map/ is local by default.
数据出站: Map building is local. Querying sends map snippets to Claude.

故障排查

常见错误与修复

Map build crashes on monorepos

Run per-package rather than on the root; nexus supports a scope flag

Queries return stale results after edits

Run nexus update on the changed files; incremental is cheap

Language not recognized

Check supported languages in nexus docs; some frameworks need explicit parser config

替代方案

Nexus-skills 对比其他方案

替代方案何时用它替代权衡
SourceGraph / CodyYou need hosted code intelligence at org scalePaid; not local
tree-sitter + custom queriesYou want full controlMuch more build time

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills