🦀 ClawHub
Yuque
by @a6590072
Manage Yuque (语雀) knowledge base documents and repositories. Use when users need to interact with Yuque for document operations including reading documents,...
TERMINAL
clawhub install yuque📖 About This Skill
name: yuque description: Manage Yuque (语雀) knowledge base documents and repositories. Use when users need to interact with Yuque for document operations including reading documents, listing repositories, searching content, creating documents, and managing knowledge bases. Supports both personal and team spaces.
Yuque Skill
Interact with Yuque (语雀) knowledge base platform via the Yuque Open API.
Prerequisites
YUQUE_TOKEN)https://www.yuque.com/api/v2Authentication
All API requests require an X-Auth-Token header with your Yuque token.
Core Workflows
1. Get User Info
curl -s -H "X-Auth-Token: $YUQUE_TOKEN" https://www.yuque.com/api/v2/user
2. List User Repositories
curl -s -H "X-Auth-Token: $YUQUE_TOKEN" https://www.yuque.com/api/v2/users//repos
3. List Repository Documents
curl -s -H "X-Auth-Token: $YUQUE_TOKEN" https://www.yuque.com/api/v2/repos//docs
4. Get Document Detail
curl -s -H "X-Auth-Token: $YUQUE_TOKEN" https://www.yuque.com/api/v2/repos//docs/
5. Get Document Content (HTML/Markdown)
# Get HTML content
curl -s -H "X-Auth-Token: $YUQUE_TOKEN" https://www.yuque.com/api/v2/repos//docs/?raw=1Get Markdown content
curl -s -H "X-Auth-Token: $YUQUE_TOKEN" https://www.yuque.com/api/v2/repos//docs/?raw=1 | python scripts/parse_yuque.py --format md
6. Create Document
curl -s -X POST \
-H "X-Auth-Token: $YUQUE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Document Title", "body": "Document content in Markdown"}' \
https://www.yuque.com/api/v2/repos//docs
7. Update Document
curl -s -X PUT \
-H "X-Auth-Token: $YUQUE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "New Title", "body": "Updated content"}' \
https://www.yuque.com/api/v2/repos//docs/
8. Search Documents
Yuque API doesn't have a direct search endpoint. Use list + filter approach:
# List all docs in a repo and filter by title
python scripts/search_yuque.py --namespace --query "keyword"
Common Namespace Formats
username/repo-slugteamname/repo-slugResponse Format
All API responses are JSON with this structure:
{
"data": { ... },
"meta": { ... }
}
Error Handling
Common HTTP status codes:
401: Unauthorized (check token)403: Forbidden (no permission)404: Resource not found429: Rate limited (wait and retry)Helper Scripts
Use the provided Python scripts for common operations:
scripts/yuque_cli.py - Full CLI for Yuque operationsscripts/parse_yuque.py - Parse Yuque HTML to Markdownscripts/search_yuque.py - Search documents in repositoriesReferences
⚙️ Configuration
YUQUE_TOKEN)https://www.yuque.com/api/v2