/documentation-tools:markdown-mdx-content-pipeline-stingerfrom documentation-tools
Builds Markdown and MDX pipelines including compiler selection, remark/rehype plugin chains, syntax highlighting (Shiki, expressive-code), diagrams (Mermaid), math (KaTeX), and sanitization.
Ships in documentation-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Markdown and MDX processing stack: from raw .md/.mdx file to final HTML/JSX/React output. This stinger encodes the 2026 state of the unified/remark/rehype ecosystem, the Shiki family (Shiki v4, expressive-code, starry-night), compiler selection, plugin authoring patterns, math/diagram embedding, and sanitization.
Activate when markdown-mdx-content-pipeline-wasp-drone is invoked, or when the user asks about any of these:
Do NOT activate for:
docs-site-wasp-dronemdx-components.tsx internals) → react-wasp-dronesecurity-wasp-droneseo-aeo-wasp-drone| Layer | Recommended (2026) | Legacy / Avoid |
|---|---|---|
| Compiler (Next.js blog) | Velite + @next/mdx | next-mdx-remote (archived), Contentlayer |
| Compiler (route MDX) | @next/mdx | none |
| Syntax highlighting | Shiki v4 / rehype-pretty-code | Prism, Highlight.js |
| Highlighting (Starlight) | expressive-code | none |
| GFM | remark-gfm | none |
| Math | remark-math + rehype-katex | MathJax (heavier) |
| Diagrams | Mermaid via next/script (CSR) or rehype-mermaid (SSR build) | none |
| Sanitization (server) | rehype-sanitize | none |
| Sanitization (client) | DOMPurify | none |
Read each guide before authoring any output in its domain.
guides/00-principles.md: scope boundary, unified AST model (mdast to hast to html/jsx), the four processing layers (parse, transform, compile, render)guides/01-compiler-selection.md: decision matrix: @next/mdx vs next-mdx-remote v6 vs Velite vs Contentlayer2 vs @mdx-js/mdx directguides/02-remark-rehype-pipeline.md: canonical plugin ordering, the .use() chain, GFM/frontmatter/directive pluginsguides/03-syntax-highlighting.md: Shiki v3 to v4 migration, expressive-code, starry-night, rehype-pretty-codeguides/04-plugin-authoring.md: unified plugin function signature, unist-util-visit visitor pattern, TypeScript typesguides/05-math-diagrams.md: remark-math + rehype-katex, Mermaid SSR workaround, D2, callout/admonition directiveguides/06-sanitization.md: rehype-sanitize schema design, DOMPurify, allowDangerousHtml safetyguides/07-testing.md: vitest fixtures, snapshot testing MDX output, XSS payload fuzzingexamples/next-mdx-blog.md: full Next.js 15 App Router MDX blog with Velite, remark-gfm, remark-math, rehype-katex, rehype-pretty-code (Shiki v4)examples/ai-chat-renderer.md: safe rendering of user-authored Markdown in an AI chat UI with DOMPurify + allowlisttemplates/plugin-boilerplate.ts: typed TypeScript boilerplate for a unified remark or rehype pluginPrefer Shiki v4 over Prism or Highlight.js. Shiki ships TextMate grammars, is the default in Vite/Astro/Next.js in 2026, and supports transformers for line numbers, highlighting, and word highlighting.
Treat untrusted input as plain Markdown, never executable MDX. MDX expressions compile to JavaScript; rehype-sanitize and DOMPurify sanitize HTML, not arbitrary MDX execution. Keep MDX restricted to trusted repository content. Parse user Markdown to HTML and sanitize after the last unsafe HTML-producing step; see guides/06-sanitization.md.
Use Velite for new Next.js content sites. next-mdx-remote is archived (v6.0.0 final release, Feb 2026). Velite is Turbopack-safe, RSC-safe, and outputs inert typed JSON.
rehype-sanitize MUST come after rehype-raw in the chain. Placing it before rehypeRaw produces a false-clean output that raw HTML can still bypass.
Pin plugin versions. The unified ecosystem releases breaking AST changes without major semver bumps; "*" or "latest" breaks pipelines silently.
Distinguish MDX compile (server) from MDX render (client/RSC). Conflating them produces broken CSR/SSR configurations with security implications.
Route platform-selection to docs-site-wasp-drone. This stinger implements the highlighting and plugin config after the platform is decided; crossing the boundary produces contradictory guidance.
@expressive-code/plugin-shiki Shiki peer-dep range and rehype-pretty-code Shiki compat table on each refresh.scripture-historian at shallow depth if: Shiki releases v5, expressive-code releases a major, or Next.js App Router changes its MDX integration.Part of the Wasp Nest. Paired Drone: markdown-mdx-content-pipeline-wasp-drone.
Research: 10 external sources (2025-11 to 2026-05), depth tier: normal.
examples/ai-chat-renderer.md (opens in a new tab)examples/next-mdx-blog.md (opens in a new tab)guides/00-principles.md (opens in a new tab)guides/01-compiler-selection.md (opens in a new tab)guides/02-remark-rehype-pipeline.md (opens in a new tab)guides/03-syntax-highlighting.md (opens in a new tab)guides/04-plugin-authoring.md (opens in a new tab)guides/05-math-diagrams.md (opens in a new tab)guides/06-sanitization.md (opens in a new tab)guides/07-testing.md (opens in a new tab)reports/README.md (opens in a new tab)templates/plugin-boilerplate.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/api-docs-stingerBuild and maintain API docs. Use for OpenAPI examples, renderer choice, hosting, SDK consumer compatibility, or changelogs. Read README.md for the guide map./archivist-stingerPrepares an acquired repository for archival: provenance intake, attribution and PII scrub, docs merge into library/, knowledge-base fleet, identifier rename, verification. Any language or license./docs-site-stingerSelect and maintain developer docs sites. Use for Docusaurus, Mintlify, Starlight, Diataxis, search, or docs-as-code CI. Read README.md for the guide map./kb-refresh-stingerFull documentation refresh: inventory, writer fleet, grounded citations, adversarial verification, security and quality gates, one ready PR per unit, PDF plus markdown report, master suspect list./library-packets-stingerTurn a library into cited audience packets in Markdown, Word and branded PDF. Use for executive, public, sales, service or engineering documents grounded in existing sources./mcp-tool-docs-stingerDocuments MCP tools, TypeScript APIs, and CLIs honestly: schema, output, side effects, examples, doc-to-code sync. Use when writing or auditing tool/API/CLI docs.npx claudepluginhub legioncodeinc/vibe-coding-tools --plugin documentation-toolsOther plugins' skills for the same job