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

markstream-migration

Skill này làm gì

Công cụ này giúp thay thế một chương trình hiện có đang hiển thị văn bản có định dạng (như văn bản có dấu sao để in đậm) bằng một chương trình mới tên Markstream. Nó đảm bảo mọi thứ tiếp tục hoạt động như trước, kể cả các phần tùy chỉnh và quy tắc bảo mật.

Khi nào nên dùng

  • ✓Khi thay thế các chương trình như 'react-markdown' hoặc 'markdown-it'.
  • ✓Khi chuyển đổi các thành phần hiển thị văn bản có định dạng.
  • ✓Khi chọn cách tốt nhất để hiển thị văn bản bằng Markstream.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-migration/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-migration/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ôi muốn chuyển trình hiển thị văn bản có định dạng hiện tại sang Markstream, đồng thời giữ các tùy chỉnh và bảo mật.”

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

Cách hoạt động

Công cụ phân tích cách chương trình hiện tại của bạn hiển thị văn bản, xác định các phần quan trọng (như tùy chỉnh và quy tắc bảo mật), rồi giúp cấu hình Markstream để làm điều tương tự. Trọng tâm là giữ nguyên hành vi hiển thị 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 Migration

Overview

Replace an existing Markdown renderer without silently dropping transforms, custom components, URL policy, raw-HTML behavior, or streaming semantics. Read references/adoption-checklist.md first.

When to Use

Use when replacing react-markdown, markdown-it, marked, or another renderer; migrating node renderers; or choosing between Markstream content, smooth streaming, and nodes.

Workflow

Before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval.

  1. Inventory renderer imports, call sites, plugins, HTML policy, URL transforms, allowlists, custom renderers, CSS, and tests.
  2. Classify the migration as direct, renderer-custom, plugin-heavy, or security-heavy.
  3. Install the framework package and explicit CSS. Preserve visible behavior before optional features.
  4. Map built-ins to scoped overrides; in React prefer renderer-local component maps.
  5. Use trusted custom tags only for trusted content and reserve parse transforms for irreducible token/AST requirements.
  6. Keep content with smooth streaming for ordinary token streams. Use nodes only for worker parsing, shared AST ownership, or structural transforms.
  7. Preserve safe HTML and strict Mermaid defaults; scope and document any trusted legacy exception.
  8. Run relevant builds and behavior tests. Report mappings, intentional differences, and unresolved review.

Example

// Before:
// import ReactMarkdown from 'react-markdown'
// return <ReactMarkdown>{markdown}</ReactMarkdown>

import MarkdownRender from 'markstream-react'
import 'markstream-react/index.css'

export function AssistantAnswer({
  markdown,
  isDone,
}: {
  markdown: string
  isDone: boolean
}) {
  return (
    <MarkdownRender
      content={markdown}
      final={isDone}
      fade={isDone}
      typewriter={!isDone}
      smoothStreaming={isDone ? false : 'auto'}
      htmlPolicy="safe"
    />
  )
}

Limitations

  • Markstream cannot reproduce every remark, rehype, or markdown-it plugin automatically.
  • Visual parity does not prove security or URL-policy parity.
  • Large migrations may require staged conversion.

Security & Safety Notes

Do not weaken sanitization for screenshot parity. Review dependencies, raw HTML, URL transforms, and trust boundaries explicitly.

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

Trình hiển thị Markdown là gì?

Đây là chương trình biến văn bản viết theo định dạng đặc biệt (như Markdown, dùng ký hiệu '*' để in đậm) thành thứ máy tính có thể hiển thị trên màn hình.

Trình hiển thị tùy chỉnh (custom renderers) là gì?

Đây là các phần tùy chỉnh của chương trình hiển thị văn bản, được tạo để hiển thị những phần tử đặc biệt theo cách riêng không chuẩn.

“Hành vi streaming” nghĩa là gì?

Đó là cách văn bản được hiển thị dần trên màn hình, như thể đang được gõ, thay vì xuất hiện cùng lúc.

Chi tiết

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

Audit and migrate an existing Markdown renderer to Markstream while preserving custom renderers, security policy, streaming behavior, and explicit parity gaps.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

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