Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .claude-plugin/marketplace.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
with:
node-version: 20

- name: Skills copies in sync with canonical source
run: node scripts/sync-skills.mjs --check
- name: Skills are valid (frontmatter + tool references)
run: node scripts/validate-skills.mjs

- name: JSON manifests are valid
run: |
Expand Down
79 changes: 56 additions & 23 deletions AGENT-INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,35 @@ curl -s -H "X-Auth-Token: $YUQUE_TOKEN" https://www.yuque.com/api/v2/user

## Claude Code (recommended path)

The only formally packaged distribution — one command installs MCP server + all skills, with updates.
Install the MCP server and skills in two steps:

```bash
# 1. Register the marketplace (this alone installs nothing)
claude plugin marketplace add yuque/yuque-ecosystem

# 2. Install the plugin — required step
claude plugin install yuque-personal@yuque
# 1. MCP server
claude mcp add yuque-mcp -- npx -y yuque-mcp --token=$YUQUE_TOKEN

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use user scope for Claude Code MCP install

With this new two-step Claude Code path, the skills are copied to ~/.claude/skills (user-wide), but this claude mcp add uses Claude Code's default local scope. The official docs say “By default it registers the server at local scope” and to pass --scope user for all projects (https://code.claude.com/docs/en/mcp-quickstart), so anyone running the install from the cloned checkout gets globally discoverable Yuque skills that fail in other projects because the MCP tools are only registered locally; add --scope user here or make the MCP and skills both project-scoped.

Useful? React with 👍 / 👎.


# 3. Token via env var
export YUQUE_TOKEN="your_token_here" # add to ~/.zshrc for persistence
# 2. Skills — copy the canonical directory
REPO_DIR="/path/to/yuque-ecosystem" # cloned checkout
mkdir -p ~/.claude/skills
cp -r "$REPO_DIR/skills/"* ~/.claude/skills/
```

Verify:
For a project-level installation, copy the skills into `.claude/skills/` instead.

Verify the MCP server:

```bash
claude plugin list | grep yuque-personal
# ✅ "yuque-personal" appears ❌ re-run step 2 and check its error output
claude mcp list | grep -i yuque
```

MCP-only alternative (no skills):
Uninstall the MCP server and remove only the Yuque skill directories that were copied:

```bash
claude mcp add yuque-mcp -- npx -y yuque-mcp --token=$YUQUE_TOKEN
claude mcp list | grep -i yuque
claude mcp remove yuque-mcp
rm -rf ~/.claude/skills/{smart-search,smart-summary,daily-capture,reading-digest,note-refine,knowledge-connect,style-extract,stale-detector}
# Project-level installation:
rm -rf .claude/skills/{smart-search,smart-summary,daily-capture,reading-digest,note-refine,knowledge-connect,style-extract,stale-detector}
```

Uninstall: `claude plugin uninstall yuque-personal`, `claude plugin marketplace remove yuque`, or `claude mcp remove yuque-mcp`.

---

## OpenCode
Expand Down Expand Up @@ -122,13 +122,47 @@ cp -r "$REPO_DIR/skills/"* ~/.openclaw/skills/

## Cursor / VS Code (Copilot) / Windsurf / other MCP editors

Copy the matching template from [`shared/mcp-config/`](./shared/mcp-config/) and replace `YOUR_YUQUE_TOKEN`:
Create the matching config file and replace `YOUR_YUQUE_TOKEN`.

### Cursor — `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global)

```json
{
"mcpServers": {
"yuque-mcp": {
"command": "npx",
"args": ["-y", "yuque-mcp", "--token=YOUR_YUQUE_TOKEN"]
}
}
}
```

### VS Code (requires GitHub Copilot extension) — `.vscode/mcp.json`

```json
{
"servers": {
"yuque-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "yuque-mcp", "--token=YOUR_YUQUE_TOKEN"]
}
}
}
```

### Windsurf — `.windsurf/mcp.json`

| Client | Template | Destination |
|--------|----------|-------------|
| Cursor | `cursor.json` | `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global) |
| VS Code (requires GitHub Copilot extension) | `vscode.json` | `.vscode/mcp.json` |
| Windsurf | `windsurf.json` | `.windsurf/mcp.json` |
```json
{
"mcpServers": {
"yuque-mcp": {
"command": "npx",
"args": ["-y", "yuque-mcp", "--token=YOUR_YUQUE_TOKEN"]
}
}
}
```

> **Security:** project-level configs contain a plaintext token after replacement — add them to `.gitignore`:
>
Expand Down Expand Up @@ -180,6 +214,5 @@ Functional test inside any client session:
| `node: command not found` | Node.js not installed | Install Node.js >= 20 via nvm (`nvm install 20`) |
| Token test returns 401 | Invalid or expired token | Regenerate at <https://www.yuque.com/settings/tokens> |
| MCP server fails to start | Token not reaching the process | Pass `--token=...` or set `YUQUE_PERSONAL_TOKEN` in the server env |
| Plugin not found in marketplace | Marketplace not registered | Re-run `claude plugin marketplace add yuque/yuque-ecosystem` |
| Skills not discovered | Wrong skills directory | Check your client's skills path (see its section above) |
| `ECONNREFUSED` / timeout | Network blocking yuque.com | `curl -I https://www.yuque.com` |
5 changes: 0 additions & 5 deletions CHANGELOG.md

This file was deleted.

36 changes: 12 additions & 24 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,41 @@
|---|---|---|
| Capability | MCP Server (npm: `yuque-mcp`) | [yuque-mcp-server](https://github.com/yuque/yuque-mcp-server) |
| Asset | Knowledge-management skills (single source, standard SKILL.md format) | [`skills/`](./skills/) |
| Distribution | Claude Code Marketplace packaging + all-client install guide | [`plugins/yuque-personal/`](./plugins/yuque-personal/) · [`AGENT-INSTALL.md`](./AGENT-INSTALL.md) |
| Distribution | AGENT-INSTALL.md all-client install guide (copy skills/ to install) | [`AGENT-INSTALL.md`](./AGENT-INSTALL.md) |
| Storefront | Website (showcase + install guides) | [`website/`](./website/) |

SKILL.md is a cross-client format — OpenCode, OpenClaw, and any other skills-capable client can copy [`skills/`](./skills/) into their own skills directory directly; no dedicated adapter layer needed. Claude Code is the one channel with formal packaging (one-command marketplace install with updates).
SKILL.md is a cross-client format — OpenCode, OpenClaw, and any other skills-capable client can copy [`skills/`](./skills/) into their own skills directory directly; no dedicated adapter layer needed. Every client uses the same two steps: configure MCP and copy `skills/`.

## Repository Structure

```
yuque-ecosystem/
├── skills/ # ★ The asset: 8 knowledge-management skills (single source)
├── AGENT-INSTALL.md # All-client install guide (directly executable by agents)
├── plugins/
│ └── yuque-personal/ # Claude Code Marketplace packaging
│ ├── .claude-plugin/ # plugin.json
│ ├── .mcp.json # MCP server config
│ └── skills/ # synced copy (do not edit; CI checks drift)
├── shared/
│ └── mcp-config/ # MCP config templates for Cursor / VS Code / Windsurf, etc.
├── scripts/ # sync-skills.mjs — skills/ → plugin copy
├── website/ # Official website (GitHub Pages)
└── .claude-plugin/ # Claude Code Marketplace entry
├── scripts/ # Validation scripts
└── .github/ # CI, preview, and deployment workflows
```

> **The team edition (yuque-group) is temporarily withdrawn**: its skills depend on group-statistics MCP tools (`yuque_group_*`) that are not yet available in `yuque-mcp`. It will return once the underlying tools ship. See git history for the previous code.

## Quick Start

### Claude Code (recommended — the formally packaged channel)
### Claude Code

```bash
claude plugin marketplace add yuque/yuque-ecosystem
claude plugin install yuque-personal@yuque
export YUQUE_TOKEN="your_token" # the plugin reads the token from this env var
```

MCP tools only, no skills:
# 1. Configure MCP
claude mcp add yuque-mcp -- npx -y yuque-mcp --token=$YUQUE_TOKEN

```bash
claude mcp add yuque-mcp -- npx -y yuque-mcp --token=YOUR_TOKEN
# 2. Copy skills
REPO_DIR="/path/to/yuque-ecosystem"
mkdir -p ~/.claude/skills
cp -r "$REPO_DIR/skills/"* ~/.claude/skills/
```

### Any other client (OpenCode / OpenClaw / Cursor / VS Code / Windsurf …)

Two generic steps: ① configure `yuque-mcp` using a template from [`shared/mcp-config/`](./shared/mcp-config/); ② if the client supports skills, copy [`skills/`](./skills/) into its skills directory.
Two generic steps: ① configure `yuque-mcp`; ② if the client supports skills, copy [`skills/`](./skills/) into its skills directory.

Per-client commands live in [`AGENT-INSTALL.md`](./AGENT-INSTALL.md) — hand that file to your AI agent and it will install everything.

Expand All @@ -69,9 +60,6 @@ Per-client commands live in [`AGENT-INSTALL.md`](./AGENT-INSTALL.md) — hand th
```bash
# Website development
cd website && npm install && npm run dev

# After editing skills, sync the plugin copy (CI checks drift)
npm run sync-skills
```

## Links
Expand Down
36 changes: 12 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,41 @@
|---|---|---|
| 能力层 | MCP Server(npm: `yuque-mcp`) | [yuque-mcp-server](https://github.com/yuque/yuque-mcp-server) |
| 资产层 | 知识管理 Skills(唯一源,标准 SKILL.md 格式) | [`skills/`](./skills/) |
| 分发层 | Claude Code Marketplace 打包 + 全客户端安装指南 | [`plugins/yuque-personal/`](./plugins/yuque-personal/) · [`AGENT-INSTALL.md`](./AGENT-INSTALL.md) |
| 分发层 | AGENT-INSTALL.md 全客户端安装指南(复制 skills/ 即安装) | [`AGENT-INSTALL.md`](./AGENT-INSTALL.md) |
| 门面层 | 官网(展示 + 安装引导) | [`website/`](./website/) |

SKILL.md 是跨客户端的通用格式——OpenCode、OpenClaw 等客户端直接把 [`skills/`](./skills/) 拷进各自的 skills 目录即可,无需专门的适配层。Claude Code 是唯一保留正式打包的渠道(marketplace 一键安装 + 更新机制)
SKILL.md 是跨客户端的通用格式——OpenCode、OpenClaw 等客户端直接把 [`skills/`](./skills/) 拷进各自的 skills 目录即可,无需专门的适配层。所有客户端统一走「配 MCP + 复制 skills/」两步

## Repository Structure

```
yuque-ecosystem/
├── skills/ # ★ 资产:8 个知识管理 Skills(唯一源)
├── AGENT-INSTALL.md # 全客户端安装指南(agent 可直接执行)
├── plugins/
│ └── yuque-personal/ # Claude Code Marketplace 打包
│ ├── .claude-plugin/ # plugin.json
│ ├── .mcp.json # MCP server 配置
│ └── skills/ # 同步副本(勿直接修改,CI 校验漂移)
├── shared/
│ └── mcp-config/ # Cursor / VS Code / Windsurf 等 MCP 配置模板
├── scripts/ # sync-skills.mjs — skills/ → 插件目录
├── website/ # 官网(GitHub Pages)
└── .claude-plugin/ # Claude Code Marketplace 入口
├── scripts/ # 校验脚本
└── .github/ # CI、预览与部署工作流
```

> **团队版(yuque-group)已暂时下线**:其 skills 依赖的团队统计类 MCP 工具(`yuque_group_*`)尚未在 `yuque-mcp` 中提供,待底层工具就绪后再重新上架。历史代码见 git 记录。

## Quick Start

### Claude Code(推荐,正式打包渠道)
### Claude Code

```bash
claude plugin marketplace add yuque/yuque-ecosystem
claude plugin install yuque-personal@yuque
export YUQUE_TOKEN="your_token" # 插件通过该环境变量读取 Token
```

仅要 MCP 工具、不要 Skills:
# 1. 配置 MCP
claude mcp add yuque-mcp -- npx -y yuque-mcp --token=$YUQUE_TOKEN

```bash
claude mcp add yuque-mcp -- npx -y yuque-mcp --token=YOUR_TOKEN
# 2. 复制 Skills
REPO_DIR="/path/to/yuque-ecosystem"
mkdir -p ~/.claude/skills
cp -r "$REPO_DIR/skills/"* ~/.claude/skills/
```

### 其他客户端(OpenCode / OpenClaw / Cursor / VS Code / Windsurf …)

两步通用:① 用 [`shared/mcp-config/`](./shared/mcp-config/) 的模板配好 `yuque-mcp`;② 客户端若支持 skills,把 [`skills/`](./skills/) 拷进它的 skills 目录。
两步通用:① 配好 `yuque-mcp`;② 客户端若支持 skills,把 [`skills/`](./skills/) 拷进它的 skills 目录。

各客户端的具体命令见 [`AGENT-INSTALL.md`](./AGENT-INSTALL.md) —— 把这个文件直接丢给你的 AI agent,它就会装。

Expand All @@ -69,9 +60,6 @@ claude mcp add yuque-mcp -- npx -y yuque-mcp --token=YOUR_TOKEN
```bash
# 官网开发
cd website && npm install && npm run dev

# 修改 skills 后同步插件副本(CI 会校验漂移)
npm run sync-skills
```

## Links
Expand Down
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
"name": "yuque-ecosystem",
"private": true,
"workspaces": [
"website"
],
"scripts": {
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"sync-skills": "node scripts/sync-skills.mjs",
"check-skills": "node scripts/sync-skills.mjs --check"
"check-skills": "node scripts/validate-skills.mjs"
},
"devDependencies": {
"conventional-changelog-cli": "^5.0.0"
}
"workspaces": [
"website"
]
}
12 changes: 0 additions & 12 deletions plugins/yuque-personal/.claude-plugin/plugin.json

This file was deleted.

11 changes: 0 additions & 11 deletions plugins/yuque-personal/.mcp.json

This file was deleted.

51 changes: 0 additions & 51 deletions plugins/yuque-personal/README.md

This file was deleted.

Loading
Loading