Community艺术与设计github.com

satoshiman/mdsvr

Markdown folder → website. One command. Zero config.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add satoshiman/mdsvr

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

文档

Markdown for mdsvr Skill

Generate a complete, valid, multi-file Markdown documentation set for use with mdsvr — supports both server mode and static export.

When this skill is triggered, produce multiple .md files that form a cohesive documentation site, following all mdsvr conventions strictly.


Step 1 — Understand the Request

Before generating files, extract from the user's request:

  1. Topic / product name — what is being documented?
  2. Target audience — developers, end-users, ops teams, etc.
  3. Scope — how many pages / sections are needed?
  4. Language — Vietnamese, English, or bilingual?
  5. Diagrams needed? — if yes, read references/rules/mermaid.md for syntax rules.

If any of these are unclear, ask ONE focused question before proceeding.


Step 2 — Plan the File Structure

Design a logical hierarchy before writing content. A typical mdsvr doc site:

docs/
├── README.md                    ← Homepage (required)
├── 01-getting-started/
│   ├── README.md                ← Section index
│   ├── 01-installation.md
│   ├── 02-quickstart.md
│   └── 03-configuration.md
├── 02-guides/
│   ├── README.md
│   ├── 01-basic-usage.md
│   └── 02-advanced.md
├── 03-api-reference/
│   ├── README.md
│   └── 01-endpoints.md
└── 04-troubleshooting.md

Adapt structure to user's topic. Scale up or down as needed.


Step 3 — Apply mdsvr File & Link Rules (MANDATORY)

3.1 File Naming Rules

Rule❌ Wrong✅ Correct
No dots in middle of name0.1.quickstart.md01-quickstart.md
No dots in middle of nameconfig.v2.mdconfig-v2.md
Use kebab-caseGettingStarted.mdgetting-started.md
Use numeric prefix for orderguide.md (in sidebar)01-guide.md
Descriptive namespage1.mdinstallation.md
Directory index must beindex.mdREADME.md

3.2 Link Structure Rules

Rule❌ Wrong✅ Correct
Use relative paths only[Guide](/docs/guide)[Guide](./guide)
No .md extension in links[Setup](./setup.md)[Setup](./setup)
Link to directory, not README[Start](./01-getting-started/README)[Start](./01-getting-started)
Anchor links must match headings[See](#install-steps) (if heading doesn't exist)Match exactly

3.3 Heading Structure Rules

Rule❌ Wrong✅ Correct
Every page needs H1(page starts with H2)# Page Title as first heading
Don't skip heading levelsH1 → H3H1 → H2 → H3
Headings must be descriptive## Section 1## Installation Requirements

Step 4 — Apply Frontmatter to Every File

Each .md file must include YAML frontmatter for SEO and mdsvr metadata:

---
title: "Page Title"
description: "One-sentence description of this page's content."
---

Step 5 — Content Guidelines

README.md (Homepage) — Required

  • Must exist at the root of the docs folder.
  • Include: project overview, quick navigation links to all sections.
  • Use a welcome callout if appropriate.

Section README.md (Directory Index)

  • Summarize what the section covers.
  • List all pages in the section with relative links.

Content Pages

  • One focused topic per page.
  • Start with a brief intro paragraph.
  • Use MDX components where appropriate:
    • :::note, :::warning, :::tip, :::danger for callouts.
    • Numbered lists for step-by-step procedures.
  • Link liberally to related pages using relative paths.
  • End with a "Next Steps" or "Related" section when useful.

Step 6 — Mermaid Diagrams (When Needed)

If the documentation benefits from diagrams (architecture, flows, sequences, ERDs, state machines, etc.), embed Mermaid diagrams inline in the relevant .md files.

Before generating any diagram, read references/rules/mermaid.md for the full syntax reference and generation rules. All rules in that file are mandatory.

Quick checklist (from mermaid.md):

  • Choose the most appropriate diagram type — do NOT default to flowchart.
  • Always declare direction in flowcharts: flowchart TD or flowchart LR.
  • Node IDs: only letters, numbers, underscores. No -, ., (, ).
  • Node labels with spaces must use double quotes: A["My Label"].
  • Subgraphs must have explicit IDs: subgraph myid["Label"].
  • Sequence diagrams: declare all participant lines before messages.
  • No hardcoded colors or styles unless user explicitly requests.
  • Use emoji instead of colors to convey semantic meaning.
  • One diagram per code block; validate syntax before outputting.

Step 7 — Create Files and Deliver

Use create_file to write each .md file to the filesystem. Then zip everything and call present_files so the user can download the result.

7.1 Write each file

For every file in the planned structure, call create_file with the full path under /mnt/user-data/outputs/<project-name>/:

/mnt/user-data/outputs/my-project/README.md
/mnt/user-data/outputs/my-project/01-getting-started/README.md
/mnt/user-data/outputs/my-project/01-getting-started/01-installation.md
...

Write the complete, final content in each call — do not write placeholders.

7.2 Zip and present

After all files are written, zip the output folder and call present_files:

cd /mnt/user-data/outputs
zip -r my-project-docs.zip my-project/

Then call present_files with the path to the .zip file.

7.3 Summary in chat

After present_files, write a short message in chat containing:

  1. File tree — show the complete directory structure that was generated.
  2. How to serve — one-liner: npx mdsvr ./my-project or mdsvr ./my-project.
  3. Page count — e.g. "Generated 8 pages across 3 sections."

Quick Reference — Common Mistakes to Avoid

❌ Absolute path in link:     [Page](/docs/page)
✅ Relative path:             [Page](./page)

❌ .md extension in link:     [Page](./page.md)
✅ No extension:              [Page](./page)

❌ Link to README file:       [Section](./01-section/README)
✅ Link to directory:         [Section](./01-section)

❌ Dot in filename:           01.quickstart.md
✅ Hyphen separator:          01-quickstart.md

❌ Missing H1:                ## Introduction  (first heading is H2)
✅ Start with H1:             # Introduction

❌ Skipped heading level:     # Title → ### Sub (skips H2)
✅ Proper hierarchy:          # Title → ## Section → ### Subsection

❌ No frontmatter:            (file starts directly with #)
✅ Frontmatter present:       --- title: "..." description: "..." ---

Reference Files

  • references/rules/mermaid.md — Full Mermaid v11 syntax reference for all 19 diagram types. Read this whenever any diagram is needed in the documentation.

相关技能

thefiredev-cloud/spark-edr

Lightweight owner-operated Linux EDR with AI agent skills — network, auth, process monitoring and defensive response

community

memex-lab/dart_agent_core

Dart framework for stateful AI agents — tool use, skills, sub-agent delegation, planning, streaming, and multi-provider LLM support (OpenAI, Gemini, Bedrock).

community

browser-use/cloud

Documentation reference for using Browser Use Cloud — the hosted API and SDK for browser automation. Use this skill whenever the user needs help with the Cloud REST API (v2 or v3), browser-use-sdk (Python or TypeScript), X-Browser-Use-API-Key authentication, cloud sessions, browser profiles, profile sync, CDP WebSocket connections, stealth browsers, residential proxies, CAPTCHA handling, webhooks, workspaces, skills marketplace, liveUrl streaming, pricing, or integration patterns (chat UI, subagent, adding browser tools to existing agents). Also trigger for questions about n8n/Make/Zapier integration, Playwright/ Puppeteer/Selenium on cloud infrastructure, or 1Password vault integration. Do NOT use this for the open-source Python library (Agent, Browser, Tools config) — use the open-source skill instead.

community

shaharsha/claude-skills

Index of @shaharsha's published Claude Code skills - gdoc-sync, gslides-sync, presentation-generator, brand-system, brand-assets, image-generation, prompt-engineer, namecheap-domains. Each skill lives in its own repo.

community

giuseppe-trisciuoglio/shadcn-ui

Provides complete shadcn/ui component library patterns including installation, configuration, and implementation of accessible React components. Use when setting up shadcn/ui, installing components, building forms with React Hook Form and Zod, customizing themes with Tailwind CSS, or implementing UI patterns like buttons, dialogs, dropdowns, tables, and complex form layouts.

community

while-coder/sbot

Self-hosted AI agent server. Multi-LLM (OpenAI/Claude/Ollama), MCP tools, long-term memory, multi-agent ReAct, Lark/Feishu, Wecom/Wechat, Web UI.

community