From 92686d7bf193be12e726355cab2fbb485bdd056c Mon Sep 17 00:00:00 2001 From: cwg <1227646458@qq.com> Date: Wed, 15 Jul 2026 12:18:06 +0900 Subject: [PATCH 1/4] =?UTF-8?q?refactor!:=20remove=20the=20plugin=20system?= =?UTF-8?q?=20=E2=80=94=20the=20repo=20is=20skills=20+=20website=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Executed by Codex (gpt-5.6-sol), designed and reviewed by Claude. - Delete plugins/, .claude-plugin/, shared/mcp-config/, sync-skills.mjs, and the empty CHANGELOG shell + conventional-changelog dep - Claude Code installs like every other client now: claude mcp add + copy skills/ into ~/.claude/skills (the marketplace channel is retired) - Inline the Cursor / VS Code / Windsurf config templates into AGENT-INSTALL.md; drop the sync CI step Co-Authored-By: Claude Fable 5 --- .claude-plugin/marketplace.json | 22 -- .github/workflows/check.yml | 3 - AGENT-INSTALL.md | 79 +++++-- CHANGELOG.md | 5 - README.en.md | 36 +-- README.md | 36 +-- package.json | 10 +- .../yuque-personal/.claude-plugin/plugin.json | 12 - plugins/yuque-personal/.mcp.json | 11 - plugins/yuque-personal/README.md | 51 ---- .../skills/daily-capture/SKILL.md | 215 ----------------- .../skills/knowledge-connect/SKILL.md | 198 ---------------- .../skills/note-refine/SKILL.md | 166 ------------- .../skills/reading-digest/SKILL.md | 166 ------------- .../skills/smart-search/SKILL.md | 120 ---------- .../skills/smart-summary/SKILL.md | 209 ----------------- .../skills/stale-detector/SKILL.md | 198 ---------------- .../skills/style-extract/SKILL.md | 222 ------------------ scripts/sync-skills.mjs | 75 ------ shared/mcp-config/README.en.md | 51 ---- shared/mcp-config/README.md | 51 ---- shared/mcp-config/cursor.json | 8 - shared/mcp-config/opencode.json | 10 - shared/mcp-config/vscode.json | 9 - shared/mcp-config/windsurf.json | 8 - 25 files changed, 81 insertions(+), 1890 deletions(-) delete mode 100644 .claude-plugin/marketplace.json delete mode 100644 CHANGELOG.md delete mode 100644 plugins/yuque-personal/.claude-plugin/plugin.json delete mode 100644 plugins/yuque-personal/.mcp.json delete mode 100644 plugins/yuque-personal/README.md delete mode 100644 plugins/yuque-personal/skills/daily-capture/SKILL.md delete mode 100644 plugins/yuque-personal/skills/knowledge-connect/SKILL.md delete mode 100644 plugins/yuque-personal/skills/note-refine/SKILL.md delete mode 100644 plugins/yuque-personal/skills/reading-digest/SKILL.md delete mode 100644 plugins/yuque-personal/skills/smart-search/SKILL.md delete mode 100644 plugins/yuque-personal/skills/smart-summary/SKILL.md delete mode 100644 plugins/yuque-personal/skills/stale-detector/SKILL.md delete mode 100644 plugins/yuque-personal/skills/style-extract/SKILL.md delete mode 100644 scripts/sync-skills.mjs delete mode 100644 shared/mcp-config/README.en.md delete mode 100644 shared/mcp-config/README.md delete mode 100644 shared/mcp-config/cursor.json delete mode 100644 shared/mcp-config/opencode.json delete mode 100644 shared/mcp-config/vscode.json delete mode 100644 shared/mcp-config/windsurf.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json deleted file mode 100644 index d32e7dc..0000000 --- a/.claude-plugin/marketplace.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "yuque", - "owner": { - "name": "yuque" - }, - "metadata": { - "description": "语雀 AI 生态 — MCP Tools and Skills for Yuque", - "version": "2.1.0" - }, - "plugins": [ - { - "name": "yuque-personal", - "description": "语雀个人版 — 个人知识库 AI 集成,MCP Tools + 8 Skills", - "version": "1.1.0", - "author": { - "name": "yuque" - }, - "source": "./plugins/yuque-personal", - "category": "productivity" - } - ] -} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5c84099..5db2955 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -15,9 +15,6 @@ jobs: with: node-version: 20 - - name: Skills copies in sync with canonical source - run: node scripts/sync-skills.mjs --check - - name: JSON manifests are valid run: | set -e diff --git a/AGENT-INSTALL.md b/AGENT-INSTALL.md index 908319a..7f2c4eb 100644 --- a/AGENT-INSTALL.md +++ b/AGENT-INSTALL.md @@ -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 -# 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 @@ -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`: > @@ -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 | | 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` | diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index d3311ca..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -This changelog is automatically generated based on [Conventional Commits](https://www.conventionalcommits.org/). diff --git a/README.en.md b/README.en.md index b712536..5d378b8 100644 --- a/README.en.md +++ b/README.en.md @@ -17,10 +17,10 @@ |---|---|---| | 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 @@ -28,39 +28,30 @@ SKILL.md is a cross-client format — OpenCode, OpenClaw, and any other skills-c 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. @@ -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 diff --git a/README.md b/README.md index b7ada9e..5665866 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,10 @@ |---|---|---| | 能力层 | 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 @@ -28,39 +28,30 @@ SKILL.md 是跨客户端的通用格式——OpenCode、OpenClaw 等客户端直 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,它就会装。 @@ -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 diff --git a/package.json b/package.json index 467e288..feca1d9 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,5 @@ "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" - }, - "devDependencies": { - "conventional-changelog-cli": "^5.0.0" - } + ] } diff --git a/plugins/yuque-personal/.claude-plugin/plugin.json b/plugins/yuque-personal/.claude-plugin/plugin.json deleted file mode 100644 index 9d0f75b..0000000 --- a/plugins/yuque-personal/.claude-plugin/plugin.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "yuque-personal", - "description": "语雀个人版 — 个人知识库 AI 集成,MCP Tools + 8 Skills", - "version": "1.1.0", - "author": { - "name": "yuque" - }, - "homepage": "https://yuque.github.io/yuque-ecosystem/", - "repository": "https://github.com/yuque/yuque-ecosystem", - "license": "MIT", - "skills": "./skills/" -} diff --git a/plugins/yuque-personal/.mcp.json b/plugins/yuque-personal/.mcp.json deleted file mode 100644 index 937d0e7..0000000 --- a/plugins/yuque-personal/.mcp.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "mcpServers": { - "yuque": { - "command": "npx", - "args": ["-y", "yuque-mcp@latest"], - "env": { - "YUQUE_PERSONAL_TOKEN": "${YUQUE_TOKEN}" - } - } - } -} diff --git a/plugins/yuque-personal/README.md b/plugins/yuque-personal/README.md deleted file mode 100644 index 4b67d6d..0000000 --- a/plugins/yuque-personal/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# 语雀个人版 Plugin / Yuque Personal Plugin - -个人知识库 AI 集成 — MCP Tools + 8 Skills。 - -> **本目录是 Claude Code Marketplace 的打包层**:`skills/` 是从仓库根目录 [`skills/`](../../skills/)(唯一源)同步的副本,请勿直接修改——改动请提交到唯一源后运行 `npm run sync-skills`(CI 会校验漂移)。 - -语雀 = 第二大脑,Skills = AI 认知能力。 - -## Skills - -按知识管理生命周期组织: - -### 📥 输入 - -| Skill | 描述 | -|-------|------| -| `reading-digest` | 阅读文章后自动提取核心观点、金句、行动项,生成结构化阅读笔记 | -| `daily-capture` | 碎片想法收集,定期整理成主题笔记,帮你把灵感变成知识 | - -### 🧠 加工 - -| Skill | 描述 | -|-------|------| -| `note-refine` | 把粗糙笔记打磨成高质量文档,补充结构、优化表达、改善排版 | -| `knowledge-connect` | 分析知识库文档间的关联,发现隐藏联系,建议交叉引用,构建知识网络 | -| `style-extract` | 分析你的写作风格,生成风格画像,帮你保持一致的文风写新内容 | - -### 📤 输出 - -| Skill | 描述 | -|-------|------| -| `smart-search` | 自然语言搜索个人语雀文档,智能摘要回答 | -| `smart-summary` | 对任意文档/知识库生成不同粒度的摘要(一句话、要点、详细) | - -### 🔄 维护 - -| Skill | 描述 | -|-------|------| -| `stale-detector` | 扫描知识库发现过期文档,生成健康报告,建议更新或归档 | - -## 配置 - -需要设置 `YUQUE_TOKEN` 环境变量: - -```bash -export YUQUE_TOKEN="your-personal-token" -``` - -获取方式:登录 [语雀](https://www.yuque.com) → 个人设置 → Token → 新建 - -> **从旧版本升级?** v1.0.x 读取的是 `YUQUE_PERSONAL_TOKEN`,v1.1.0 起统一为 `YUQUE_TOKEN`(与其余文档一致)。请重命名你的环境变量。 diff --git a/plugins/yuque-personal/skills/daily-capture/SKILL.md b/plugins/yuque-personal/skills/daily-capture/SKILL.md deleted file mode 100644 index c6f95bc..0000000 --- a/plugins/yuque-personal/skills/daily-capture/SKILL.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -name: daily-capture -description: Collect fleeting ideas and thoughts throughout the day, then periodically organize them into structured thematic notes in your Yuque knowledge base. For personal/individual use. -license: Apache-2.0 -compatibility: Requires yuque-mcp server connected to a Yuque account with personal Token -metadata: - author: yuque - version: "1.0" ---- - -# Daily Capture — Fleeting Ideas to Structured Notes - -Capture random thoughts, inspirations, and fragments throughout the day. Periodically organize and merge them into structured thematic notes saved to your Yuque knowledge base. - -## When to Use - -- User wants to quickly jot down an idea or thought -- User says "记一下", "随手记", "我有个想法", "capture this", "先记着" -- User wants to review and organize accumulated captures -- User says "整理一下我最近的想法", "把碎片笔记归类", "organize my captures" - -## Required MCP Tools - -All tools are from the `yuque-mcp` server: - -- `yuque_search` — Search for existing capture documents or thematic notes -- `yuque_get_doc` — Read existing capture log or thematic notes -- `yuque_create_doc` — Create new capture log or thematic notes -- `yuque_update_doc` — Append to capture log or update thematic notes -- `yuque_list_books` — List knowledge bases to find the target repo - -## Workflow - -### Phase A: Quick Capture - -When the user shares a fleeting idea or thought: - -#### Step 1: Receive the Input - -Accept the user's input as-is. It can be: -- A sentence or fragment -- A question they want to explore later -- A link with a brief comment -- A random observation or insight - -#### Step 2: Classify the Capture - -Assign a lightweight tag based on content: - -| Tag | When to Use | -|-----|-------------| -| 💡 想法 | Original ideas, hypotheses, "what if" thoughts | -| 📌 待办 | Things to do or follow up on | -| 🔗 参考 | Links, references, things to read later | -| 💬 摘录 | Quotes or snippets from conversations | -| ❓ 问题 | Questions to research or think about | -| 🎯 灵感 | Creative sparks, project ideas | - -#### Step 3: Append to Capture Log - -Find or create a daily capture log document: - -``` -Tool: yuque_search -Parameters: - query: "每日碎片 YYYY-MM-DD" - type: "doc" -``` - -If no log exists for today, create one: - -``` -Tool: yuque_create_doc -Parameters: - repo_id: "" - title: "📝 每日碎片 — YYYY-MM-DD" - body: "" -``` - -If the log exists, append the new capture: - -``` -Tool: yuque_update_doc -Parameters: - repo_id: "" - doc_id: "" - body: "" -``` - -Each capture entry format: - -```markdown -### [HH:MM] [Tag] 简短标题 - -[用户的原始内容] - ---- -``` - -Confirm to the user: "已记录 ✅ — [tag] [简短标题]" - -### Phase B: Organize and Merge - -When the user asks to organize their captures, or when there are enough accumulated entries: - -#### Step 1: Gather Recent Captures - -Search for recent capture logs: - -``` -Tool: yuque_search -Parameters: - query: "每日碎片" - type: "doc" -``` - -Fetch the content of recent capture logs (last 7 days or as specified by the user). - -#### Step 2: Analyze and Group - -Read through all captures and group them by theme: - -1. **Identify themes** — Find captures that relate to the same topic, project, or idea -2. **Detect connections** — Note captures that build on each other or are complementary -3. **Flag actionable items** — Separate TODO items from reflective thoughts - -Present the grouping to the user: - -```markdown -## 📊 碎片整理预览 - -过去 [N] 天共 [X] 条碎片,归为 [Y] 个主题: - -### 主题 1:[主题名称]([N] 条相关) -- [碎片摘要 1] -- [碎片摘要 2] -- [碎片摘要 3] - -### 主题 2:[主题名称]([N] 条相关) -- [碎片摘要 1] -- [碎片摘要 2] - -### 🔮 未归类([N] 条) -- [碎片摘要] - -要把哪些主题合并成正式笔记? -``` - -#### Step 3: Generate Thematic Notes - -For each theme the user confirms, generate a structured note: - -```markdown -# [主题标题] - -> 📅 整理自 YYYY-MM-DD ~ YYYY-MM-DD 的碎片笔记 -> 📝 包含 [N] 条相关想法 - -## 核心想法 - -[将相关碎片整合成连贯的叙述,保留原始洞察] - -## 关键要点 - -1. **[要点 1]**:[展开说明] -2. **[要点 2]**:[展开说明] -3. **[要点 3]**:[展开说明] - -## 待探索 - -- [ ] [从碎片中提取的待办或待研究项] -- [ ] [延伸问题] - -## 原始碎片 - -
-查看原始记录 - -[按时间排列的原始碎片内容] - -
-``` - -#### Step 4: Save Thematic Notes - -``` -Tool: yuque_create_doc -Parameters: - repo_id: "" - title: "[主题标题]" - body: "" -``` - -Confirm: "主题笔记「[主题标题]」已保存到「[知识库名称]」:[文档链接]" - -## Guidelines - -- Always answer in the same language the user used (Chinese or English) -- Quick capture should be instant — don't over-process, just record and confirm -- Preserve the user's original wording in captures — don't rephrase their thoughts -- When organizing, respect the user's intent — ask before merging if themes are ambiguous -- Don't force organization — some captures are standalone and that's fine -- The "未归类" category is valid — not everything needs a theme -- Suggest organizing when captures accumulate (e.g., > 15 unorganized items) - -## Error Handling - -| Situation | Action | -|-----------|--------| -| Document not found (404) | Create a new capture log for today | -| Permission denied (403) | Tell user they may lack permission to access or edit this document | -| Target repo not found | List user's repos with `yuque_list_books` and ask them to pick one | -| `yuque_create_doc` fails | Present the capture/note in chat and suggest manual saving | -| No captures found for organization | Inform user: "最近没有找到碎片记录,先随手记几条吧!" | -| Capture content is empty | Ask user: "你想记录什么?" | diff --git a/plugins/yuque-personal/skills/knowledge-connect/SKILL.md b/plugins/yuque-personal/skills/knowledge-connect/SKILL.md deleted file mode 100644 index e30af51..0000000 --- a/plugins/yuque-personal/skills/knowledge-connect/SKILL.md +++ /dev/null @@ -1,198 +0,0 @@ ---- -name: knowledge-connect -description: Analyze documents in your Yuque knowledge base, discover hidden connections between them (similar topics, complementary content), and suggest cross-reference links to build a knowledge network. For personal/individual use. -license: Apache-2.0 -compatibility: Requires yuque-mcp server connected to a Yuque account with personal Token -metadata: - author: yuque - version: "1.0" ---- - -# Knowledge Connect — Discover Links Between Your Notes - -Analyze documents in your Yuque knowledge base, find hidden connections between them — similar topics, complementary content, shared concepts — and suggest cross-reference links to help you build a connected knowledge network. - -## When to Use - -- User wants to find connections between their notes -- User says "帮我找找文档之间的关联", "哪些笔记是相关的", "connect my notes" -- User just finished writing a document and wants to link it to related ones -- User says "这篇文档和哪些笔记有关", "find related documents" -- User wants to build a knowledge graph from their existing notes - -## Required MCP Tools - -All tools are from the `yuque-mcp` server: - -- `yuque_list_books` — List user's knowledge bases -- `yuque_list_docs` — List all documents in a knowledge base -- `yuque_get_doc` — Read document content for analysis -- `yuque_search` — Search for potentially related documents -- `yuque_update_doc` — Add cross-reference links to documents - -## Workflow - -### Step 1: Determine the Scope - -Ask the user what to analyze: - -**Case A — Single document:** -User provides a specific document link. Find connections for this one document. - -**Case B — Entire knowledge base:** -User specifies a knowledge base. Analyze all documents within it. - -**Case C — Across knowledge bases:** -User wants cross-repo connections. Analyze documents across multiple repos. - -For Case B/C, first list available repos: - -``` -Tool: yuque_list_books -``` - -Then list documents in the target repo(s): - -``` -Tool: yuque_list_docs -Parameters: - repo_id: "" -``` - -### Step 2: Analyze Documents - -For each document in scope, fetch its content: - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" - doc_id: "" -``` - -Extract the following from each document: - -| Element | Description | -|---------|-------------| -| **Topics** | Main subjects the document covers | -| **Key Concepts** | Important terms, frameworks, or ideas | -| **Questions** | Questions raised but not fully answered | -| **References** | External sources or concepts mentioned | -| **Domain** | The knowledge area (tech, management, personal, etc.) | - -### Step 3: Discover Connections - -Compare documents pairwise and identify these types of connections: - -| Connection Type | Description | Example | -|----------------|-------------|---------| -| 🔄 **Same Topic** | Documents covering the same subject from different angles | Two articles about "distributed systems" | -| 🧩 **Complementary** | One document answers questions raised in another | A "why microservices" doc + a "microservices pitfalls" doc | -| 📚 **Sequential** | Documents that form a natural reading sequence | "Intro to X" → "Advanced X" → "X in Practice" | -| 🌱 **Evolution** | Earlier and later thinking on the same topic | A draft idea → a refined version months later | -| 🔗 **Shared Concept** | Documents that reference the same key concept | Multiple docs mentioning "second brain" methodology | - -For single-document analysis, also search for related documents: - -``` -Tool: yuque_search -Parameters: - query: "[key topics from the document]" - type: "doc" -``` - -### Step 4: Present Connection Map - -Present the discovered connections to the user: - -```markdown -## 🕸️ 知识关联分析 - -分析范围:[知识库名称] — [N] 篇文档 -发现 [X] 组关联 - -### 关联 1:[主题/概念名称] - -| 文档 | 关联类型 | 关联强度 | -|------|----------|----------| -| [文档 A 标题](链接) | 🔄 同主题 | ⭐⭐⭐ | -| [文档 B 标题](链接) | 🧩 互补 | ⭐⭐⭐ | -| [文档 C 标题](链接) | 🔗 共享概念 | ⭐⭐ | - -**关联说明**:[为什么这些文档相关,它们之间的具体联系是什么] - -**建议**:[具体的交叉引用建议,如 "在文档 A 的第二节末尾添加指向文档 B 的链接"] - -### 关联 2:[主题/概念名称] - -... - -### 🏝️ 孤岛文档 - -以下文档暂未发现明显关联: -- [文档标题](链接) — 可能需要补充更多内容后再分析 - -### 💡 建议 - -1. [建议 1:如 "建议创建一篇索引文档,串联关于 X 主题的 5 篇笔记"] -2. [建议 2:如 "文档 A 和文档 B 观点互补,可以合并成一篇完整的指南"] -``` - -### Step 5: Add Cross-References (Optional) - -Ask the user: "要自动在相关文档中添加交叉引用链接吗?" - -If confirmed, for each document that needs cross-references: - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" - doc_id: "" -``` - -Append a "Related Notes" section at the end: - -```markdown - ---- - -## 📎 相关笔记 - -- 🔄 [相关文档标题](链接) — [一句话说明关联] -- 🧩 [相关文档标题](链接) — [一句话说明关联] - -*由 AI 分析生成的关联推荐 — YYYY-MM-DD* -``` - -``` -Tool: yuque_update_doc -Parameters: - repo_id: "" - doc_id: "" - body: "" -``` - -Confirm: "已为 [N] 篇文档添加了交叉引用链接 ✅" - -## Guidelines - -- Always answer in the same language the user used (Chinese or English) -- Connection strength should be based on actual content overlap, not just title similarity -- Be specific about why documents are connected — vague "they're related" is not helpful -- Don't force connections — if two documents aren't meaningfully related, don't link them -- For large knowledge bases (> 50 docs), suggest analyzing in batches by topic area -- The "孤岛文档" section is valuable — it helps users identify notes that need more context -- When adding cross-references, never modify the original content — only append at the end -- Suggest creating index/hub documents for topics with 3+ related notes - -## Error Handling - -| Situation | Action | -|-----------|--------| -| Document not found (404) | Skip the document and note it in the report | -| Permission denied (403) | Tell user they may lack permission to access this document | -| Knowledge base is empty | Inform user: "该知识库还没有文档,先写几篇笔记再来分析关联吧" | -| Knowledge base has < 3 documents | Inform user: "文档数量较少,建议积累更多笔记后再做关联分析,效果会更好" | -| `yuque_update_doc` fails | Present the suggested cross-references in chat for manual adding | -| Too many documents to analyze at once | Suggest narrowing scope: "知识库文档较多,建议先选一个主题方向分析" | diff --git a/plugins/yuque-personal/skills/note-refine/SKILL.md b/plugins/yuque-personal/skills/note-refine/SKILL.md deleted file mode 100644 index 82fc21c..0000000 --- a/plugins/yuque-personal/skills/note-refine/SKILL.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -name: note-refine -description: Polish rough notes into high-quality documents — add structure, improve expression, and enhance formatting while preserving the original meaning. For personal/individual use. -license: Apache-2.0 -compatibility: Requires yuque-mcp server connected to a Yuque account with personal Token -metadata: - author: yuque - version: "1.0" ---- - -# Note Refine — Polish Rough Notes into Quality Documents - -Transform rough, unstructured notes into well-organized, readable documents. Adds proper headings, table of contents, improves expression, and enhances formatting — all while preserving the original meaning. - -## When to Use - -- User has a rough draft or messy notes they want to clean up -- User says "帮我整理一下这篇笔记", "polish my notes", "把这个文档排版优化一下" -- User wants to improve readability of an existing Yuque document -- User has bullet points or fragments they want turned into a proper document - -## Required MCP Tools - -All tools are from the `yuque-mcp` server: - -- `yuque_get_doc` — Read the original document content -- `yuque_update_doc` — Update the document with refined content - -## Workflow - -### Step 1: Get the Source Notes - -**Case A — Yuque document link:** -Extract `repo_id` and `doc_id` from the URL and fetch the content: - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" - doc_id: "" -``` - -**Case B — User pastes text directly:** -Use the provided text as the source content. No tool call needed. - -If the document is not found (404) or permission denied (403), inform the user and stop. - -### Step 2: Analyze the Current State - -Before refining, assess the notes on these dimensions: - -| Dimension | What to Check | -|-----------|---------------| -| **Structure** | Are there headings? Is there a logical flow? | -| **Completeness** | Are sentences complete? Are there dangling thoughts? | -| **Formatting** | Consistent use of lists, code blocks, emphasis? | -| **Readability** | Paragraph length, sentence clarity, jargon usage? | -| **Organization** | Is related content grouped together? | - -Mentally categorize the refinement level needed: - -- **Light polish** — Good structure, just needs formatting and minor wording fixes -- **Medium refine** — Has content but needs reorganization and better headings -- **Heavy restructure** — Fragments and bullet points that need to become a proper document - -### Step 3: Refine the Content - -Apply the following improvements while strictly preserving the original meaning: - -**Structure improvements:** -- Add a clear title if missing -- Add hierarchical headings (H2, H3) to break content into logical sections -- Reorder content so related ideas are grouped together -- Add a brief introduction paragraph if the document jumps straight into details - -**Expression improvements:** -- Complete sentence fragments into full sentences -- Fix grammatical errors and typos -- Replace vague language with precise terms -- Smooth transitions between sections -- Keep the author's voice and tone — don't make casual notes sound like academic papers - -**Formatting improvements:** -- Use bullet lists for parallel items -- Use numbered lists for sequential steps -- Use code blocks for code, commands, or technical content -- Use tables for structured comparisons -- Use bold for key terms on first mention -- Use blockquotes for important callouts -- Ensure consistent formatting throughout - -**What NOT to change:** -- Do not add new information or opinions not present in the original -- Do not remove content the author wrote (unless it's clearly a duplicate) -- Do not change technical terms or proper nouns -- Do not alter the author's conclusions or viewpoints -- Do not over-formalize casual notes if the user didn't ask for it - -### Step 4: Present the Refined Version - -Show the user a comparison summary and the refined document: - -```markdown -## ✨ 笔记优化完成 - -### 优化概览 - -| 项目 | 优化前 | 优化后 | -|------|--------|--------| -| 结构 | [e.g., 无标题,纯文本] | [e.g., 3 个章节,层级清晰] | -| 段落数 | X | Y | -| 字数 | ~X 字 | ~Y 字 | - -### 主要改动 - -1. [改动 1:e.g., 添加了三级标题结构] -2. [改动 2:e.g., 将零散要点整合为完整段落] -3. [改动 3:e.g., 统一了列表格式] - ---- - -[完整的优化后文档内容] -``` - -### Step 5: Save Changes (Optional) - -Ask the user: "要把优化后的内容更新到原文档吗?" - -**If the user confirms and the source was a Yuque document:** - -``` -Tool: yuque_update_doc -Parameters: - repo_id: "" - doc_id: "" - body: "" -``` - -After saving, confirm: "文档已更新:[文档链接]" - -**If the user wants to keep the original and save as a new version:** -Inform the user: "语雀会自动保留历史版本,更新后你仍然可以在版本历史中查看原始内容。" - -**If the source was pasted text:** -Just present the refined version in chat. If the user wants to save it, ask which knowledge base and use `yuque_create_doc`. - -## Guidelines - -- Always answer in the same language as the original notes (Chinese or English) -- The golden rule: **preserve meaning, improve form** -- Show the user what you changed and why — transparency builds trust -- For light polish, don't over-engineer — sometimes notes just need minor fixes -- For heavy restructure, confirm the proposed structure with the user before saving -- If the notes contain TODO items or unfinished thoughts, preserve them as-is (mark with `` if needed) -- Respect the author's writing style — don't turn informal notes into formal reports unless asked - -## Error Handling - -| Situation | Action | -|-----------|--------| -| Document not found (404) | Inform user the document may have been deleted or the link is incorrect | -| Permission denied (403) | Tell user they may lack permission to access or edit this document | -| Document content is empty | Inform user: "该文档内容为空,没有可优化的内容" | -| `yuque_update_doc` fails | Present the refined content in chat and suggest the user copy-paste it manually | -| Content is already well-structured | Tell the user: "这篇文档结构已经很清晰了,只做了少量微调" — don't force unnecessary changes | -| Content is too short (< 50 chars) | Inform user the content is too brief to meaningfully refine, ask if they want to expand it instead | diff --git a/plugins/yuque-personal/skills/reading-digest/SKILL.md b/plugins/yuque-personal/skills/reading-digest/SKILL.md deleted file mode 100644 index 144b70a..0000000 --- a/plugins/yuque-personal/skills/reading-digest/SKILL.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -name: reading-digest -description: Extract core insights, golden quotes, and action items from articles, then generate structured reading notes and save them to a specified Yuque knowledge base. For personal/individual use. -license: Apache-2.0 -compatibility: Requires yuque-mcp server connected to a Yuque account with personal Token -metadata: - author: yuque - version: "1.0" ---- - -# Reading Digest — Structured Reading Notes Generator - -Read an article or document, extract core insights, golden quotes, and action items, then generate structured reading notes and optionally save them to a Yuque knowledge base. - -## When to Use - -- User has finished reading an article and wants to capture key takeaways -- User says "帮我做阅读笔记", "extract key points from this article", "读书笔记" -- User shares a Yuque document link and wants structured notes -- User wants to build a personal reading notes knowledge base - -## Required MCP Tools - -All tools are from the `yuque-mcp` server: - -- `yuque_get_doc` — Read full document content -- `yuque_list_books` — List user's knowledge bases (to find the target repo for saving) -- `yuque_create_doc` — Create a new document (to save reading notes) -- `yuque_search` — Search for existing reading notes to avoid duplicates - -## Workflow - -### Step 1: Get the Source Article - -**Case A — Yuque document link:** -Extract `repo_id` and `doc_id` from the URL and fetch the content: - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" - doc_id: "" -``` - -**Case B — User pastes article text directly:** -Use the provided text as the source content. No tool call needed. - -**Case C — User provides an external URL:** -Inform the user: "我目前只能处理语雀文档链接或直接粘贴的文本。如果是外部文章,请把内容粘贴给我。" - -If the document is not found (404) or permission denied (403), inform the user and stop. - -### Step 2: Analyze and Extract - -Read through the full content and extract the following elements: - -1. **Core Insights (核心观点)** — The main arguments or ideas the author presents (3-7 items) -2. **Golden Quotes (金句)** — Memorable, well-crafted sentences worth saving (2-5 items) -3. **Action Items (行动项)** — Concrete things the reader can do based on this article (0-5 items) -4. **Key Concepts (关键概念)** — Important terms or frameworks introduced (0-5 items) -5. **Personal Relevance (个人关联)** — How this might connect to the reader's existing knowledge - -### Step 3: Generate Structured Reading Notes - -Format the reading notes as follows: - -```markdown -# 📖 阅读笔记:[原文标题] - -> **来源**:[文档标题](文档链接) -> **作者**:[原文作者] -> **阅读日期**:YYYY-MM-DD -> **阅读耗时**:约 X 分钟(按 300 字/分钟估算) - -## 一句话总结 - -[用一句话概括这篇文章的核心价值] - -## 核心观点 - -1. **[观点标题]**:[展开说明,2-3 句话] -2. **[观点标题]**:[展开说明,2-3 句话] -3. **[观点标题]**:[展开说明,2-3 句话] - -## 金句摘录 - -> [原文金句 1] - -> [原文金句 2] - -> [原文金句 3] - -## 关键概念 - -| 概念 | 解释 | -|------|------| -| [概念 1] | [简要解释] | -| [概念 2] | [简要解释] | - -## 行动项 - -- [ ] [具体可执行的行动 1] -- [ ] [具体可执行的行动 2] -- [ ] [具体可执行的行动 3] - -## 我的思考 - -[基于文章内容,提出 1-2 个延伸思考问题,帮助读者深入反思] - ---- -*由 AI 辅助生成的阅读笔记* -``` - -If the article has no clear action items, omit that section. If there are no notable golden quotes, omit that section too. Adapt the template to fit the content. - -### Step 4: Save to Knowledge Base (Optional) - -Ask the user: "要把这份阅读笔记保存到语雀知识库吗?如果要,请告诉我保存到哪个知识库。" - -If the user specifies a knowledge base: - -First, check if a reading notes document for this article already exists: - -``` -Tool: yuque_search -Parameters: - query: "[原文标题] 阅读笔记" - type: "doc" -``` - -If a duplicate is found, ask the user: "已经存在一份关于这篇文章的阅读笔记,要覆盖还是创建新的?" - -Then create the document: - -``` -Tool: yuque_create_doc -Parameters: - repo_id: "" - title: "📖 阅读笔记:[原文标题]" - body: "" -``` - -After saving, confirm: "阅读笔记已保存到「[知识库名称]」:[新文档链接]" - -If the user doesn't want to save, just present the reading notes in the chat. - -## Guidelines - -- Always answer in the same language the user used (Chinese or English) -- Golden quotes must be exact quotes from the original text — never paraphrase them -- Action items should be specific and actionable, not vague ("学习 React hooks" not "多学习") -- Core insights should capture the author's intent, not your interpretation -- Estimate reading time based on ~300 Chinese characters/minute or ~200 English words/minute -- If the article is very short (< 200 words), simplify the output — skip sections that don't apply -- The "我的思考" section should pose genuine questions, not rhetorical ones - -## Error Handling - -| Situation | Action | -|-----------|--------| -| Document not found (404) | Inform user the document may have been deleted or the link is incorrect | -| Permission denied (403) | Tell user they may lack permission to access this document | -| Document content is empty | Inform user: "该文档内容为空,无法生成阅读笔记" | -| Target repo not found when saving | List user's repos with `yuque_list_books` and ask them to pick one | -| `yuque_create_doc` fails | Inform user the save failed, present the notes in chat instead | -| Article is not text-based (e.g., pure images) | Inform user: "该文档主要是图片内容,无法提取文字进行分析" | diff --git a/plugins/yuque-personal/skills/smart-search/SKILL.md b/plugins/yuque-personal/skills/smart-search/SKILL.md deleted file mode 100644 index f578cb1..0000000 --- a/plugins/yuque-personal/skills/smart-search/SKILL.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -name: smart-search -description: Search your personal Yuque knowledge bases with natural language queries and provide summarized answers with key points and source links. For personal/individual use — searches across your own documents. -license: Apache-2.0 -compatibility: Requires yuque-mcp server connected to a Yuque account with personal Token -metadata: - author: yuque - version: "2.0" ---- - -# Smart Search — Yuque Personal Knowledge Base Search & Q&A - -Search across your personal Yuque knowledge bases using natural language, read relevant documents, and synthesize a clear answer with references. - -## When to Use - -- User asks a question that might be answered by their personal Yuque docs -- User wants to find specific information in their own knowledge base -- User says "搜一下我的文档", "search my Yuque", "我的知识库里有没有..." - -## Required MCP Tools - -All tools are from the `yuque-mcp` server: - -- `yuque_search` — Search documents by keyword -- `yuque_get_doc` — Read full document content by slug/id - -## Workflow - -### Step 1: Extract Search Keywords - -From the user's natural language query, extract 1-3 concise Chinese keywords. Yuque search works best with short, specific terms. - -Examples: -- "我的部署流程文档在哪?" → keywords: `部署流程` -- "How do I handle error logging?" → keywords: `错误日志` or `日志处理` -- "我之前写的技术评审笔记" → keywords: `技术评审` - -### Step 2: Search Documents - -Call `yuque_search` with the extracted keywords: - -``` -Tool: yuque_search -Parameters: - query: "" - type: "doc" -``` - -If the search returns no results: -1. Try alternative keywords (synonyms, broader terms) -2. Try splitting compound terms (e.g., "部署流程" → "部署" or "流程") -3. If still no results, tell the user honestly: "在你的语雀知识库中未找到相关文档,建议尝试其他关键词或确认文档是否存在。" - -### Step 3: Filter and Rank Results - -From the search results, select the top 3-5 most relevant documents based on: -- Title relevance to the query -- Document update time (prefer recent) -- Repository context (focus on user's personal repos) - -### Step 4: Read Document Content - -For each selected document, fetch the full content: - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" # e.g., "username/my-notes" (from search result's book.namespace) - doc_id: "" # e.g., "api" (from search result's target.slug) -``` - -Note: The search result contains nested data. Extract these key fields: -- `target.slug` → use as `doc_id` -- `target.book.namespace` → use as `repo_id` -- `target.title` → document title -- `target.updated_at` → last update time - -Read up to 3 documents. If the first document fully answers the question, you may skip the rest. - -### Step 5: Synthesize and Respond - -Compose the answer in the following format: - -```markdown -## 回答 - -[直接回答用户的问题,2-4 句话,简洁明了] - -## 关键要点 - -- **要点 1**:[从文档中提取的关键信息] -- **要点 2**:[从文档中提取的关键信息] -- **要点 3**:[从文档中提取的关键信息] - -## 参考文档 - -1. [文档标题](文档链接) — 来自「知识库名称」,更新于 YYYY-MM-DD -2. [文档标题](文档链接) — 来自「知识库名称」,更新于 YYYY-MM-DD -``` - -## Guidelines - -- Always answer in the same language the user used (Chinese or English) -- Quote specific content from documents when relevant — use `>` blockquotes -- If documents contain conflicting information, note the discrepancy and mention which doc is more recent -- If the answer is only partially found, say what you found and what's missing -- Never fabricate information not present in the documents -- Include document links so the user can read the full source -- This skill searches the knowledge bases accessible to the configured Yuque token - -## Error Handling - -| Situation | Action | -|-----------|--------| -| `yuque_search` returns empty | Try alternative keywords, then inform user | -| `yuque_get_doc` fails (404) | Skip this doc, note it may have been deleted | -| `yuque_get_doc` fails (403) | Tell user they may lack permission to access this doc | -| API timeout | Retry once, then inform user of connectivity issue | -| Too many results | Focus on top 3 by relevance, mention there are more results available | diff --git a/plugins/yuque-personal/skills/smart-summary/SKILL.md b/plugins/yuque-personal/skills/smart-summary/SKILL.md deleted file mode 100644 index bcb1598..0000000 --- a/plugins/yuque-personal/skills/smart-summary/SKILL.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -name: smart-summary -description: Generate summaries of any Yuque document or knowledge base at different granularity levels — one-liner, key points, or detailed summary. For personal/individual use. -license: Apache-2.0 -compatibility: Requires yuque-mcp server connected to a Yuque account with personal Token -metadata: - author: yuque - version: "1.0" ---- - -# Smart Summary — Yuque Document & Knowledge Base Summarization - -Generate summaries at different granularity levels for any Yuque document or entire knowledge base. Supports one-liner, key points extraction, and detailed summary modes. - -## When to Use - -- User wants a quick summary of a Yuque document or knowledge base -- User says "帮我总结一下这篇文档", "summarize this doc", "这个知识库讲了什么" -- User shares a Yuque document link and asks for a summary -- User wants to quickly understand the content of a repo without reading everything - -## Required MCP Tools - -All tools are from the `yuque-mcp` server: - -- `yuque_get_doc` — Read full document content by slug/id -- `yuque_get_book` — Get knowledge base metadata -- `yuque_list_docs` — List all documents in a knowledge base -- `yuque_get_toc` — Get the table of contents of a knowledge base - -## Workflow - -### Step 1: Identify the Target - -Determine what the user wants summarized: - -**Case A — Single Document:** -The user provides a document link or specifies a document by name. Extract `repo_id` (namespace) and `doc_id` (slug) from the link. - -Yuque doc URL pattern: `https://www.yuque.com/{namespace}/{slug}` - -**Case B — Entire Knowledge Base:** -The user provides a knowledge base link or name. Extract `repo_id` (namespace). - -Yuque repo URL pattern: `https://www.yuque.com/{namespace}` - -If the user's input is ambiguous, ask: "你想总结单篇文档还是整个知识库?" - -### Step 2: Determine Summary Granularity - -Check if the user specified a granularity level. If not, default to **key points**. - -| Level | Trigger Phrases | Output | -|-------|----------------|--------| -| **one-liner** (一句话摘要) | "一句话总结", "简单说说", "TL;DR" | 1 sentence, ≤50 words | -| **key-points** (要点提取) | "要点", "关键点", "summarize" (default) | 5-10 bullet points | -| **detailed** (详细摘要) | "详细总结", "完整摘要", "deep summary" | Structured multi-section summary | - -### Step 3: Fetch Content - -**For a single document:** - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" - doc_id: "" -``` - -**For an entire knowledge base:** - -First, get the TOC to understand the structure: - -``` -Tool: yuque_get_toc -Parameters: - repo_id: "" -``` - -Then list all documents: - -``` -Tool: yuque_list_docs -Parameters: - repo_id: "" -``` - -For knowledge base summaries, read up to 10 key documents (prioritize by TOC order and recent updates). Do NOT try to read every document in a large repo. - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" - doc_id: "" -``` - -If `yuque_get_doc` returns a 404, skip the document and note it may have been deleted. -If `yuque_get_doc` returns a 403, note the user may lack permission. - -### Step 4: Generate Summary - -**One-liner format:** - -```markdown -📝 **一句话摘要**:[一句话概括文档/知识库的核心内容] -``` - -**Key-points format:** - -```markdown -## 📋 要点摘要 - -**文档**:[文档标题](文档链接) -**知识库**:[知识库名称] -**更新时间**:YYYY-MM-DD - -### 核心要点 - -1. **[要点标题]**:[简要说明,1-2 句话] -2. **[要点标题]**:[简要说明,1-2 句话] -3. **[要点标题]**:[简要说明,1-2 句话] -... - -### 一句话总结 - -[用一句话概括全文核心观点] -``` - -**Detailed format:** - -```markdown -## 📖 详细摘要 - -**文档**:[文档标题](文档链接) -**知识库**:[知识库名称] -**更新时间**:YYYY-MM-DD -**字数**:约 X 字 - -### 背景与目的 - -[文档的背景、写作目的,2-3 句话] - -### 主要内容 - -#### [章节 1 标题] -[该章节的核心内容摘要] - -#### [章节 2 标题] -[该章节的核心内容摘要] - -... - -### 核心结论 - -- [结论 1] -- [结论 2] -- [结论 3] - -### 一句话总结 - -[用一句话概括全文] -``` - -**For knowledge base summaries, use this format:** - -```markdown -## 📚 知识库摘要 - -**知识库**:[知识库名称](知识库链接) -**文档数量**:X 篇 -**最近更新**:YYYY-MM-DD - -### 知识库概览 - -[2-3 句话描述这个知识库的主题和用途] - -### 内容结构 - -1. **[分类/目录 1]**(X 篇):[简要描述] -2. **[分类/目录 2]**(X 篇):[简要描述] -... - -### 重点文档 - -1. [文档标题](链接) — [一句话描述] -2. [文档标题](链接) — [一句话描述] -3. [文档标题](链接) — [一句话描述] -``` - -## Guidelines - -- Always answer in the same language the user used (Chinese or English) -- For knowledge base summaries, focus on structure and key documents rather than trying to summarize every single doc -- Preserve the original document's terminology and key concepts -- If the document is very short (< 100 words), just present the content directly instead of summarizing -- Never fabricate content not present in the original document -- Include links back to the original document(s) so the user can read the full source -- When summarizing a knowledge base, respect the TOC order as it reflects the author's intended structure - -## Error Handling - -| Situation | Action | -|-----------|--------| -| Document not found (404) | Inform user the document may have been deleted or the link is incorrect | -| Permission denied (403) | Tell user they may lack permission to access this document | -| Knowledge base is empty | Inform user: "这个知识库目前没有文档" | -| Knowledge base has 50+ docs | Read only the top 10 by TOC order, note that summary covers key documents only | -| Document content is empty | Skip and note: "该文档内容为空" | -| API timeout | Retry once, then inform user of connectivity issue | diff --git a/plugins/yuque-personal/skills/stale-detector/SKILL.md b/plugins/yuque-personal/skills/stale-detector/SKILL.md deleted file mode 100644 index 7e2134f..0000000 --- a/plugins/yuque-personal/skills/stale-detector/SKILL.md +++ /dev/null @@ -1,198 +0,0 @@ ---- -name: stale-detector -description: Scan a Yuque knowledge base to find stale or potentially outdated documents, analyze their relevance, and generate a maintenance report with update or archive recommendations. For personal/individual use. -license: Apache-2.0 -compatibility: Requires yuque-mcp server connected to a Yuque account with personal Token -metadata: - author: yuque - version: "1.0" ---- - -# Stale Detector — Knowledge Base Freshness Audit - -Scan a Yuque knowledge base to discover documents that haven't been updated in a long time, analyze whether their content may be outdated, and generate a maintenance report with actionable recommendations. - -## When to Use - -- User wants to clean up or maintain their knowledge base -- User says "帮我检查哪些文档过期了", "find stale docs", "知识库体检" -- User wants to identify documents that need updating or archiving -- User is doing a periodic knowledge base review - -## Required MCP Tools - -All tools are from the `yuque-mcp` server: - -- `yuque_list_books` — List user's knowledge bases -- `yuque_list_docs` — List all documents in a knowledge base with metadata -- `yuque_get_doc` — Read document content for staleness analysis -- `yuque_get_toc` — Get knowledge base structure - -## Workflow - -### Step 1: Identify the Target Knowledge Base - -**Case A — User specifies a knowledge base:** -Extract `repo_id` (namespace) from the provided link or name. - -**Case B — User wants to scan all knowledge bases:** -List all repos first: - -``` -Tool: yuque_list_books -Parameters: - user_id: "" -``` - -Present the list and let the user choose, or scan them one by one if the user confirms. - -**Case C — User is vague:** -Ask: "你想检查哪个知识库?我可以先列出你的所有知识库。" - -### Step 2: Fetch Document List - -Get all documents in the target knowledge base: - -``` -Tool: yuque_list_docs -Parameters: - repo_id: "" -``` - -Extract key metadata for each document: -- `title` — Document title -- `slug` — Document identifier -- `updated_at` — Last update timestamp -- `created_at` — Creation timestamp -- `word_count` — Document length -- `status` — Publication status - -If the knowledge base is empty (no documents), inform the user: "这个知识库目前没有文档。" - -### Step 3: Classify Documents by Freshness - -Calculate the age of each document (days since last update) and classify: - -| Category | Criteria | Label | -|----------|----------|-------| -| 🟢 **Fresh** | Updated within 90 days | 活跃 | -| 🟡 **Aging** | Updated 90-180 days ago | 老化中 | -| 🟠 **Stale** | Updated 180-365 days ago | 陈旧 | -| 🔴 **Dormant** | Not updated for 365+ days | 休眠 | - -### Step 4: Deep Analysis of Stale Documents - -For documents classified as 🟠 Stale or 🔴 Dormant, read the content of up to 10 documents (prioritize the oldest and most important-looking ones by title): - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" - doc_id: "" -``` - -For each document, analyze: - -1. **Time-sensitive content** — Does it reference specific dates, versions, or events that may have passed? - - Software version numbers (e.g., "React 16", "Node 12") - - Date references (e.g., "2023年计划", "Q3 目标") - - Links that may be broken - - Policies or processes that may have changed - -2. **Evergreen content** — Is the content timeless? - - Conceptual explanations, principles, personal reflections - - These may be old but still valid - -3. **Recommendation:** - - **Update** — Content is valuable but contains outdated information - - **Archive** — Content is no longer relevant, move to archive - - **Keep** — Content is evergreen, no action needed despite age - - **Review** — Uncertain, needs human judgment - -If `yuque_get_doc` fails (404/403), note the document as inaccessible and skip. - -### Step 5: Generate Maintenance Report - -```markdown -## 🔍 知识库健康报告 - -**知识库**:[知识库名称](知识库链接) -**扫描时间**:YYYY-MM-DD HH:MM -**文档总数**:X 篇 - -### 📊 整体健康度 - -| 状态 | 数量 | 占比 | -|------|------|------| -| 🟢 活跃(90 天内更新) | X | XX% | -| 🟡 老化中(90-180 天) | X | XX% | -| 🟠 陈旧(180-365 天) | X | XX% | -| 🔴 休眠(365 天以上) | X | XX% | - -**健康评分**:X/100 -(计算方式:🟢×100 + 🟡×70 + 🟠×30 + 🔴×0,加权平均) - -### 🔴 需要关注的文档 - -#### 建议更新 - -| 文档 | 上次更新 | 原因 | -|------|----------|------| -| [文档标题](链接) | YYYY-MM-DD | [e.g., 引用了 Node 12,当前已是 Node 22] | -| [文档标题](链接) | YYYY-MM-DD | [e.g., 包含 2023 年的计划,需要更新] | - -#### 建议归档 - -| 文档 | 上次更新 | 原因 | -|------|----------|------| -| [文档标题](链接) | YYYY-MM-DD | [e.g., 已完成的项目记录,可归档] | - -#### 建议保留(虽旧但有效) - -| 文档 | 上次更新 | 原因 | -|------|----------|------| -| [文档标题](链接) | YYYY-MM-DD | [e.g., 通用方法论,内容不过时] | - -#### 需要人工判断 - -| 文档 | 上次更新 | 原因 | -|------|----------|------| -| [文档标题](链接) | YYYY-MM-DD | [e.g., 无法确定内容是否仍然有效] | - -### 💡 维护建议 - -1. [具体建议 1:e.g., 建议每季度审查一次「技术文档」分类下的文档] -2. [具体建议 2:e.g., 考虑创建一个「归档」知识库,将不再维护的文档迁移过去] -3. [具体建议 3:e.g., 有 X 篇文档超过 2 年未更新,建议集中处理] -``` - -### Step 6: Offer Follow-up Actions - -After presenting the report, offer: - -- "需要我帮你把建议归档的文档移到归档知识库吗?" -- "需要我帮你逐篇查看需要更新的文档,给出具体的更新建议吗?" -- "需要我定期(比如每月)帮你做一次知识库体检吗?" - -These are suggestions only — do not take action without user confirmation. - -## Guidelines - -- Always answer in the same language the user used (Chinese or English) -- Be conservative with "archive" recommendations — when in doubt, suggest "review" instead -- Don't read every document in a large knowledge base — sample strategically -- The health score is a rough indicator, not a precise metric — present it as such -- Evergreen content (personal reflections, principles, methodologies) should not be flagged as stale just because of age -- Focus on actionable recommendations, not just listing old documents -- If the knowledge base has fewer than 5 documents, simplify the report format - -## Error Handling - -| Situation | Action | -|-----------|--------| -| Knowledge base not found | Inform user and suggest listing their repos with `yuque_list_books` | -| Knowledge base is empty | Inform user: "这个知识库目前没有文档,无需体检" | -| `yuque_list_docs` returns error | Inform user of the issue, suggest checking the knowledge base link | -| Too many documents (100+) | Analyze metadata for all, but only deep-read the top 10 stalest documents | -| All documents are fresh | Congratulate the user: "知识库状态很健康!所有文档都在活跃维护中 🎉" | -| API rate limiting | Slow down requests, inform user if the scan takes longer than expected | diff --git a/plugins/yuque-personal/skills/style-extract/SKILL.md b/plugins/yuque-personal/skills/style-extract/SKILL.md deleted file mode 100644 index ab42a7f..0000000 --- a/plugins/yuque-personal/skills/style-extract/SKILL.md +++ /dev/null @@ -1,222 +0,0 @@ ---- -name: style-extract -description: Analyze a user's writing style from their Yuque documents — vocabulary habits, sentence patterns, tone characteristics — and generate a style profile that can be used to maintain consistent voice when writing new content. For personal/individual use. -license: Apache-2.0 -compatibility: Requires yuque-mcp server connected to a Yuque account with personal Token -metadata: - author: yuque - version: "1.0" ---- - -# Style Extract — Your Writing Style Profile - -Analyze your existing Yuque documents to extract your unique writing style — vocabulary habits, sentence structures, tone characteristics. Generate a reusable style profile that helps you (or AI) maintain a consistent voice when writing new content. - -## When to Use - -- User wants to understand their own writing style -- User says "分析一下我的写作风格", "我的文风是什么样的", "extract my writing style" -- User wants AI to write in their voice: "用我的风格写一篇...", "write like me" -- User wants to ensure consistency across documents -- User says "帮我生成一个风格画像", "create my style profile" - -## Required MCP Tools - -All tools are from the `yuque-mcp` server: - -- `yuque_list_books` — List user's knowledge bases -- `yuque_list_docs` — List documents in a knowledge base -- `yuque_get_doc` — Read document content for style analysis -- `yuque_search` — Find specific types of documents for analysis -- `yuque_create_doc` — Save the style profile as a document - -## Workflow - -### Step 1: Gather Writing Samples - -Ask the user for source material: - -**Case A — Specific documents:** -User provides links to documents they consider representative of their style. - -**Case B — Entire knowledge base:** -User specifies a knowledge base. Sample documents from it. - -**Case C — Auto-detect best samples:** -If the user isn't sure, search for their most substantial documents: - -``` -Tool: yuque_list_books -``` - -``` -Tool: yuque_list_docs -Parameters: - repo_id: "" -``` - -Select 5-10 documents that are: -- Written by the user (not copied/quoted content) -- Substantial in length (> 500 characters) -- Diverse in topic (to capture general style, not topic-specific patterns) - -For each selected document: - -``` -Tool: yuque_get_doc -Parameters: - repo_id: "" - doc_id: "" -``` - -### Step 2: Analyze Writing Dimensions - -Analyze the collected writing samples across these dimensions: - -#### Vocabulary (用词习惯) -- **Formality level** — Casual, semi-formal, or formal? -- **Jargon density** — Heavy use of domain terms or plain language? -- **Favorite words** — Recurring words or phrases the user gravitates toward -- **Filler patterns** — Common transitions, connectors, hedging words -- **Language mixing** — Do they mix Chinese/English? In what pattern? - -#### Sentence Structure (句式结构) -- **Average sentence length** — Short and punchy or long and flowing? -- **Complexity** — Simple sentences or nested clauses? -- **Paragraph length** — Brief paragraphs or dense blocks? -- **List usage** — Frequent bullet points or prose-heavy? -- **Question usage** — Do they use rhetorical questions? - -#### Tone & Voice (语气特点) -- **Perspective** — First person, second person, or impersonal? -- **Confidence level** — Assertive ("X is Y") or hedged ("X might be Y")? -- **Humor** — Dry wit, playful, or strictly serious? -- **Engagement style** — Conversational or lecture-like? -- **Emotional range** — Neutral/analytical or expressive/passionate? - -#### Structural Habits (结构习惯) -- **Opening style** — How do they start articles? (Question, statement, story, context) -- **Closing style** — How do they end? (Summary, call-to-action, open question) -- **Heading style** — Descriptive, concise, or creative headings? -- **Use of examples** — Frequent concrete examples or abstract reasoning? -- **Formatting preferences** — Heavy use of bold, quotes, code blocks, tables? - -### Step 3: Generate Style Profile - -Create a structured style profile: - -```markdown -# ✍️ 写作风格画像 - -> 基于 [N] 篇文档分析生成 -> 分析日期:YYYY-MM-DD - -## 一句话风格概括 - -[用一句话描述用户的整体写作风格,如 "简洁直接的技术写作者,偏好短句和大量代码示例,语气自信但不傲慢"] - -## 用词习惯 - -- **正式程度**:[描述 + 示例] -- **术语密度**:[描述 + 示例] -- **高频词汇**:[列出 5-10 个标志性用词] -- **过渡词偏好**:[常用的连接词和过渡表达] -- **中英混用**:[模式描述,如 "技术名词用英文,解释用中文"] - -## 句式特征 - -- **句子长度**:[平均字数/句,与参考值对比] -- **段落长度**:[平均句数/段] -- **复杂度**:[简单句为主 / 复合句为主] -- **标志性句式**:[用户常用的句式模式,附原文示例] - -## 语气画像 - -- **视角**:[第一人称 / 第二人称 / 无人称] -- **自信度**:[断言型 / 探讨型 / 谦逊型] -- **幽默感**:[描述] -- **互动性**:[对话式 / 独白式 / 教学式] - -## 结构偏好 - -- **开头方式**:[描述 + 示例] -- **结尾方式**:[描述 + 示例] -- **标题风格**:[描述] -- **举例频率**:[高 / 中 / 低] -- **格式偏好**:[常用的 Markdown 元素] - -## 风格指纹(供 AI 参考) - -当需要模仿此风格写作时,遵循以下规则: - -1. [具体规则 1,如 "每段不超过 4 句话"] -2. [具体规则 2,如 "技术概念首次出现时用中文解释 + 英文原词"] -3. [具体规则 3,如 "多用反问句引导思考"] -4. [具体规则 4,如 "避免使用'众所周知'等套话"] -5. [具体规则 5,如 "结尾倾向于提出开放性问题而非总结"] - -## 示例对比 - -### 原文片段 -> [从用户文档中摘取的典型段落] - -### 风格要素标注 -[标注该段落中体现的风格特征] -``` - -### Step 4: Present and Refine - -Show the style profile to the user and ask: - -"这个风格画像准确吗?有没有哪些地方需要调整?" - -Iterate based on user feedback. They might say: -- "我觉得我没那么正式" → Adjust formality assessment -- "这个高频词不是我的风格,是那篇文章特有的" → Remove outliers -- "我希望新内容比我现在的风格更简洁" → Note as a style aspiration - -### Step 5: Save Style Profile (Optional) - -Ask the user: "要把风格画像保存到语雀吗?以后写作时可以参考。" - -If confirmed: - -``` -Tool: yuque_create_doc -Parameters: - repo_id: "" - title: "✍️ 我的写作风格画像" - body: "