markstream-react
できること
このツールは、React 18またはNext.jsを使ったプロジェクトに「markstream-react」という新機能を組み込むのに役立ちます。ブラウザとサーバーの間で正しく動作するようにし、コンテンツの表示方法をカスタマイズできるようにします。
使う場面
- ✓React 18またはNext.jsの新しいプロジェクトを立ち上げるとき。
- ✓少しずつ届くコンテンツ(ストリーミング)を表示する必要があるとき。
- ✓コンテンツの描画方法を置き換えたり更新したりしたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-react/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Next.jsのプロジェクトで、少しずつ表示されるテキストを出すためにmarkstream-reactを設定するにはどうすればよいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、パソコン上で動くコード(クライアント)と、サーバー上で動くコードの接続を管理します。各部分には専用のファイル(クライアント用とサーバー用のエントリーポイント)を使い、見た目(CSS)と、少しずつ届くコンテンツの状態を扱います。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Markstream React
Overview
Wire the beta React renderer into React 18+ or Next.js without crossing client/server boundaries or reaching for AST control unnecessarily.
When to Use
Use for React/Next setup, root/next/server entrypoints, streaming, component overrides, or migration support. Pair with markstream-migration for renderer replacement.
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.
- Confirm React 18+ and acceptance of a beta package.
- Install only requested peers and import
markstream-react/index.css. - Use the root entry for client rendering,
/nextfor Next-specific components, and/serverfor server rendering without client hooks. - Start with
contentandsmoothStreaming="auto"; usenodesplusfinalonly when another layer owns parsing. - For live chat disable fade and opt into the cursor. On completion set
final, disable pacing/cursor, and enable fade only if desired. - Keep browser-only peers inside
'use client', dynamicssr: false, or another minimal boundary. - Prefer
streamingComponentsfor parser-backed tags andhtmlComponentsfor sanitized props. Use scoped registry overrides for built-in nodes. - Keep
htmlPolicy="safe"and Mermaid strict; validate client, server, and incremental paths.
Example
'use client' // Required when this example is used in a Next.js App Router client boundary
import MarkdownRender from 'markstream-react'
import 'markstream-react/index.css'
export function StreamingAnswer({
content,
isDone,
}: {
content: string
isDone: boolean
}) {
return (
<MarkdownRender
content={content}
final={isDone}
fade={isDone}
typewriter={!isDone}
smoothStreaming={isDone ? false : 'auto'}
htmlPolicy="safe"
/>
)
}
Limitations
- The package is beta and requires React 18+.
- Browser-only peers require client boundaries under SSR.
- Complex parser parity requires separate migration review.
Security & Safety Notes
Review dependencies and never opt untrusted model output into trusted HTML or loose diagram rendering.
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.
よくある質問
「beta」とはどういう意味ですか?
betaは、その機能がテスト段階にあることを意味します。いくつか問題が残っている可能性がありますが、ほとんどの用途ですでに使える状態です。
React 18を使う必要がありますか?
はい、このツールはReact 18以降のバージョンと、Next.jsで動作するように作られています。
「client/server entrypoints」とは何ですか?
コードの異なる開始点のことです。1つは利用者のブラウザで動く部分(クライアント)用で、もう1つはWebサイトを置くサーバーで動く部分用です。
詳細
作者による元の説明
Integrate the beta markstream-react renderer into React 18+ or Next.js with correct client/server entrypoints, CSS, streaming state, and component overrides.
人気
- GitHubのスター
- 48k
- ランキング
- #5172
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。