Skip to content
Open
20 changes: 20 additions & 0 deletions tools/ai/hugegraph-deepwiki-skill/.agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "hugegraph-deepwiki-skill",
"interface": {
"displayName": "HugeGraph Repository Assistant"
},
"plugins": [
{
"name": "hugegraph-deepwiki-skill",
"source": {
"source": "local",
"path": "./plugins/hugegraph-deepwiki-skill"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Developer Tools"
}
]
}
14 changes: 14 additions & 0 deletions tools/ai/hugegraph-deepwiki-skill/.claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "hugegraph-deepwiki-skill",
"description": "Repository knowledge assistant for Apache HugeGraph.",
"owner": {
"name": "HugeGraph Community"
},
"plugins": [
{
"name": "hugegraph-deepwiki-skill",
"source": "./plugins/hugegraph-deepwiki-skill",
"description": "Ask repository-grounded questions about Apache HugeGraph."
}
]
}
116 changes: 116 additions & 0 deletions tools/ai/hugegraph-deepwiki-skill/README-zh.md
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +113 to +117

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修复。最新 deepwiki-skill 分支的 README-zh.md 已补充 Python 3.9+ 最低版本要求,并说明当前环境需要能访问 https://mcp.deepwiki.com/mcp

Use $hugegraph-deepwiki-skill to explain HugeGraph schema and traversal behavior.
```

HugeGraph AI 相关问题请安装 `apache/hugegraph-ai` 仓库中的独立 HugeGraph AI 仓库知识助手。
116 changes: 116 additions & 0 deletions tools/ai/hugegraph-deepwiki-skill/README.md
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +113 to +117
Use $hugegraph-deepwiki-skill to explain HugeGraph schema and traversal behavior.
```

For HugeGraph AI questions, install the separate HugeGraph AI repository assistant from the `apache/hugegraph-ai` repository instead.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "hugegraph-deepwiki-skill",
"description": "Repository knowledge assistant for Apache HugeGraph.",
"version": "0.1.4",
"author": {
"name": "HugeGraph Community"
},
"homepage": "https://github.com/apache/hugegraph",
"repository": "https://github.com/apache/hugegraph",
"license": "Apache-2.0",
"keywords": ["hugegraph", "deepwiki", "apache", "knowledge-assistant"],
"skills": "./skills/"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "hugegraph-deepwiki-skill",
"version": "0.1.4",
"description": "Repository knowledge assistant for Apache HugeGraph.",
"author": {
"name": "HugeGraph Community",
"email": "",
"url": "https://github.com/apache/hugegraph"
},
"homepage": "https://github.com/apache/hugegraph",
"repository": "https://github.com/apache/hugegraph",
"license": "Apache-2.0",
"keywords": ["hugegraph", "deepwiki", "apache", "knowledge-assistant"],
"skills": "./skills/",
"interface": {
"displayName": "HugeGraph Repository Assistant",
"shortDescription": "Ask repository-grounded questions about Apache HugeGraph.",
"longDescription": "Provides an Apache HugeGraph repository knowledge assistant for architecture, API, configuration, storage, traversal, schema, and implementation questions. DeepWiki MCP is used as the underlying retrieval channel.",
"developerName": "HugeGraph Community",
"category": "Developer Tools",
"capabilities": ["Knowledge", "MCP"],
"websiteURL": "https://github.com/apache/hugegraph",
"defaultPrompt": [
"Use $hugegraph-deepwiki-skill to answer my HugeGraph repository question."
],
"brandColor": "#2563EB"
}
}
Original file line number Diff line number Diff line change
@@ -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`

Comment on lines +12 to +17
## Default Workflow

1. Preserve the user's question, including code snippets, version constraints, error messages, and environment details.
2. Change directory to this skill directory, the directory containing this `SKILL.md`.
3. Search the local DeepWiki wiki cache for relevant context. If the cache does not exist yet, this command fetches `read_wiki_contents` from DeepWiki once and saves it under the user's cache directory. It prints only relevant snippets, not the full wiki dump:

```bash
python3 scripts/deepwiki_mcp.py context --repo hugegraph --query "<user question>"
```

4. Answer from cached context only when the snippets directly and precisely answer the user's question. If they are merely related background, continue to `ask`.
5. For broad navigation questions, read the wiki structure instead:

```bash
python3 scripts/deepwiki_mcp.py structure --repo hugegraph
```

6. If the cached wiki context does not directly and precisely answer the question, do not answer the user yet. You must use DeepWiki's AI `ask_question` tool to request an online answer:

```bash
python3 scripts/deepwiki_mcp.py ask --repo hugegraph --question "<user question>"
```

7. For `ask`, preserve the user's original question. Do not expand it with extra requirements, long source-reference requests, or your own multi-part prompt; longer generated questions are more likely to time out.
8. If `ask` returns uncertainty, times out, or reports a transport/query error, retry once with the shortest faithful form of the user's original question. If it still fails, say so plainly and answer only from the cached context if it is sufficient.
9. If the user needs source references for an `ask` answer, use the cached context or contents to identify the relevant wiki page snippets and source-file references. `ask` usually returns the final answer plus suggested wiki pages or a DeepWiki search link, not the raw code files used to generate the answer.

## Routing Rules

- Use `structure` first for navigation, table-of-contents, or "where should I look?" questions.
- Use `context` first for normal Q&A, source-reference requests, and token-efficient grounding.
- Use `ask` after `context` whenever cached snippets do not provide a direct and precise answer, or when the question needs synthesis across multiple areas. Do not answer directly from related-but-insufficient cached snippets.
- If both an online answer and source references are needed, run `ask` for the answer and use `context` to collect source references.
- Do not clone the repository for ordinary Q&A or verification. If current source verification is truly required, prefer online source links or raw GitHub files and clearly distinguish that from DeepWiki-grounded content.

## When to Read Structure or Pages

For broad navigation questions, or when the user asks where something lives, inspect the wiki structure:

```bash
cd <directory-containing-this-SKILL.md>
python3 scripts/deepwiki_mcp.py structure --repo hugegraph
```

If the user needs a fuller wiki dump for offline review or synthesis, read the wiki contents:

```bash
cd <directory-containing-this-SKILL.md>
python3 scripts/deepwiki_mcp.py contents --repo hugegraph
```

The `contents` command uses the same local cache by default. Use `--refresh` only when the user explicitly needs a fresh DeepWiki snapshot.

For normal Q&A, prefer `context` over `contents` so only the relevant cached snippets enter the model context. When the cached wiki context does not directly and precisely answer the question, run `ask` for an online DeepWiki answer before responding.

## Repository Profile

The repository alias lives in `references/repos.json`.

- `hugegraph` maps to `apache/hugegraph`.
- For Apache HugeGraph AI questions, use the separate `hugegraph-ai-deepwiki-skill` instead of this skill.

## Answering Guidance

- Keep responses practical: include class/module names, configuration keys, command names, or API names when DeepWiki provides them.
- Prefer online DeepWiki retrieval and cached wiki search. Do not clone the source repository just to answer a question.
- If the user asks for code changes in a local HugeGraph checkout, use DeepWiki for orientation, then inspect and edit the local repository directly.
- Do not invent details that DeepWiki does not provide. Clearly distinguish DeepWiki-grounded facts from your own inference.
- For version-sensitive release, dependency, or API-compatibility questions, verify with the live repository or official docs when the user needs current facts beyond the DeepWiki answer.
Loading