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

markstream-svelte

Skill này làm gì

Công cụ này giúp thêm thành phần Markstream vào dự án Svelte 5 hoặc SvelteKit. Nó cho phép hiển thị nội dung có định dạng (như văn bản có ký hiệu đặc biệt) một cách hiệu quả và có hoạt ảnh mượt, giống như đang được gõ.

Khi nào nên dùng

  • ✓Khi bạn bắt đầu dự án mới với Svelte 5 hoặc SvelteKit.
  • ✓Khi bạn muốn hiển thị nội dung có định dạng xuất hiện dần dần (streaming).
  • ✓Khi bạn cần các tính năng nâng cao như 'workers' để xử lý nền.

Liên kết skill

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

“Tích hợp Markstream vào dự án Svelte 5 của tôi để hiển thị các bài viết.”

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

Cách hoạt động

Công cụ kết nối một thành phần đặc biệt (Markstream) với mã Svelte của bạn. Bạn dùng nó để định nghĩa cách nội dung được hiển thị, bao gồm các tùy chọn về hoạt ảnh và bảo 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 Svelte

Overview

Integrate Markstream using Svelte 5 runes and SvelteKit-safe browser boundaries.

When to Use

Use for Svelte 5 or SvelteKit package setup, streaming state, workers, or scoped custom components. Svelte 4 is unsupported.

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 Svelte 5 and acceptance of a beta package.
  2. Install only requested peers; import package CSS after resets and KaTeX CSS only for math.
  3. Start with <MarkdownRender {content} /> and smooth streaming auto.
  4. For live chat disable fade and opt into the cursor; on completion set final, disable pacing/cursor, and enable fade only if desired.
  5. Use nodes only for worker-owned parsing or shared AST state.
  6. Use $props() and callbacks. Configure KaTeX or Mermaid workers only when requested.
  7. Prefer renderer-local customComponents; use scoped registration only when sharing is intentional.
  8. Keep browser-only workers behind SvelteKit client boundaries; validate with svelte-check, build, or e2e.

Example

<script lang="ts">
  import MarkdownRender from 'markstream-svelte'
  import 'markstream-svelte/index.css'

  let { content, isDone }: { content: string; isDone: boolean } = $props()
</script>

<MarkdownRender
  {content}
  final={isDone}
  fade={isDone}
  typewriter={!isDone}
  smoothStreaming={isDone ? false : 'auto'}
  htmlPolicy="safe"
/>

Limitations

  • Svelte 4 is unsupported and the package is beta.
  • Workers and heavy peers require client-side bundler support.
  • This skill does not migrate unrelated Svelte architecture.

Security & Safety Notes

Keep safe HTML and strict Mermaid defaults. Review dependencies and never run browser-only peers during SSR.

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.

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

Dự án của tôi dùng Svelte 4, có dùng được không?

Không, công cụ này chỉ dành cho Svelte 5 hoặc SvelteKit và đang trong giai đoạn beta (thử nghiệm).

“Workers” là gì?

Đây là những trợ thủ nhỏ làm việc ở nền để xử lý thông tin mà không làm đơ màn hình chính.

Hiển thị nội dung từ internet có an toàn không?

Có, công cụ có các cài đặt bảo mật để xử lý nội dung HTML và sơ đồ một cách an toàn, nhưng bạn nên kiểm tra lại.

Chi tiết

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

Integrate the beta markstream-svelte renderer into Svelte 5 or SvelteKit with runes, explicit CSS, smooth streaming, workers, and SSR-safe boundaries.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

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