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

markstream-vue2-vite

Skill này làm gì

Công cụ này giúp bạn dùng thành phần 'markstream-vue2' trong các dự án Vue 2 có sử dụng Vite. Nó đảm bảo mọi thứ hoạt động đúng, bao gồm các tính năng đặc biệt như biểu đồ (Mermaid) và công thức toán (KaTeX).

Khi nào nên dùng

  • ✓Khi dự án của bạn dùng Vue 2 và Vite.
  • ✓Khi bạn cần biểu đồ (Mermaid) hoặc công thức (KaTeX) hoạt động trong dự án Vue 2.
  • ✓Khi bạn muốn tích hợp thành phần 'markstream-vue2' một cách an toàn và hiệu quả.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-vue2-vite/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-vue2-vite/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

“Làm sao để thiết lập markstream-vue2 trong dự án Vue 2 với Vite để hiển thị biểu đồ?”

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

Cách hoạt động

Công cụ cấu hình dự án để Vite có thể 'đóng gói' và dùng các tính năng đặc biệt của markstream-vue2, như tính năng cho biểu đồ. Nó cũng điều chỉnh cách văn bản được hiển thị để an toàn và nhanh hơn.

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 Vue 2 Vite

Overview

Use Vite-native worker bundling while preserving Vue 2 compatibility and rendering safety.

When to Use

Use when the host is Vue 2 with Vite and needs bundled Mermaid or KaTeX workers. Use the generic Vue 2 skill when worker/bundler behavior is irrelevant.

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 Vue 2 with Vite and install only requested peers.
  2. Import markstream-vue2/index.css after reset, Tailwind, or UnoCSS layers.
  3. Use package worker entrypoints with Vite ?worker or ?worker&inline imports only when needed.
  4. Add @vue/composition-api only for Vue 2.6 code requiring it.
  5. Keep content with smooth streaming for chat; set final and disable pacing/cursor for history.
  6. Use nodes only for externally owned parsing. Keep HTML safe and Mermaid strict.
  7. Validate the Vite build and worker loading path.

Example

<script>
import MarkdownRender from 'markstream-vue2'
import 'markstream-vue2/index.css'

export default {
  components: { MarkdownRender },
  props: { content: String, done: Boolean },
}
</script>

<template>
  <MarkdownRender
    :content="content"
    :final="done"
    :fade="done"
  />
</template>

Limitations

  • Vite worker syntax is not portable to Vue CLI/Webpack 4.
  • Inline workers can increase bundle size.
  • Optional peers may impose additional browser requirements.

Security & Safety Notes

Review worker source, CSP, dependency changes, and bundle impact. Do not relax safe rendering defaults.

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.

Vue 2 is end-of-life; preserve a requested legacy integration and document its maintenance/support decision rather than silently upgrading the whole application. Prefer reviewed locally bundled workers over mutable CDN code where feasible.

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

Vite là gì?

Vite là công cụ hiện đại để xây dựng dự án web, nổi tiếng về tốc độ.

Vue 2 là gì?

Vue 2 là phiên bản cũ hơn nhưng vẫn được dùng rộng rãi của một framework phổ biến để tạo giao diện web.

“Workers” là gì?

Workers là các chương trình nhỏ chạy ở nền để thực hiện tác vụ mà không làm đơ giao diện chính của website.

Chi tiết

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

Integrate markstream-vue2 into Vue 2 plus Vite with bundled worker imports, CSS ordering, Composition API compatibility, and safe streaming defaults.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

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