mcpbeat Sign in

Streamdown Skill for Cursor

>- Implement, configure, and customize Streamdown — a streaming-optimized React Markdown renderer with syntax highlighting, Mermaid diagrams, math rendering, and CJK support. Use when working with Streamdown setup, configuration, plugins, styling, security, or integration with AI (2) Configuring plugins (code, mermaid, math, cjk), (3) Styling or theming Streamdown output, (4) Integrating with AI chat/streaming, (5) Configuring security, link safety, or custom HTML tags, (6) Using carets, static mode, or custom components, (7) Troubleshooting Tailwind, Shiki, or Vite issues.

10k tokens
context cost
the whole folder, loaded on every use
11
files
instructions only
0
copies elsewhere
how many repositories repackaged it
5469
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/vercel/streamdown --skill streamdown

What comes with it

31 395 bytes besides the instruction
assets/examples/basic-streaming.tsx
assets/examples/custom-security.tsx
assets/examples/full-featured.tsx
assets/examples/static-mode.tsx
assets/examples/with-caret.tsx
references/api.md
references/features.md
references/plugins.md
references/security.md
references/styling.md

The instruction itself

12 sections, as written by the author

Streamdown

Streaming-optimized React Markdown renderer. Drop-in replacement for react-markdown with built-in streaming support, security, and interactive controls.

Quick Setup

1. Install

npm install streamdown

Optional plugins (install only what's needed):

npm install @streamdown/code @streamdown/mermaid @streamdown/math @streamdown/cjk

2. Configure Tailwind CSS (Required)

This is the most commonly missed step. Streamdown uses Tailwind for styling and the dist files must be scanned.

Tailwind v4 — add to globals.css:

@source "../node_modules/streamdown/dist/*.js";

Add plugin @source lines only for packages you have installed (omitting uninstalled plugins avoids Tailwind errors). See plugin pages for exact paths:

  • Code: @source "../node_modules/@streamdown/code/dist/*.js";
  • CJK: @source "../node_modules/@streamdown/cjk/dist/*.js";
  • Math: @source "../node_modules/@streamdown/math/dist/*.js";
  • Mermaid: @source "../node_modules/@streamdown/mermaid/dist/*.js";

Tailwind v3 — add to tailwind.config.js:

module.exports = {
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./node_modules/streamdown/dist/*.js",
  ],
};

3. Basic Usage

import { Streamdown } from 'streamdown';

<Streamdown>{markdown}</Streamdown>

4. With AI Streaming (Vercel AI SDK)

'use client';
import { useChat } from '@ai-sdk/react';
import { Streamdown } from 'streamdown';
import { code } from '@streamdown/code';

export default function Chat() {
  const { messages, input, handleInputChange, handleSubmit, isLoading } = useChat();

  return (
    <>
      {messages.map((msg, i) => (
        <Streamdown
          key={msg.id}
          plugins={{ code }}
          caret="block"
          isAnimating={isLoading && i === messages.length - 1 && msg.role === 'assistant'}
        >
          {msg.content}
        </Streamdown>
      ))}
      <form onSubmit={handleSubmit}>
        <input value={input} onChange={handleInputChange} disabled={isLoading} />
      </form>
    </>
  );
}

5. Static Mode (Blogs, Docs)

<Streamdown mode="static" plugins={{ code }}>
  {content}
</Streamdown>

Key Props

| Prop | Type | Default | Purpose |

|------|------|---------|---------|

| children | string | — | Markdown content |

| mode | "streaming" \| "static" | "streaming" | Rendering mode |

| plugins | { code?, mermaid?, math?, cjk? } | — | Feature plugins |

| isAnimating | boolean | false | Streaming indicator |

| caret | "block" \| "circle" | — | Cursor style |

| components | Components | — | Custom element overrides |

| controls | boolean \| object | true | Interactive buttons |

| linkSafety | LinkSafetyConfig | { enabled: true } | Link confirmation modal |

| shikiTheme | [light, dark] | ['github-light', 'github-dark'] | Code themes |

| className | string | — | Container class |

| allowedElements | string[] | all | Tag names to allow |

| disallowedElements | string[] | [] | Tag names to disallow |

| allowElement | AllowElement | — | Custom element filter |

| unwrapDisallowed | boolean | false | Keep children of disallowed elements |

| skipHtml | boolean | false | Ignore raw HTML |

| urlTransform | UrlTransform | defaultUrlTransform | Transform/sanitize URLs |

For full API reference, see references/api.md.

Plugin Quick Reference

| Plugin | Package | Purpose |

|--------|---------|---------|

| Code | @streamdown/code | Syntax highlighting (Shiki, 200+ languages) |

| Mermaid | @streamdown/mermaid | Diagrams (flowcharts, sequence, etc.) |

| Math | @streamdown/math | LaTeX via KaTeX (requires CSS import) |

| CJK | @streamdown/cjk | Chinese/Japanese/Korean text support |

Math requires CSS:

import 'katex/dist/katex.min.css';

For plugin configuration details, see references/plugins.md.

References

Use these for deeper implementation details:

  • references/api.md — Complete props, types, and interfaces
  • references/plugins.md — Plugin setup, configuration, and customization
  • references/styling.md — CSS variables, data attributes, custom components, theme examples
  • references/security.md — Hardening, link safety, custom HTML tags, production config
  • references/features.md — Carets, remend, static mode, controls, GFM, memoization, troubleshooting

Example Configurations

Copy and adapt from assets/examples/:

  • basic-streaming.tsx — Minimal AI chat with Vercel AI SDK
  • with-caret.tsx — Streaming with block caret cursor
  • full-featured.tsx — All plugins, carets, link safety, controls
  • static-mode.tsx — Blog/docs rendering
  • custom-security.tsx — Strict security for AI content

Common Gotchas

  • Tailwind styles missing — Add @source directive or content entry for node_modules/streamdown/dist/*.js
  • Math not rendering — Import katex/dist/katex.min.css
  • Caret not showing — Both caret prop AND isAnimating={true} are required
  • Copy buttons during streaming — Disabled automatically when isAnimating={true}
  • Link safety modal appearing — Enabled by default; disable with linkSafety={{ enabled: false }}
  • Shiki warning in Next.js — Install shiki explicitly, add to transpilePackages
  • allowedTags not working — Only works with default rehype plugins
  • Math uses $$ not $ — Single dollar is disabled by default to avoid currency conflicts

Other skills for the same job

different authors, same section of the catalogue
Use Dom
by openai
vendor ×3

Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.

3k tokens
Frontend Dev Guidelines
by mrgoonie
×2

Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features, fetching data, styling, routing, or working with frontend code.

33k tokens
Next Cache Components
by vercel-labs
vendor ×2

Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag

2k tokens
Shopify Development
by ComeOnOliver
×2

| Build Shopify apps, extensions, themes using GraphQL Admin API, Shopify CLI, Polaris UI, and Liquid. "shopify theme", "liquid template", "polaris", "shopify graphql", "shopify webhook", "shopify billing", "app subscription", "metafields", "shopify functions"

24k tokens scripts
Huggingface Gradio
by huggingface
vendor ×1

Build Gradio web UIs and demos in Python. Use when creating or editing Gradio apps, components, event listeners, layouts, or chatbots.

10k tokens
Figma Generate Diagram
by openai
vendor ×1

MANDATORY prerequisite — load this skill BEFORE every `generate_diagram` tool call. NEVER call `generate_diagram` directly without loading this skill first. Trigger whenever the user asks to create, generate, draw, render, sketch, or build a diagram — flowchart, architecture diagram, sequence diagram, ERD or entity-relationship diagram, state diagram or state machine, gantt chart, or timeline. Also trigger when the user mentions Mermaid syntax or wants a system architecture, decision tree, dependency graph, API call flow, auth handshake, schema, or pipeline visualized in FigJam. Routes to type-specific guidance, sets universal Mermaid constraints, and tells you when to use a different diagram type or skip the tool entirely (mindmaps, pie charts, class diagrams, etc.).

28k tokens
Web Perf
by cloudflare
vendor ×1

Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (LCP, INP, CLS) and supplementary metrics (FCP, TBT, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.

2k tokens
Algorithmic Art
by lingxling
×1

Algorithmic philosophies are computational aesthetic movements that are then expressed through code. Output .md files (philosophy), .html files (interactive viewer), and .js files (generative algorithms).

15k tokens scripts

How to use it

Copy the folder

Take vercel/streamdown from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npm. Without those the skill loads but fails at the first command.