markstream-svelte – skill Thiết kế & UI cho agent AI
Tích hợp renderer markstream-svelte (beta) vào Svelte 5 hoặc SvelteKit với runes, CSS tường minh, streaming mượt, worker và ranh giới an toàn cho SSR.
Cài skill markstream-svelte bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/markstream-svelte-dba53.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /markstream-svelte – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/markstream-svelte-dba53.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $markstream-svelte – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/markstream-svelte-dba53.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /markstream-svelte – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/markstream-svelte-dba53.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /markstream-svelte – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc 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.
Skill liên quan
- markstream-vue2 – Tích hợp markstream-vue2 vào Vue 2.6 hoặc 2.7 với quyết định đúng về Composition API…
- markstream-vue2-vite – Tích hợp markstream-vue2 vào Vue 2 cùng Vite với import worker đã bundle, thứ tự CSS…
- material-design – Hướng dẫn triển khai Material Design cho Web và ứng dụng. Kích hoạt khi người dùng muốn…
- mermaid-expert – Tạo sơ đồ Mermaid cho flowchart, sequence, ERD và kiến trúc hệ thống. Thành thạo cú pháp…
- meta-tag-generator – Công cụ tạo Meta Tag. Dùng khi làm việc với tóm tắt trang, URL và ảnh thương hiệu hoặc…
- minimalism – Hướng dẫn triển khai web và app theo phong cách thiết kế Minimalism. Kích hoạt khi người…
- minimalist-ui – Dùng khi tạo giao diện biên tập gọn gàng với bảng màu đơn sắc ấm, viền rõ nét, chuyển…
- mobile-design – Thiết kế và review giao diện iOS, Android, React Native hoặc Flutter về thao tác cảm…