markstream-react

Integration guidance for adding the beta markstream-react package to React 18+ or Next applications. The package renders Markdown and can display streamed AI-generated content.

In plain words
What is it for?
Use it to install the package, import its CSS, choose client, Next, or server rendering, render content or nodes, configure streamed chat output, and add local custom components.
Why use it?
It helps choose the correct renderer entry point and avoid styling, client/server boundary, and streaming setup problems.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/simon-he95/markstream-vue/markstream-react
Any agent
npx skills add Simon-He95/markstream-vue --skill markstream-react
Clone the repo
git clone --depth 1 https://github.com/Simon-He95/markstream-vue

Made for: Claude Code, Codex.

Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,024 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00094 $0.01024
Opus 5 $0.00047 $0.00512
Sonnet 5 $0.00019 $0.00205
Haiku 4.5 $0.00009 $0.00102

Measured 2d ago against content hash 37305730b16a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

markstream-react scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/markstream-react/SKILL.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Markstream React

Use this skill when the host app is React or Next and the task is to wire Markstream safely.

Workflow

  1. Confirm the repo is React 18+ or a compatible Next host and accepts a beta renderer API.
  2. Install markstream-react plus only the requested optional peers.
  3. Import markstream-react/index.css from the app shell or client entry.
  4. Choose the entrypoint that matches the rendering boundary.
    • Use markstream-react for the normal client renderer.
    • Use markstream-react/next for the Next-specific component surface.
    • Use markstream-react/server for server rendering without client hooks.
  5. Start with content.
    • For streaming or high-frequency AI output, keep content and use built-in smooth streaming first.
      • smoothStreaming="auto" is the default and activates when typewriter={true} or maxLiveNodes <= 0.
      • typewriter only controls the blinking cursor and defaults to false.
      • fade controls node enter and streamed-text fade animations and defaults to true.
    • Streaming vs recovering history: in chat UIs the same renderer starts streaming and later switches to history when final={true}.
      • Streaming: smoothStreaming="auto", fade={false}, typewriter={true}. Smooth pacing handles gradual appearance; fade would flicker.
      • Recovering history: smoothStreaming={false}, fade={true}, typewriter={false}. Content is already complete — pacing would slow it down, but fade gives a polished entry animation.
      • Dynamic switch: smoothStreaming={isStreaming ? 'auto' : false}, fade={!isStreaming}.
    • Move to nodes + final only for worker-preparsed content, shared AST stores, or custom AST control.
    • Remember that htmlPolicy now defaults to safe, and Mermaid strict mode is on by default through mermaidProps.
  6. Respect SSR boundaries in Next.
    • Prefer use client, dynamic imports with ssr: false, or other client-only boundaries when browser-only peers are involved.
  7. Use renderer-local components before custom parser work.
    • streamingComponents receives parser-backed NodeComponentProps, supports incomplete custom tags, and automatically contributes its keys to the effective customHtmlTags list.
    • htmlComponents receives sanitized HTML attributes plus children; it does not receive the parser node/loading contract.
    • Prefer defineStreamingComponents(...) and defineHtmlComponents(...) for typed maps.
    • Keep scoped setCustomComponents for built-in node overrides or shared compatibility registration.
    • Use parseOptions transforms only when migration requires token or AST changes.
  8. Validate with the smallest useful dev, build, or typecheck command.

Read the full file on GitHub · 61 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 61 lines · 94 tokens per session scan A 37305730b16a

Subscribe to this mod's changes

markstream-react is a skill published in the GitHub repository Simon-He95/markstream-vue (2,972 stars, last pushed 2d ago), licensed MIT. It adds 94 tokens to every session and 1,024 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

wiki-sync

Synthesize a single source note into the vault's wiki/ folder — read the source, find or create the right wiki entry, write it back with proper frontmatter and source links. Used by Lumina's background wiki manager when a note changes.

blueberrycongee/Lumina-Note · 53 tokens

image-gen

Generate images for the user's vault — pick the right provider, gather reference images from notes when relevant, write the result to assets/generated/, and surface the markdown reference. Use this when the user asks for any picture, illustration, mood image, poster, or visual companion to a note.

blueberrycongee/Lumina-Note · 60 tokens

pdf-press

Teaches agents how to generate Markdown, HTML (with embedded SVG), and Mermaid content that renders beautifully to multi-page PDF via writepdf, with proper page breaks, compact professional layouts, brand and domain-adaptive color schemes, multi-column support for scientific papers, magazine-style editorial documents…

kdcube/kdcube · 74 tokens

png-press

Teaches agents how to author content and configure writepng so PNGs render at the correct size, with tight cropping, readable text, and consistent scaling.

kdcube/kdcube · 36 tokens

react-ui-patterns

Modern React UI patterns for loading states, error handling, and data fetching. Use when building UI components, handling async data, or managing UI states.

bocan/codex · 35 tokens

astro-docs

Comprehensive Astro framework reference covering components, pages, layouts, routing, styling, markdown, content collections, islands architecture, server islands, actions, middleware, endpoints, data fetching, view transitions, integrations, deployment, environment variables, imports, images, fonts, i18n, sessions…

pledgeandgrow/pledge-skills · 112 tokens