Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)48k · #5169

markstream-install

Skill này làm gì

Công cụ này giúp cài đặt và cấu hình một thành phần tên Markstream trong dự án lập trình của bạn. Nó cho phép website hiển thị văn bản có định dạng (như Markdown) một cách linh hoạt, tương tự giao diện trò chuyện.

Khi nào nên dùng

  • ✓Khi bạn thêm một khung chat hiển thị văn bản đang được gõ theo thời gian thực.
  • ✓Khi bạn cài Markstream trong dự án Vue, React, Svelte hoặc Angular.
  • ✓Khi bạn sửa lỗi hiển thị văn bản hoặc vấn đề tương thích với máy chủ.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-install/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Cài đặt Markstream cho React trong dự án của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ kiểm tra dự án của bạn dùng công nghệ nào (như React hoặc Vue), cài phiên bản Markstream phù hợp và thiết lập kiểu dáng để văn bản hiển thị đúng, ngay cả khi nó đến từng phần một.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Markstream Install

Overview

Integrate the correct Markstream 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 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-vue2

For 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-react inside a 'use client' component for live SSE or WebSocket streams.
  • Use markstream-react/next for SSR-first HTML with hydration and markstream-react/server for server-only rendering.
  • Use markstream-svelte only with Svelte 5.
  • Confirm the host meets the current markstream-angular version requirement.
  • In Vue 3, use mode="chat" for AI chat, mode="docs" for rich documents, and mode="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"

…
Câu hỏi thường gặp

Markdown là gì?

Markdown là cách định dạng văn bản đơn giản bằng các ký tự đặc biệt, như dấu sao để in đậm. Nó được dùng rộng rãi trong tài liệu và các khung chat.

“Streaming” nghĩa là gì?

Streaming là khi nội dung được gửi và hiển thị dần dần, thay vì hiện ra cùng lúc. Hãy nghĩ đến cách một video tải dần khi bạn xem.

“Optional peers” là gì?

Đây là các tính năng bổ sung mà Markstream có thể dùng, như tô sáng mã hoặc sơ đồ. Công cụ chỉ cài những tính năng bạn thực sự cần.

Chi tiết

Mô tả gốc của tác giả

Install and configure Markstream streaming Markdown renderers for Vue, React, Svelte, Angular, Nuxt, Next.js, and Vue 2 applications.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5169
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự