Copilot commented on code in PR #3045: URL: https://github.com/apache/hugegraph/pull/3045#discussion_r3340405852
########## tools/ai/hugegraph-deepwiki-skill/README.md: ########## @@ -0,0 +1,116 @@ +# HugeGraph Repository Assistant + +[中文](README-zh.md) | [English](README.md) + +This standalone module packages a Claude Code and Codex skill for answering questions about the [Apache HugeGraph](https://github.com/apache/hugegraph) source repository. + +DeepWiki is used as the online knowledge and MCP transport layer: + +```text +https://deepwiki.com/apache/hugegraph +https://mcp.deepwiki.com/mcp +``` + +## What It Does + +- Answers repository-grounded questions about HugeGraph architecture, modules, APIs, storage backends, schema, traversal, configuration, build, tests, and implementation details. +- Uses `read_wiki_contents` to build a local DeepWiki wiki cache and searches that cache before answering. +- Uses `ask_question` when the cached context does not directly and precisely answer the question. +- Avoids cloning upstream repositories for ordinary Q&A. + +## Layout + +```text +tools/ai/hugegraph-deepwiki-skill/ +├── README.md +├── README-zh.md +├── .agents/plugins/marketplace.json +├── .claude-plugin/marketplace.json +└── plugins/hugegraph-deepwiki-skill/ + ├── .claude-plugin/plugin.json + ├── .codex-plugin/plugin.json + └── skills/hugegraph-deepwiki-skill/ + ├── SKILL.md + ├── agents/openai.yaml + ├── references/repos.json + └── scripts/deepwiki_mcp.py +``` + +## Claude Code Install + +From this repository: + +```bash +cd tools/ai/hugegraph-deepwiki-skill +claude plugin marketplace add "$(pwd)" +claude plugin install hugegraph-deepwiki-skill@hugegraph-deepwiki-skill +``` + +From a published branch, clone the repository first and install from the local module path: + +```bash +git clone -b <branch> https://github.com/<owner>/hugegraph.git +cd hugegraph/tools/ai/hugegraph-deepwiki-skill +claude plugin marketplace add "$(pwd)" +claude plugin install hugegraph-deepwiki-skill@hugegraph-deepwiki-skill +``` + +Manual user-level skill install: + +```bash +mkdir -p ~/.claude/skills +cp -R plugins/hugegraph-deepwiki-skill/skills/hugegraph-deepwiki-skill ~/.claude/skills/ +``` + +### Ask Claude Code To Install It + +Paste this into Claude Code from the HugeGraph repository root: + +```text +Install the HugeGraph repository assistant from this checkout. Enter `tools/ai/hugegraph-deepwiki-skill`, run `claude plugin marketplace add "$(pwd)"`, then run `claude plugin install hugegraph-deepwiki-skill@hugegraph-deepwiki-skill`. Do not hardcode absolute paths. +``` + +## Codex Install + +From this repository: + +```bash +cd tools/ai/hugegraph-deepwiki-skill +codex plugin marketplace add "$(pwd)" +codex plugin add hugegraph-deepwiki-skill@hugegraph-deepwiki-skill +``` + +From a published branch, clone the repository first and install from the local module path: + +```bash +git clone -b <branch> https://github.com/<owner>/hugegraph.git +cd hugegraph/tools/ai/hugegraph-deepwiki-skill +codex plugin marketplace add "$(pwd)" +codex plugin add hugegraph-deepwiki-skill@hugegraph-deepwiki-skill +``` + +If your Codex build cannot install plugins directly, install the raw skill: + +```bash +CODEX_HOME="${CODEX_HOME:-$HOME/.codex}" +mkdir -p "$CODEX_HOME/skills" +cp -R plugins/hugegraph-deepwiki-skill/skills/hugegraph-deepwiki-skill "$CODEX_HOME/skills/" +``` + +### Ask Codex To Install It + +Paste this into Codex from the HugeGraph repository root: + +```text +Install the HugeGraph repository assistant from this checkout. Enter `tools/ai/hugegraph-deepwiki-skill`, run `codex plugin marketplace add "$(pwd)"`, then run `codex plugin add hugegraph-deepwiki-skill@hugegraph-deepwiki-skill`. If this Codex build has no plugin add command, copy `plugins/hugegraph-deepwiki-skill/skills/hugegraph-deepwiki-skill` into `${CODEX_HOME:-$HOME/.codex}/skills`. Do not hardcode absolute paths. +``` + +## Usage + +After installation, ask for the skill explicitly when needed: + +```text Review Comment: The DeepWiki MCP client script uses Python 3.9+ type-hint syntax (for example `list[str]` / `dict[str, ...]`). Without stating this prerequisite, users on Python 3.8 (still common on some distros) will hit a SyntaxError when running the documented `python3 scripts/deepwiki_mcp.py ...` commands. Please document the minimum Python version (and that it requires network access to the MCP endpoint). ########## tools/ai/hugegraph-deepwiki-skill/plugins/hugegraph-deepwiki-skill/skills/hugegraph-deepwiki-skill/SKILL.md: ########## @@ -0,0 +1,85 @@ +--- +name: hugegraph-deepwiki-skill +description: Use this skill as a repository knowledge assistant for Apache HugeGraph, apache/hugegraph source code, architecture, modules, APIs, configuration, storage backends, Gremlin/traversal behavior, schema/modeling, server/client tooling, build/test workflows, or implementation details. It answers questions grounded in apache/hugegraph and uses the official DeepWiki MCP wiki as the underlying retrieval channel. +metadata: + short-description: Apache HugeGraph repository assistant +--- + +# HugeGraph Repository Knowledge Assistant + +Answer questions about the Apache HugeGraph source repository. Use the official DeepWiki MCP server as the underlying knowledge retrieval channel. + +- Source repository: `https://github.com/apache/hugegraph` +- DeepWiki page: `https://deepwiki.com/apache/hugegraph` +- MCP endpoint: `https://mcp.deepwiki.com/mcp` +- Default repository: `apache/hugegraph` + Review Comment: The skill instructions assume `python3 scripts/deepwiki_mcp.py ...` will run, but the script uses Python 3.9+ typing syntax (`list[str]` / `dict[str, ...]`). Adding an explicit prerequisite here avoids confusing SyntaxError reports on older Python runtimes. ########## tools/ai/hugegraph-deepwiki-skill/README-zh.md: ########## @@ -0,0 +1,116 @@ +# HugeGraph 仓库知识助手 + +[English](README.md) | [中文](README-zh.md) + +这个独立模块将 [Apache HugeGraph](https://github.com/apache/hugegraph) 源码仓库问答能力打包为 Claude Code 和 Codex 可安装的 skill。 + +DeepWiki 是底层线上知识库和 MCP 传输通道: + +```text +https://deepwiki.com/apache/hugegraph +https://mcp.deepwiki.com/mcp +``` + +## 功能 + +- 回答 HugeGraph 架构、模块、API、存储后端、schema、traversal、配置、构建、测试和实现细节相关问题。 +- 使用 `read_wiki_contents` 构建本地 DeepWiki wiki 缓存,并优先搜索缓存。 +- 当缓存内容不能直接、精准回答问题时,使用 `ask_question` 获取线上答案。 +- 普通问答不会 clone 上游源码仓库。 + +## 目录结构 + +```text +tools/ai/hugegraph-deepwiki-skill/ +├── README.md +├── README-zh.md +├── .agents/plugins/marketplace.json +├── .claude-plugin/marketplace.json +└── plugins/hugegraph-deepwiki-skill/ + ├── .claude-plugin/plugin.json + ├── .codex-plugin/plugin.json + └── skills/hugegraph-deepwiki-skill/ + ├── SKILL.md + ├── agents/openai.yaml + ├── references/repos.json + └── scripts/deepwiki_mcp.py +``` + +## Claude Code 安装 + +从当前仓库安装: + +```bash +cd tools/ai/hugegraph-deepwiki-skill +claude plugin marketplace add "$(pwd)" +claude plugin install hugegraph-deepwiki-skill@hugegraph-deepwiki-skill +``` + +从已发布分支安装时,先 clone 仓库,再从本地模块路径安装: + +```bash +git clone -b <branch> https://github.com/<owner>/hugegraph.git +cd hugegraph/tools/ai/hugegraph-deepwiki-skill +claude plugin marketplace add "$(pwd)" +claude plugin install hugegraph-deepwiki-skill@hugegraph-deepwiki-skill +``` + +手动安装用户级 skill: + +```bash +mkdir -p ~/.claude/skills +cp -R plugins/hugegraph-deepwiki-skill/skills/hugegraph-deepwiki-skill ~/.claude/skills/ +``` + +### 让 Claude Code 自动安装 + +在 HugeGraph 仓库根目录的 Claude Code 里粘贴: + +```text +Install the HugeGraph repository assistant from this checkout. Enter `tools/ai/hugegraph-deepwiki-skill`, run `claude plugin marketplace add "$(pwd)"`, then run `claude plugin install hugegraph-deepwiki-skill@hugegraph-deepwiki-skill`. Do not hardcode absolute paths. +``` + +## Codex 安装 + +从当前仓库安装: + +```bash +cd tools/ai/hugegraph-deepwiki-skill +codex plugin marketplace add "$(pwd)" +codex plugin add hugegraph-deepwiki-skill@hugegraph-deepwiki-skill +``` + +从已发布分支安装时,先 clone 仓库,再从本地模块路径安装: + +```bash +git clone -b <branch> https://github.com/<owner>/hugegraph.git +cd hugegraph/tools/ai/hugegraph-deepwiki-skill +codex plugin marketplace add "$(pwd)" +codex plugin add hugegraph-deepwiki-skill@hugegraph-deepwiki-skill +``` + +如果当前 Codex 版本不能直接安装 plugin,可以安装 raw skill: + +```bash +CODEX_HOME="${CODEX_HOME:-$HOME/.codex}" +mkdir -p "$CODEX_HOME/skills" +cp -R plugins/hugegraph-deepwiki-skill/skills/hugegraph-deepwiki-skill "$CODEX_HOME/skills/" +``` + +### 让 Codex 自动安装 + +在 HugeGraph 仓库根目录的 Codex 里粘贴: + +```text +Install the HugeGraph repository assistant from this checkout. Enter `tools/ai/hugegraph-deepwiki-skill`, run `codex plugin marketplace add "$(pwd)"`, then run `codex plugin add hugegraph-deepwiki-skill@hugegraph-deepwiki-skill`. If this Codex build has no plugin add command, copy `plugins/hugegraph-deepwiki-skill/skills/hugegraph-deepwiki-skill` into `${CODEX_HOME:-$HOME/.codex}/skills`. Do not hardcode absolute paths. +``` + +## 使用方式 + +安装后,可以在提问时显式指定: + +```text Review Comment: 该模块的 DeepWiki MCP 客户端脚本使用了 Python 3.9+ 的类型标注语法(例如 `list[str]` / `dict[str, ...]`)。如果不声明这一前置条件,部分仍在使用 Python 3.8 的环境会在执行 README 中的 `python3 scripts/deepwiki_mcp.py ...` 时直接报 SyntaxError。建议在使用方式中补充最低 Python 版本要求,并提示需要能访问 MCP endpoint。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
