xiaohongshu
xiaohongshu
moai-docs-generation
Documentation generation patterns for technical specs, API docs, user guides, and knowledge bases using real tools like Sphinx, MkDocs, TypeDoc, and Nextra. Use when creating docs from code, building doc sites, or automating documentation workflows.
Full skill instructions
Purpose: Generate professional documentation using established tools and frameworks.
Core Documentation Tools:
When to Use This Skill:
Sphinx Setup and Configuration:
Install Sphinx and extensions with pip install sphinx sphinx-autodoc-typehints sphinx-rtd-theme myst-parser
Initialize a Sphinx project by running sphinx-quickstart docs which creates the basic structure.
Configure conf.py with the following key settings:
Generate API documentation by running sphinx-apidoc with the source directory, outputting to docs/api, then run make html in the docs directory.
MkDocs Material Setup:
Install with pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python
Create mkdocs.yml configuration:
Use mkdocstrings syntax in Markdown files with ::: module.path to auto-generate API docs from docstrings.
Serve locally with mkdocs serve, build with mkdocs build, deploy with mkdocs gh-deploy.
TypeDoc Setup:
Install with npm install typedoc --save-dev
Add to package.json scripts: typedoc --out docs/api src/index.ts
Configure with typedoc.json:
Generate documentation by running npm run docs:generate
JSDoc Setup:
Install with npm install jsdoc --save-dev
Create jsdoc.json configuration:
Document functions with JSDoc comments using tags:
FastAPI Auto-Documentation:
FastAPI provides automatic OpenAPI docs. Access Swagger UI at /docs and ReDoc at /redoc.
Enhance documentation by:
Export OpenAPI spec programmatically with app.openapi() and save to openapi.json.
Express with Swagger:
Install swagger-jsdoc and swagger-ui-express.
Configure swagger-jsdoc with OpenAPI definition and API file paths.
Add @openapi comments to route handlers documenting paths, parameters, and responses.
Serve Swagger UI at /api-docs endpoint.
Nextra (Next.js):
Reference Skill("moai-library-nextra") for comprehensive Nextra patterns.
Key advantages: MDX support, file-system routing, built-in search, theme customization.
Create with npx create-nextra-app, configure theme.config.tsx, organize pages in pages directory.
Docusaurus (React):
Initialize with npx create-docusaurus@latest my-docs classic
Configure in docusaurus.config.js:
Organize documentation in docs folder with category.json files for sidebar structure.
VitePress (Vue):
Initialize with npm init vitepress
Configure in .vitepress/config.js:
Use Markdown with Vue components, code highlighting, and frontmatter.
Pattern for generating documentation from MoAI SPEC files:
Read SPEC file content and extract key sections: id, title, description, requirements, api_endpoints.
Generate structured Markdown documentation:
Save generated docs to appropriate location in docs directory.
GitHub Actions Workflow:
Create .github/workflows/docs.yml that triggers on push to main branch when src or docs paths change.
Workflow steps:
Example for Python/Sphinx:
Example for TypeScript/TypeDoc:
Link Checking:
Use linkchecker for local link validation in HTML output.
For Markdown, use markdown-link-check in pre-commit hooks.
Spell Checking:
Use pyspelling with Aspell for automated spell checking.
Configure .pyspelling.yml with matrix entries for different file types.
Documentation Coverage:
For Python, use interrogate to check docstring coverage.
Configure minimum coverage thresholds in pyproject.toml.
Fail CI builds if coverage drops below threshold.
Internationalization with Nextra:
Configure i18n in next.config.js with locales array and defaultLocale.
Create locale-specific pages in pages/[locale] directory.
Use next-intl or similar for translations.
Internationalization with Docusaurus:
Configure i18n in docusaurus.config.js with defaultLocale and locales.
Use docusaurus write-translations to generate translation files.
Organize translations in i18n/[locale] directory structure.
Skills:
Agents:
Commands:
Python Documentation:
JavaScript/TypeScript Documentation:
API Documentation:
Static Site Generators:
Style Guides:
Version: 2.0.0 Last Updated: 2025-12-30
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience