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

markstream-install

Skill này làm gì

Công cụ này giúp cài đặt và cấu hình Markstream, một chương trình hiển thị văn bản có định dạng (như từ các cuộc trò chuyện AI) trên website và ứng dụng xây dựng bằng Vue, React và Svelte. Nó đảm bảo chỉ cài các phần cần thiết, giữ an toàn cho dự án.

Khi nào nên dùng

  • ✓Khi bạn cần thêm hiển thị văn bản có định dạng vào các cuộc trò chuyện AI.
  • ✓Khi bạn cài Markstream trong dự án Vue, React, Svelte hoặc tương tự.
  • ✓Khi bạn cần sửa lỗi cài đặt hoặc lỗi giao diện của Markstream.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/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/github/awesome-copilot/blob/main/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 Vue 3 trong dự án Nuxt, có tô sáng mã và hỗ trợ công thức toán.”

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

Cách hoạt động

Công cụ trước tiên kiểm tra dự án để xác định công nghệ đang dùng (Vue, React, v.v.) và các tính năng bổ sung bạn cần. Sau đó, nó cài gói Markstream phù hợp và cấu hình kiểu hiển thị.

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

Integrate the appropriate Markstream package into an existing application without installing unnecessary optional dependencies or weakening its security defaults.

Read references/scenarios.md before choosing packages or 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 a broken Markstream installation, missing styles, or SSR failure;
  • replace another Markdown renderer with Markstream;
  • choose between static, smooth-streaming, and externally parsed AST input.

Workflow

1. Inspect the host application

Before changing dependencies, inspect:

  • the framework and version in package.json;
  • the package manager lockfile;
  • whether the application uses SSR;
  • reset, Tailwind, UnoCSS, or design-system styles;
  • required optional features: code highlighting, enhanced File/Diff surfaces, Monaco, Mermaid, D2, infographic blocks, or KaTeX.

Do not assume the Vue package is correct merely because the source repository is named markstream-vue. Select the framework-specific package from the scenario table.

2. Install the smallest dependency set

Install exactly one framework package. 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

Preserve the repository's existing package manager. Do not install every optional peer preemptively.

3. Wire styles in the correct order

Import application resets before Markstream styles. Import package CSS explicitly; do not rely on component imports to inject it.

For Tailwind or UnoCSS, use the relevant package subpath in a component layer:

@import 'markstream-vue/index.css' layer(components);

Use the matching package name for React, Svelte, Angular, or Vue 2. If math rendering is enabled, also import:

@import 'katex/dist/katex.min.css';

Vue CLI 4 and other Webpack 4-based Vue 2 applications cannot resolve package export maps. In those projects, import the published file directly:

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 to maintain an AST.

For Vue 3 chat surfaces, start with:

<MarkdownRender
  mode="chat"
  :content="markdown"
  :final="false"
  smooth-streaming="auto"
  :fade="false"
  typewriter
/>

For completed chat history, keep the same renderer mode and switch pacing off:

<MarkdownRender
  mode="chat"
  :content="markdown"
  :final="true"
  :smooth-streaming="false"
  :fade="true"
  :typewriter="false"
/>

In React, Svelte, and Angular, use the equivalent camelCase or framework binding syntax. Keep smoothStreaming="auto", fade=false, and typewriter=true while streaming; use smoothStreaming=false and typewriter=false for completed history.

Use nodes plus final only when a worker, shared AST store, custom transform, or another application layer already owns parsing.

5. Handle framework-specific boundaries

  • In Nuxt, keep browser-only optional peers behind client boundaries.
  • In Next.js, use the root markstream-react entry inside a 'use client' component for live SSE or WebSocket streams. Use markstream-react/next for SSR-first HTML with hydration, or markstream-react/server for server-only rendering.
  • Use markstream-svelte only with Svelte 5.
  • Confirm the Angular application 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.
  • For long Vue 3 conversations or an existing message virtualizer, consult the Markstream performance guide before adding a second virtualizer.

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

…

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

Markstream là gì?

Markstream là một thư viện giúp hiển thị văn bản có định dạng một cách hiệu quả trong ứng dụng web, chẳng hạn như văn bản do trí tuệ nhân tạo tạo ra.

Vì sao tôi cần chọn gói riêng cho framework của mình (Vue, React, v.v.)?

Mỗi framework có đặc thù riêng. Cài đúng gói giúp Markstream hoạt động hoàn hảo với công nghệ của dự án, không xung đột và không có phụ thuộc thừa.

“Optional dependencies” là gì?

Đây là các tính năng bổ sung mà Markstream có thể có, như tô sáng mã hoặc hỗ trợ công thức. Công cụ chỉ cài những gì bạn thật sự yêu cầu, giúp dự án nhẹ hơn và an toàn hơ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, and Vue 2 applications. Use for package selection, minimal peer dependencies, CSS order, SSR boundaries, streaming mode, and renderer setup.

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7276
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ự