{"skill":{"slug":"yuque","displayName":"Yuque","summary":"Manage Yuque (语雀) knowledge base documents and repositories. Use when users need to interact with Yuque for document operations including reading documents,...","description":"---\nname: yuque\ndescription: 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.\n---\n\n# Yuque Skill\n\nInteract with Yuque (语雀) knowledge base platform via the Yuque Open API.\n\n## Prerequisites\n\n- Yuque API Token (stored in environment variable `YUQUE_TOKEN`)\n- Base URL: `https://www.yuque.com/api/v2`\n\n## Authentication\n\nAll API requests require an `X-Auth-Token` header with your Yuque token.\n\n## Core Workflows\n\n### 1. Get User Info\n\n```bash\ncurl -s -H \"X-Auth-Token: $YUQUE_TOKEN\" https://www.yuque.com/api/v2/user\n```\n\n### 2. List User Repositories\n\n```bash\ncurl -s -H \"X-Auth-Token: $YUQUE_TOKEN\" https://www.yuque.com/api/v2/users/<login>/repos\n```\n\n### 3. List Repository Documents\n\n```bash\ncurl -s -H \"X-Auth-Token: $YUQUE_TOKEN\" https://www.yuque.com/api/v2/repos/<namespace>/docs\n```\n\n### 4. Get Document Detail\n\n```bash\ncurl -s -H \"X-Auth-Token: $YUQUE_TOKEN\" https://www.yuque.com/api/v2/repos/<namespace>/docs/<slug>\n```\n\n### 5. Get Document Content (HTML/Markdown)\n\n```bash\n# Get HTML content\ncurl -s -H \"X-Auth-Token: $YUQUE_TOKEN\" https://www.yuque.com/api/v2/repos/<namespace>/docs/<slug>?raw=1\n\n# Get Markdown content\ncurl -s -H \"X-Auth-Token: $YUQUE_TOKEN\" https://www.yuque.com/api/v2/repos/<namespace>/docs/<slug>?raw=1 | python scripts/parse_yuque.py --format md\n```\n\n### 6. Create Document\n\n```bash\ncurl -s -X POST \\\n  -H \"X-Auth-Token: $YUQUE_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Document Title\", \"body\": \"Document content in Markdown\"}' \\\n  https://www.yuque.com/api/v2/repos/<namespace>/docs\n```\n\n### 7. Update Document\n\n```bash\ncurl -s -X PUT \\\n  -H \"X-Auth-Token: $YUQUE_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"New Title\", \"body\": \"Updated content\"}' \\\n  https://www.yuque.com/api/v2/repos/<namespace>/docs/<id>\n```\n\n### 8. Search Documents\n\nYuque API doesn't have a direct search endpoint. Use list + filter approach:\n\n```bash\n# List all docs in a repo and filter by title\npython scripts/search_yuque.py --namespace <namespace> --query \"keyword\"\n```\n\n## Common Namespace Formats\n\n- Personal repo: `username/repo-slug`\n- Team repo: `teamname/repo-slug`\n\n## Response Format\n\nAll API responses are JSON with this structure:\n\n```json\n{\n  \"data\": { ... },\n  \"meta\": { ... }\n}\n```\n\n## Error Handling\n\nCommon HTTP status codes:\n- `401`: Unauthorized (check token)\n- `403`: Forbidden (no permission)\n- `404`: Resource not found\n- `429`: Rate limited (wait and retry)\n\n## Helper Scripts\n\nUse the provided Python scripts for common operations:\n\n- `scripts/yuque_cli.py` - Full CLI for Yuque operations\n- `scripts/parse_yuque.py` - Parse Yuque HTML to Markdown\n- `scripts/search_yuque.py` - Search documents in repositories\n\n## References\n\n- API Documentation: See [references/api.md](references/api.md)\n- Common Operations: See [references/examples.md](references/examples.md)\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":694,"installsAllTime":4,"installsCurrent":4,"stars":0,"versions":1},"createdAt":1773632130795,"updatedAt":1778491936802},"latestVersion":{"version":"1.0.0","createdAt":1773632130795,"changelog":"Initial release with basic CRUD operations","license":"MIT-0"},"metadata":null,"owner":{"handle":"a6590072","userId":"s1731j1qj3bggatg6y73e9xrns83gg4v","displayName":"a6590072","image":"https://avatars.githubusercontent.com/u/54519099?v=4"},"moderation":null}