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

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がスキルを読んで指示に従います。

貼り付け用メッセージ

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

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.

  1. Confirm React 18+ and acceptance of a beta package.
  2. Install only requested peers and import markstream-react/index.css.
  3. Use the root entry for client rendering, /next for Next-specific components, and /server for server rendering without client hooks.
  4. Start with content and smoothStreaming="auto"; use nodes plus final only when another layer owns parsing.
  5. For live chat disable fade and opt into the cursor. On completion set final, disable pacing/cursor, and enable fade only if desired.
  6. Keep browser-only peers inside 'use client', dynamic ssr: false, or another minimal boundary.
  7. Prefer streamingComponents for parser-backed tags and htmlComponents for sanitized props. Use scoped registry overrides for built-in nodes.
  8. 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.

repo: sickn33/agentic-awesome-skills

人気

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

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

0

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

コメント

  • …

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

似ているスキル