Skip to content
Skillpedia
Websites & UI (frontend)48k · #3558

markstream-react

Lets your agent add Markstream to React or Next.js projects. It allows fast and secure content display, with customization options.

What it does

This tool helps integrate a new feature called 'markstream-react' into projects using React 18 or Next.js. It ensures everything works correctly between the browser and the server, and allows customization of how content is displayed.

When to use it

  • ✓When setting up a new React 18 or Next.js project.
  • ✓When you need to display content that arrives gradually (streaming).
  • ✓To replace or update how content is rendered.

Example of what to ask your AI

“How do I set up markstream-react in my Next.js project to display text that appears gradually?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-react/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-react/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool manages the connection between the code running on your computer (client) and the code running on the server. It uses specific files for each part (client/server entrypoints) and handles the appearance (CSS) and the state of gradually arriving content.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill markstream-react

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/markstream-react/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Markstream React

Overview

Wire the beta React renderer into React 18+ or Next.js without crossing client/server boundaries or reaching for AST control unnecessarily.

When to Use

Use for React/Next setup, root/next/server entrypoints, streaming, component overrides, or migration support. Pair with markstream-migration for renderer replacement.

Workflow

Inspect the existing package manager, installed package version and project conventions. A requested scoped integration already authorizes routine source/dependency edits; seek approval only for a material scope expansion or unresolved beta/alpha adoption decision.

  1. Confirm React 18+ and acceptance of a beta package.
  2. Install only requested peers and import markstream-react/index.css.
  3. Use the root entry for client rendering, /next for Next-specific components, and /server for server rendering without client hooks.
  4. Start with content and smoothStreaming="auto"; use nodes plus final only when another layer owns parsing.
  5. For live chat disable fade and opt into the cursor. On completion set final, disable pacing/cursor, and enable fade only if desired.
  6. Keep browser-only peers inside 'use client', dynamic ssr: false, or another minimal boundary.
  7. Prefer streamingComponents for parser-backed tags and htmlComponents for sanitized props. Use scoped registry overrides for built-in nodes.
  8. Keep htmlPolicy="safe" and Mermaid strict; validate client, server, and incremental paths.

Example

'use client' // Required when this example is used in a Next.js App Router client boundary

import MarkdownRender from 'markstream-react'
import 'markstream-react/index.css'

export function StreamingAnswer({
  content,
  isDone,
}: {
  content: string
  isDone: boolean
}) {
  return (
    <MarkdownRender
      content={content}
      final={isDone}
      fade={isDone}
      typewriter={!isDone}
      smoothStreaming={isDone ? false : 'auto'}
      htmlPolicy="safe"
    />
  )
}

Limitations

  • The package is beta and requires React 18+.
  • Browser-only peers require client boundaries under SSR.
  • Complex parser parity requires separate migration review.

Security & Safety Notes

Review dependencies and never opt untrusted model output into trusted HTML or loose diagram rendering.

Verify props, export paths and peer ranges against the installed package, not a mutable upstream main. Test partial and completed streams, malformed/untrusted Markdown, links and image URLs, cancellation and reduced motion. Safe HTML and strict diagrams reduce exposure but do not alone enforce URL/network privacy or application component permissions.

FAQ

What does 'beta' mean?

Beta means the feature is in a testing phase. It might have some issues, but it's already functional for most uses.

Do I need to use React 18?

Yes, this tool was made to work with React 18 or newer versions, and also with Next.js.

What are 'client/server entrypoints'?

These are different starting points in your code. One is for what runs in the user's browser (client) and another for what runs on the server where the website is hosted.

Details

Original description by the author

Integrate the beta markstream-react renderer into React 18+ or Next.js with correct client/server entrypoints, CSS, streaming state, and component overrides.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3558
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills