Code Graph(代码图谱)
一键安装 GitNexus 并为当前项目构建代码知识图谱。当用户说「安装GitNexus」「设置GitNexus」「初始化GitNexus」「配置GitNexus」「用GitNexus建图」「GitNexus一键配置」时使用。 Skill: Code Graph(代码图谱) Owner: babywhale Summary: 一键安装 GitNexus 并为当前项目构建代码知识图谱。当用户说「安装GitNexus」「设置GitNexus」「初始化GitNexus」「配置GitNexus」「用GitNexus建图」「GitNexus一键配置」时使用。 Tags: ai-agent:1.0.1, code-analysis:1.0.1, code-graph:1.0.1, gitnexus:1.0.1, knowledge-graph:1.0.1, latest:1.0.2 Version history: v1.0.2 | 2026-07-15T09:16:40.640Z | user - Removed the file: skill-card.md. - Installation step now specifies installing GitNe
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
1.0.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.2release · observed Jul 15, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s179e8009mmyn5bqr2sakbwwyn87eprq:code-graph- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-babywhale-code-graph/snapshot"
Documentation
CLAWHUB
23,848 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
--- name: code-graph description: 一键安装 GitNexus 并为当前项目构建代码知识图谱。当用户说「安装GitNexus」「设置GitNexus」「初始化GitNexus」「配置GitNexus」「用GitNexus建图」「GitNexus一键配置」时使用。 --- # 代码图谱(GitNexus) 为当前项目一键完成 GitNexus 安装、MCP 配置和知识图谱构建。**每一步都有跳过检测,已完成的步骤不会重复执行。** ## 语言支持 TypeScript、JavaScript、Python、Java、C、C++、C#、Go、Rust、PHP、Swift、Dart、Kotlin、Ruby 等 14 种语言。 --- ## 执行流程 **按顺序执行以下步骤。每步先检测当前状态,已完成则跳过。** ### 第 1 步:定位项目根目录 `gitnexus analyze` 需在项目根目录下执行。首先检查当前工作目录是否即为项目根目录: ```bash git rev-parse --show-toplevel 2>&1 && echo "已定位到项目根目录" ``` 如果 Git 未初始化,则通过常见项目标志文件判断: ```bash ls package.json 2>&1 || ls pom.xml 2>&1 || ls go.mod 2>&1 || ls Cargo.toml 2>&1 || ls requirements.txt 2>&1 || echo "未找到项目根目录标志文件" ``` - 当前目录即为根目录 → 继续下一步 - 检测到其他目录为根目录 → `cd` 到该目录 - 找不到任何项目标志 → 询问用户项目根目录在哪,或使用 `git init` 初始化 ### 第 2 步:检查 Node.js 环境 ```bash node --version ``` **要求 Node.js >= 22。** 如果版本过低或未安装: - 引导用户到 [nodejs.org](https://nodejs.org/) 下载 LTS 版本 - Windows 用户也可用 `winget install OpenJS.NodeJS.LTS` 安装 - 升级完成后重新执行本技能 ### 第 3 步:安装 GitNexus 注意,gitNexus安装时指定1.6.5版本 **先检测,再决定是否安装:** ```bash gitnexus --version 2>&1 ``` **判断逻辑:** - 输出类似 `1.x.x` 的版本号 → **已安装,跳过本步骤**,直接进入第 4 步 - 输出 `command not found` 或 `not recognized` → 未安装,执行以下安装 **安装命令(Windows,推荐全局安装):** ```bash set GITNEXUS_SKIP_OPTIONAL_GRAMMARS=1 && npm install -g [email protected] ``` **安装命令(macOS / Linux):** ```bash GITNEXUS_SKIP_OPTIONAL_GRAMMARS=1 npm install -g [email protected] ``` > `GITNEXUS_SKIP_OPTIONAL_GRAMMARS=1` 跳过 Dart/Proto 原生语法解析器的编译,安装只需几秒,无需 C++ 工具链。 **权限不足时的回退方案** — 如果全局安装失败(EACCES / Permission denied),后续命令统一改用 `npx` 前缀: ```bash npx gitnexus analyze # 代替 gitnexus analyze npx gitnexus setup # 代替 gitnexus setup npx gitnexus status # 代替 gitnexus status ``` ### 第 4 步:配置 MCP 服务 `gitnexus setup` 自动检测已安装的编辑器并写入 MCP 配置,全局只需执行一次。 **先检测是否已配置:** ```bash gitnexus setup 2>&1 ``` **判断逻辑:** - 输出包含 `already configured`、`up to date`、`MCP configuration exists` 等字样 → **已配置,跳过** - 输出包含 `wrote`、`created`、`configured`、`Updated` 等字样 → 配置成功 - 若 `gitnexus` 命令不可用(未全局安装),使用 `npx gitnexus setup` > `setup` 是幂等的,重复执行不会产生重复配置,可安全地直接运行。 ### 第 5 步:构建知识图谱 **先检测当前项目是否已索引:** ```bash gitnexus status 2>&1 ``` **判断逻辑:** - 输出包含 `Indexed`、`symbols`、`up to date`、`fresh` 等字样 → **已索引且是最新的,跳过本步骤** - 输出包含 `Not indexed`、`No index found`、`unknown` 等字样 → 未索引,执行以下命令 - 如果 `gitnexus` 不可用,改用 `npx gitnexus status` **执行索引:** ```bash gitnexus analyze ``` 此命令解析整个代码库、解析导入关系、追踪调用链、检测代码社区,在项目根目录生成 `.gitnexus/` 索引(自动加入 `.gitignore`)。优先使用gitnexus analyze进行索引,若出现错误则尝试增加选项。 **如果需要强制重建(已索引但过期):** ```bash gitnexus analyze --force ``` **常用选项:** | 选项 | 用途 | |------|------| | `--embeddings` | 启用语义/向量搜索,速度较慢但搜索更强 | | `--force` | 强制重建索引(索引过期时使用) | | `--skip-embeddings` | 跳过嵌入生成,大幅加速(默认行为) | | `--skip-git` | 允许对非 git 目录构建索引 | | `--skip-agents-md` | 保留自定义的 CLAUDE.md / AGENTS.md | | `--verbose` | 输出详细日志,包括被跳过的文件 | | `--
_meta.json
{
"ownerId": "kn787ypy8qst1csc9zmfk7mqmx87fm55",
"slug": "code-graph",
"version": "1.0.2",
"publishedAt": 1784107000640
}skill-card.md
## Description: Installs GitNexus, configures its MCP service, and builds a code knowledge graph for the current project. This skill is ready for commercial/non-commercial use. ## Publisher: [babywhale](https://clawhub.ai/user/babywhale) ### License/Terms of Use: MIT-0 ## Use Case: Developers and engineers use this skill to set up GitNexus for an existing project, configure MCP integration, index the repository, and verify the resulting code knowledge graph. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Fallback and troubleshooting commands may execute unpinned GitNexus packages through npx. Mitigation: Use the pinned global install command or an explicitly pinned `npx [email protected]` command before running setup, status, or analyze. Risk: The troubleshooting flow can commit all local files with `git add . && git commit`, which may include secrets or private files. Mitigation: Review `.gitignore`, inspect `git status`, and confirm no sensitive files are staged before committing. ## Reference(s): - [Node.js](https://nodejs.org/) - [nvm](https://github.com/nvm-sh/nvm) ## Skill Output: **Output Type(s):** [Text, Markdown, Shell commands, Configuration, Guidance] **Output Format:** [Markdown with inline bash code blocks] **Output Parameters:** [1D] **Other Properties Related to Output:** [Guides project-root detection, Node.js version checks, GitNexus installation, MCP setup, repository indexing, and verification steps.] ## Skill Version(s): 1.0.2 (source: server release metadata) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/babywhale/skills/code-graph",
"sourceUrl": "https://clawhub.ai/babywhale/skills/code-graph",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T05:51:45.534Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-babywhale-code-graph/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-babywhale-code-graph/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T05:51:45.534Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/babywhale/code-graph",
"sourceUrl": "https://clawhub.ai/babywhale/code-graph",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T05:51:45.534Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.2",
"href": "https://clawhub.ai/babywhale/code-graph",
"sourceUrl": "https://clawhub.ai/babywhale/code-graph",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-15T09:16:40.640Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-babywhale-code-graph/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-babywhale-code-graph/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.2",
"description": "- Removed the file: skill-card.md. - Installation step now specifies installing GitNexus version 1.6.5. - All GitNexus global npm install commands updated to explicitly use @1.6.5 version. - No other workflow or usage changes noted.",
"href": "https://clawhub.ai/babywhale/code-graph",
"sourceUrl": "https://clawhub.ai/babywhale/code-graph",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-15T09:16:40.640Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
