markdown-mdx-content-pipeline-stinger

Configures Markdown and MDX processing pipelines from source files to HTML or JSX output.

84|37|Updated May 23, 2026
One-click install
npx skills add https://github.com/legioncodeinc/vibe-coding-tools --skill markdown-mdx-content-pipeline-stinger-legioncodeinc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: markdown-mdx-content-pipeline-stinger
Source: https://github.com/legioncodeinc/vibe-coding-tools/tree/main/src/skills/markdown-mdx-content-pipeline-stinger
Command: npx skills add https://github.com/legioncodeinc/vibe-coding-tools --skill markdown-mdx-content-pipeline-stinger-legioncodeinc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a Markdown/MDX content pipeline requires choosing the right compiler, ordering remark/rehype plugins correctly, configuring syntax highlighting, embedding math and diagrams, and sanitizing user content against XSS. Getting any of these wrong produces broken rendering, silent plugin failures, or security holes. ## Core Features & Use Cases - Compiler Selection: Decision matrix covering @next/mdx, Velite, next-mdx-remote v6, Contentlayer2, and direct @mdx-js/mdx usage for Next.js, Astro, Vite, and Node.js projects. - Plugin Pipeline Design: Canonical remark/rehype plugin ordering, GFM, frontmatter, directives, custom plugin authoring with unist-util-visit, and TypeScript typing. - Highlighting, Math, and Diagrams: Shiki v4, rehype-pretty-code, expressive-code, starry-night, KaTeX math, and Mermaid embedding strategies. - Sanitization and Testing: rehype-sanitize schema design, DOMPurify client-side fallback, and vitest snapshot/XSS fixture testing. - Use Case: When building a Next.js 15 blog with typed frontmatter, math equations, and highlighted code blocks, follow the Velite example to wire remark-gfm, remark-math, rehype-katex, and rehype-pretty-code in the correct order. ## Quick Start Ask the assistant to design a Markdown/MDX processing pipeline for your project, specifying your framework, content source, and whether the content is user-authored.

Frequently Asked Questions about markdown-mdx-content-pipeline-stinger

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up an MDX pipeline in Next.js 15?▼

Use @next/mdx for MDX page routes or Velite for content collections with typed frontmatter schemas. Configure remarkPlugins and rehypePlugins in createMDX or velite.config, and create the required mdx-components.tsx file at the project root for App Router.

What is the correct remark and rehype plugin order?▼

Run remark plugins (frontmatter, GFM, math, directives) before the remark-rehype bridge, then rehype plugins after it. Critically, rehype-sanitize must come after rehype-raw, and rehype-stringify always comes last.

Shiki vs Prism vs Highlight.js for Markdown code blocks?▼

Shiki v4 is the recommended choice in 2026, shipping TextMate grammars and serving as the default in Vite, Astro, and Next.js. Prism and Highlight.js are legacy options; rehype-pretty-code wraps Shiki as a rehype plugin with line highlighting and filenames.

Should I use next-mdx-remote or Velite for a blog?▼

Use Velite for new projects since next-mdx-remote is archived with v6.0.0 as its final release. Velite is Turbopack-safe, RSC-compatible, and outputs typed JSON; next-mdx-remote also has a fatal RSC bug with Next.js 15.2.x.

How do I sanitize user-generated Markdown against XSS?▼

Place rehype-sanitize after rehype-raw in the server pipeline with a strict tag and protocol allowlist, and never set allowDangerousHtml to true for user content. For client-side rendering, use DOMPurify with restricted ALLOWED_TAGS and ALLOWED_ATTR.

Why does rehype-mermaid fail in Next.js serverless environments?▼

rehype-mermaid uses Playwright for SSR rendering and hits an import.meta.resolve error in serverless contexts. The recommended workaround for Next.js is loading Mermaid client-side via next/script with the afterInteractive strategy instead.