Custom skill for querying, browsing, searching, and managing the M-Doc document system via natural language. Works with any AI tool that supports the Skill protocol.
mdoc-skills adds an mdoc skill to AI tools that support the Skill protocol (such as Claude Code, Gemini CLI, etc.). Once installed, you can paste any mdoc.cc URL—or a short orgSlug/docSlug path—directly into your prompt, and the AI tool will authenticate against the M-Doc OpenAPI, fetch the document manifest or article content, and display it inline.
Triggers when you:
https://mdoc.cc/… URLmliev/mdoc or mliev/mdoc/v1.0.0/32mdoc.cc URLs and short org/doc[/version[/articleId]] paths automaticallyMDOC_TOKEN and prompt you to create one if it's missing| Tool | Install Method |
|---|---|
| Claude Code | claude install-skill command |
| Gemini CLI | Clone into ~/.gemini/skills/ |
| Other compatible tools | Refer to each tool's Skill documentation |
MDOC_TOKEN)mdoc_pat_xxxxxxxxxxxxxxxx.~/.zshrc or ~/.bashrc to persist):export MDOC_TOKEN="mdoc_pat_your_token_here"
If MDOC_TOKEN is not set when the skill runs, it will stop and show you the setup instructions above.
Note: For write operations (create, update, delete, publish, merge), ensure your PAT has
write:articlespermission.
claude install-skill https://cnb.cool/mliev/mdoc/mdoc-skills/-/tree/main/mdoc
git clone https://cnb.cool/mliev/mdoc/mdoc-skills.git ~/.gemini/skills/mdoc-skills
For other Skill-compatible tools, clone the repository and point your tool to the skill directory:
git clone https://cnb.cool/mliev/mdoc/mdoc-skills.git
The skill definition is located at mdoc/SKILL.md. Configure your tool to use this directory as a skill source.
Pass any of the following input formats as your prompt argument:
| Format | Example |
|---|---|
| Full URL | https://mdoc.cc/mliev/mdoc |
| URL with version | https://mdoc.cc/mliev/mdoc/v1.0.0 |
| URL with article | https://mdoc.cc/mliev/mdoc/v1.0.0/32 |
| Short path | mliev/mdoc |
| Short path with version | mliev/mdoc/v1.0.0 |
| Short path with article | mliev/mdoc/v1.0.0/32 |
| Search | search mliev/mdoc authentication |
List a document's table of contents:
/mdoc mliev/mdoc
Output (example):
📄 mdoc [version: master] [1] Quick Start [3] Installation [4] Configuration [2] API Reference [5] Authentication [6] Endpoint List
Read a specific article:
/mdoc https://mdoc.cc/mliev/mdoc/v1.0.0/32
Output: The article's raw Markdown content is displayed inline.
Semantic search:
/mdoc search mliev/mdoc authentication
Output: A ranked list of matching articles with similarity scores and content snippets.
Create an article:
Create an article titled "Deployment Best Practices" under mliev/mdoc v1.0.0
Publish an article:
Publish article 32 in mliev/mdoc with commit message "Updated introduction"
The skill executes four steps:
orgSlug, docSlug, version (optional), and articleId (optional) from the input URL or short path.MDOC_TOKEN is set; stops and prompts for setup if unset.GET /openapi/organizations/{org}/documents/{doc}/searcharticleId → GET /openapi/organizations/{org}/documents/{doc}/articles/{id}/content.mdPOST/PUT/DELETE on /openapi/versions/{id}/articles/…GET /openapi/organizations/{org}/documents/{doc}/manifestKey endpoints used by this skill (all require Authorization: Bearer <token>):
| Endpoint | Description |
|---|---|
GET /openapi/organizations/:orgSlug/documents | List documents in an org |
GET /openapi/organizations/:orgSlug/documents/:docSlug/manifest | Get document manifest (TOC) |
GET /openapi/organizations/:orgSlug/documents/:docSlug/articles/:articleId/content.md | Get article Markdown |
GET /openapi/organizations/:orgSlug/documents/:docSlug/search | Semantic search |
POST /openapi/versions/:id/articles | Create article |
PUT /openapi/versions/:id/articles/:articleId | Update article |
DELETE /openapi/versions/:id/articles/:articleId | Delete article |
POST /openapi/versions/:id/articles/:articleId/publish | Publish article |
POST /openapi/versions/:id/articles/merge | Merge article |
Full endpoint reference: mdoc/references/endpoints.md
mdoc-skills/ ├── mdoc/ │ ├── SKILL.md # Skill definition and step-by-step logic │ └── references/ │ └── endpoints.md # Full OpenAPI endpoint reference ├── README.md # This file (English) └── README.zh-CN.md # Chinese documentation