chatdoc-studio--knowledgematelisted
Install: claude install-skill PaodingAI/skills
# ChatDOC Studio KnowledgeMate
Run a JavaScript workflow that uploads local PDF/DOC/DOCX files to ChatDOC Studio through PDRouter, waits for successful parsing, and creates a knowledge base from the successful uploads in one step.
This is suitable for creating knowledge bases from local files or folders, then using the returned `library_id` for document listing, retrieval, grep, syllabus reading, and block reading.
## Installation
```bash
npx skills add PaodingAI/skills
```
For a local Codex installation, place this skill directory under:
```bash
$CODEX_HOME/skills/chatdoc-studio-knowledgemate
```
## Usage
Create a knowledge base from files:
```bash
node scripts/knowledge-mate.mjs upload-and-create \
--name "Quarterly KB" \
--file ./docs/a.pdf \
--file ./docs/b.docx \
--file ./docs/c.pdf
```
Create a knowledge base from a folder recursively:
```bash
node scripts/knowledge-mate.mjs upload-and-create \
--name "Quarterly KB" \
--dir ./docs
```
Query an existing knowledge base:
```bash
node scripts/knowledge-mate.mjs retrieval --library-id <id> --query <text>
node scripts/knowledge-mate.mjs list-documents --library-id <id>
node scripts/knowledge-mate.mjs stats --library-id <id> --upload-id <id>
node scripts/knowledge-mate.mjs grep --library-id <id> --upload-id <id> --pattern <text>
node scripts/knowledge-mate.mjs read --library-id <id> --upload-id <id> --offset <n>
node scripts/knowledge-mate.mjs read-syllabus --library-id <id> --upload-id <id>
```
## Ex