本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)48k · #5170

markstream-migration

できること

このツールは、整形されたテキストを表示する既存のプログラム(アスタリスクで太字にするようなテキストを表示するもの)を、新しいMarkstreamに置き換えるのに役立ちます。カスタマイズ部分やセキュリティのルールを含め、これまでどおり動作し続けるように確認します。

使う場面

  • ✓「react-markdown」や「markdown-it」などのプログラムを置き換えるとき。
  • ✓整形されたテキストを表示するコンポーネントを移行するとき。
  • ✓Markstreamでテキストを表示する最適な方法を選ぶとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-migration/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-migration/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“今使っている整形テキストの表示機能をMarkstreamに切り替えたいです。カスタマイズとセキュリティはそのまま維持してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、現在のプログラムがどのようにテキストを表示しているかを分析し、カスタマイズやセキュリティルールなどの重要な部分を特定します。そのうえで、同じ動作をするようにMarkstreamの設定を手伝います。表示される動作とセキュリティの維持を重視します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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.

よくある質問

Markdownレンダラーとは何ですか?

Markdownのような特別な形式で書かれたテキストを、画面に視覚的に表示できる形に変換するプログラムです。Markdownでは、「*」のような記号を使って太字などを表します。

カスタムレンダラーとは何ですか?

テキスト表示プログラムの独自の部分で、標準にはない特別な方法で要素を表示するために作られたものです。

「streaming behavior」とはどういう意味ですか?

テキストが一度にすべて表示されるのではなく、まるで打ち込まれているかのように、少しずつ画面に表示される動作のことです。

詳細

作者による元の説明

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

人気

GitHubのスター
48k
ランキング
#5170
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル