Markstream Migration
Overview
Replace an existing Markdown renderer without silently dropping transforms, custom components, URL policy, raw-HTML behavior, or streaming semantics. Read references/adoption-checklist.md first.
When to Use
Use when replacing react-markdown, markdown-it, marked, or another renderer; migrating node renderers; or choosing between Markstream content, smooth streaming, and nodes.
Workflow
Before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval.
- Inventory renderer imports, call sites, plugins, HTML policy, URL transforms, allowlists, custom renderers, CSS, and tests.
- Classify the migration as direct, renderer-custom, plugin-heavy, or security-heavy.
- Install the framework package and explicit CSS. Preserve visible behavior before optional features.
- Map built-ins to scoped overrides; in React prefer renderer-local component maps.
- Use trusted custom tags only for trusted content and reserve parse transforms for irreducible token/AST requirements.
- Keep
content with smooth streaming for ordinary token streams. Use nodes only for worker parsing, shared AST ownership, or structural transforms.
- Preserve safe HTML and strict Mermaid defaults; scope and document any trusted legacy exception.
- Run relevant builds and behavior tests. Report mappings, intentional differences, and unresolved review.
Example
// Before:
// import ReactMarkdown from 'react-markdown'
// return <ReactMarkdown>{markdown}</ReactMarkdown>
import MarkdownRender from 'markstream-react'
import 'markstream-react/index.css'
export function AssistantAnswer({
markdown,
isDone,
}: {
markdown: string
isDone: boolean
}) {
return (
<MarkdownRender
content={markdown}
final={isDone}
fade={isDone}
typewriter={!isDone}
smoothStreaming={isDone ? false : 'auto'}
htmlPolicy="safe"
/>
)
}
Limitations
- Markstream cannot reproduce every remark, rehype, or markdown-it plugin automatically.
- Visual parity does not prove security or URL-policy parity.
- Large migrations may require staged conversion.
Security & Safety Notes
Do not weaken sanitization for screenshot parity. Review dependencies, raw HTML, URL transforms, and trust boundaries explicitly.
Source: sickn33/agentic-awesome-skills → skills/markstream-migration/SKILL.md
Also appears in: sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/markstream-migration/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/markstream-migration/SKILL.md
1---2name: markstream-migration3description: "Audit and migrate an existing Markdown renderer to Markstream while preserving custom renderers, security policy, streaming behavior, and explicit parity gaps."4allowed-tools: "[claude, cursor, gemini, codex]"5category: engineering-core6source_repo: sickn33/agentic-awesome-skills7source_path: "skills/markstream-migration/SKILL.md"8source_url: https://github.com/sickn33/agentic-awesome-skills/blob/HEAD/skills/markstream-migration/SKILL.md9metadata:10 source: https://skillmd.com/skills/sickn33/markstream-migration11---121314# Markstream Migration1516## Overview1718Replace an existing Markdown renderer without silently dropping transforms, custom components, URL policy, raw-HTML behavior, or streaming semantics. Read [references/adoption-checklist.md](references/adoption-checklist.md) first.1920## When to Use2122Use when replacing `react-markdown`, `markdown-it`, `marked`, or another renderer; migrating node renderers; or choosing between Markstream `content`, smooth streaming, and `nodes`.2324## Workflow2526Before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval.27281. Inventory renderer imports, call sites, plugins, HTML policy, URL transforms, allowlists, custom renderers, CSS, and tests.292. Classify the migration as direct, renderer-custom, plugin-heavy, or security-heavy.303. Install the framework package and explicit CSS. Preserve visible behavior before optional features.314. Map built-ins to scoped overrides; in React prefer renderer-local component maps.325. Use trusted custom tags only for trusted content and reserve parse transforms for irreducible token/AST requirements.336. Keep `content` with smooth streaming for ordinary token streams. Use `nodes` only for worker parsing, shared AST ownership, or structural transforms.347. Preserve safe HTML and strict Mermaid defaults; scope and document any trusted legacy exception.358. Run relevant builds and behavior tests. Report mappings, intentional differences, and unresolved review.3637## Example3839```tsx40// Before:41// import ReactMarkdown from 'react-markdown'42// return <ReactMarkdown>{markdown}</ReactMarkdown>4344import MarkdownRender from 'markstream-react'45import 'markstream-react/index.css'4647export function AssistantAnswer({48 markdown,49 isDone,50}: {51 markdown: string52 isDone: boolean53}) {54 return (55 <MarkdownRender56 content={markdown}57 final={isDone}58 fade={isDone}59 typewriter={!isDone}60 smoothStreaming={isDone ? false : 'auto'}61 htmlPolicy="safe"62 />63 )64}65```6667## Limitations6869- Markstream cannot reproduce every remark, rehype, or markdown-it plugin automatically.70- Visual parity does not prove security or URL-policy parity.71- Large migrations may require staged conversion.7273## Security & Safety Notes7475Do not weaken sanitization for screenshot parity. Review dependencies, raw HTML, URL transforms, and trust boundaries explicitly.7677---7879**Source:** [`sickn33/agentic-awesome-skills`](https://github.com/sickn33/agentic-awesome-skills) → `skills/markstream-migration/SKILL.md`8081**Also appears in:** `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/markstream-migration/SKILL.md`, `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/markstream-migration/SKILL.md`