markstream-install – Documents & Office skill for AI agents
Install and configure Markstream streaming Markdown renderers for Vue, React, Svelte, Angular, Nuxt, Next.js, and Vue 2 applications.
Install the markstream-install skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/markstream-install-39527.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /markstream-install – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/markstream-install-39527.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $markstream-install – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/markstream-install-39527.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /markstream-install – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/markstream-install-39527.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /markstream-install – then describe the task you want done.
SKILL.md content
Markstream Install
Overview
Integrate the correct [Markstream](https://github.com/Simon-He95/markstream-vue) streaming Markdown renderer into an existing frontend application. This skill selects the framework package, installs only requested optional peers, preserves safe HTML and Mermaid defaults, and handles CSS, streaming state, and SSR boundaries.
Read [references/scenarios.md](references/scenarios.md) before selecting packages or optional peers.
When to Use
Use this skill when the user asks to:
- add streaming Markdown rendering to an AI chat or document interface;
- install Markstream in Vue, Nuxt, React, Next.js, Svelte, Angular, or Vue 2;
- repair missing Markstream styles, an incorrect framework package, or an SSR failure;
- replace another Markdown renderer with Markstream;
- choose between static content, built-in smooth streaming, or externally parsed AST input.
How It Works
1. Inspect the host application
Before changing dependencies, inspect:
- the framework and version in
package.json; - the existing package-manager lockfile;
- whether the application uses SSR;
- reset, Tailwind, UnoCSS, or design-system styles;
- required optional features such as highlighted code, Monaco, Mermaid, D2, or KaTeX.
Do not select markstream-vue merely because the source repository has Vue in its name. Choose the framework-specific package from the scenario table.
2. Install the smallest dependency set
Before installing or changing source files, preview the exact dependency and code changes and obtain explicit user approval. Do not switch package managers or replace an existing renderer implicitly.
Install exactly one framework package and preserve the repository's package manager. Add optional peers only when the requested UI uses their feature.
Examples:
npm install markstream-vue
npm install markstream-react
npm install markstream-svelte
npm install markstream-angular
npm install markstream-vue2For Vue 2.6, also install and register @vue/composition-api. Vue 2.7 has a built-in Composition API and must not install that plugin.
3. Wire styles in the correct order
Import application resets before Markstream styles. Import package CSS explicitly instead of relying on component imports to inject it.
For Tailwind or UnoCSS, put the matching package stylesheet in a component layer:
@import 'markstream-vue/index.css' layer(components);When math rendering is enabled, also import:
@import 'katex/dist/katex.min.css';Vue CLI 4 and other Webpack 4-based Vue 2 projects do not understand package export maps. Use the published file path in those projects:
import 'markstream-vue2/dist/index.css'4. Add the smallest working renderer
Prefer content for static documents and most streaming chat interfaces. Markstream's built-in smooth streaming can pace irregular token delivery without requiring the host application to maintain an AST.
Use nodes plus final only when a worker, shared AST store, custom transform, or another application layer already owns parsing.
5. Handle framework boundaries
- In Nuxt, keep browser-only optional peers behind client boundaries.
- In Next.js, use root
markstream-reactinside a'use client'component for live SSE or WebSocket streams. - Use
markstream-react/nextfor SSR-first HTML with hydration andmarkstream-react/serverfor server-only rendering. - Use
markstream-svelteonly with Svelte 5. - Confirm the host meets the current
markstream-angularversion requirement. - In Vue 3, use
mode="chat"for AI chat,mode="docs"for rich documents, andmode="minimal"for lightweight non-chat surfaces.
6. Preserve safe defaults
HTML policy defaults to safe, and Mermaid uses strict mode. Do not broaden either setting unless the user explicitly identifies a trusted legacy surface that requires it. Scope any exception to that surface.
7. Validate
Run the smallest relevant build, typecheck, or test command. Confirm:
1. the selected package matches the framework;
2. only requested optional peers were added;
3. styles load after resets;
4. SSR pages do not evaluate browser-only peers on the server;
5. static content and at least one incremental update render correctly.
Report the selected package, added peers, CSS location, streaming input choice, and validation command.
Examples
Vue 3 streaming chat
<MarkdownRender
mode="chat"
:content="markdown"
:final="false"
smooth-streaming="auto"
:fade="false"
typewriter
/>Vue 3 completed chat history
<MarkdownRender
mode="chat"
:content="markdown"
:final="true"
:smooth-streaming="false"
:fade="true"
:typewriter="false"
/>Setting final=true tells the parser that the document is complete; disabling pacing alone does not finalize trailing constructs.
Best Practices
- Install the minimal peer set instead of every optional integration.
- Keep the renderer mode stable when a chat message transitions from streaming to history.
- Let an existing outer message virtualizer own mounted rows; coordinate Markstream height metrics instead of adding a competing virtualizer.
- Scope component overrides with
customIdorcustom-idwhen multiple render surfaces coexist. - Test SSR and incremental client updates separately.
Limitations
- This skill does not choose application-specific visual styling or chat architecture.
- Optional browser-heavy peers can require framework-specific client boundaries and bundler configuration.
- Vue 2.6 and legacy Webpack projects require the compatibility steps documented above.
- Current package and framework requirements must be checked against the host lockfile and Markstream documentation before installation.
Security & Safety Notes
- Package installation changes the dependency manifest and lockfile. Review the proposed package set before running the install command.
- Do not enable trusted HTML or non-strict Mermaid rendering for untrusted model output.
- Keep optional browser runtimes out of server-only execution paths.
- Run installs only inside the intended project directory and use its existing package manager.
Common Pitfalls
- Problem: Styles appear missing or are overwritten.
Solution: Load resets first, then the matching Markstream stylesheet explicitly.
- Problem: A completed response still looks incomplete.
Solution: Set final=true when the stream finishes, not only smoothStreaming=false.
- Problem: Next.js evaluates browser-only code on the server.
Solution: Select the root, /next, or /server entry according to the render boundary.
- Problem: Lightweight highlighting does not activate after installing
stream-markdown.
Solution: On Vue, Vue 2, or React, configure MarkdownCodeBlockNode as the code_block override.
Additional Resources
- [Installation](https://markstream.simonhe.me/guide/installation)
- [AI chat and streaming](https://markstream.simonhe.me/guide/ai-chat-streaming)
- [Performance](https://markstream.simonhe.me/guide/performance)
- [Troubleshooting](https://markstream.simonhe.me/guide/troubleshooting)
- [Component overrides](https://markstream.simonhe.me/guide/component-overrides)
Related skills
- maximalism – Web and App implementation guide for Controlled Maximalism. Trigger when user wants lots…
- md2video-audio – Convert Markdown documents into narrated MP4 videos with synchronized visuals and voice…
- mdpr-skill – Review MDPR Markdown presentation workflows with semantic hints, visual checks, and…
- mock-hunter – Audit a live web page in five phases (catalog, click, trace, classify, report) to…
- nanobanana-ppt-skills – AI-powered PPT generation with document analysis and styled images
- obsidian-markdown – Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties…
- odoo-edi-connector – Guide for implementing EDI (Electronic Data Interchange) with Odoo: X12, EDIFACT…
- odoo-qweb-templates – Expert in Odoo QWeb templating for PDF reports, email templates, and website pages…