stream-react
БесплатноБез исполняемых скриптовНе проверенBuild, integrate, audit, or upgrade Stream Chat, Video, Feeds, and Moderation in React / Next.js web apps - the default skill for web work. Scaffold a new…
от GetStream★ 21 звезда на GitHubОб этом скилле
Stream React (web)
Docs
Don't write Stream SDK code from memory. APIs change between majors, so your
memory is stale. Read the docs first, via the getstream docs command:
cat $(getstream docs chat-sdk/react)/INDEX.md
Client and UI: chat-sdk/react, video/react, activity-feeds/react. Node.js
backend (e.g. Next.js routes): chat/node, activity-feeds/node, moderation/node.
Stream Agents (sessions, voice, tools): agents.
Previous majors are available too (chat-sdk/react/v
Chat SDK majors can differ deeply (state, layout, configuration). Before any Chat code, pin the installed major, read only that major's docs (never the unversioned id on trust), and treat SDK names in this skill and in your memory as leads to confirm there - follow chat-versions.md.
Setup
Start with getstream init (binds the working dir to a Stream app, existing or
new) and getstream env (credentials).
For new apps, Next.js + Tailwind + shadcn with the default theme is a good
choice unless the user says otherwise. Latest shadcn uses Base UI, not Radix: no
asChild, and don't wrap trigger components in <Button>.
Install the SDKs:
- Chat:
stream-chat stream-chat-react(see chat-versions.md for which major) - Video:
@stream-io/video-react-sdk - Feeds:
@stream-io/feeds-react-sdk - Stream Agents:
@stream-io/stream-agents, plus the Chat and Video packages above for its UI (stream-agents.md) - Server-side:
@stream-io/node-sdk
Don't bump an already-installed Stream major.
Writes through getstream api (product configuration: channel types, feed
groups, moderation policies, and the Video label below) are app-wide. Before the
first one, run getstream status and tell the user which app it will change, so
a stale CLI binding doesn't write to the wrong (possibly production) app. Ask
before each app-wide write, and run it only once the user agrees.
For Video apps, offer to label the use case once (metadata, no runtime effect), and set it once the user agrees:
getstream api UpdateApp --request '{"video_primary_use_case":"livestreaming"}'
Allowed values: video-calling, voice-calling, livestreaming,
audio-rooms, ai-agents, live-shopping, other. Derive it from what the
app is, not from the call type in use (Whatnot runs on the livestream call
type but is live-shopping). Any commerce signal means live-shopping. Unsure
means other.
Product configuration (channel types, feed groups, moderation policies) goes
through getstream api, with the user's go-ahead as above.
Auth and users
Tokens are minted server-side: a route (e.g. /api/token) uses the secret and
returns the token with the apiKey. The secret never reaches the client. An app
that already has auth or a token endpoint gets it extended, not a second one.
Start with a login screen. Don't auto-connect, don't hardcode user credentials, don't seed demo users or content on app load. The token route upserts only the requesting user. Keep credentials in React state, not localStorage, so two tabs can be two users.
Building
Clients mount once, at the app shell. Don't disconnectUser() in a screen's
cleanup - it kills the client every other screen shares. Per-screen cleanup is
channel.stopWatching() or call.leave().
Be careful with client initialization within React Strict Mode. Instead of using an effect, use specialized hooks:
- Chat:
useCreateChatClient() - Feeds:
useCreateFeedsClient() - Video: construct
StreamVideoClientin auseEffectwithdisconnectUser()cleanup; the constructor is synchronous, no timer or mounted flag needed. Define thetokenProviderinside that effect - an inline provider in the dependency array is a new identity every render and recreates the client. Never use auseRefflag as a run-once guard in an effect with cleanup: the ref survives the remount, so the second mount skips setup entirely.
Start with prebuilt Stream SDK components. Customize them via documented props and hooks. Feeds has no prebuilt UI - build from its hooks.
Land on a channel list, lobby, or feed by default - never directly in a call or a camera prompt. Camera/mic permission is requested only on an explicit action (Join, Go Live), behind a preview. Empty states say what to do next.
Chat:
- Custom reaction types are slugs (
[A-Za-z0-9_.-]; emoji are rejected server-side) and must be registered inreactionOptions- unregistered types silently don't render. Fallback: render pills frommessage.reaction_groups. - Feature gating: the source of truth is the connected user's
channel.data?.own_capabilities(a server-side query lists all capabilities, so it's useless here).useCanCreatePoll()is poll-form validity, not permission - don't gate menu visibility on it.
Feeds:
- A social feed needs a visible follow control - a timeline without follows is
permanently empty. Follows go through the timeline feed instance, not
client.follow(), so the feed hooks update.
Установить stream-react в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл stream-react?
Build, integrate, audit, or upgrade Stream Chat, Video, Feeds, and Moderation in React / Next.js web apps - the default skill for web work. Scaffold a new app, add Stream to an existing project, review an integration, upgrade an SDK major, or migrate from Sendbird. Covers team messaging, DMs, video conferencing, livestreaming, social feeds, AI assistants and LLM chat (ChatGPT-style apps, streaming replies, thinking indicators, stop generating, reasoning and tool-call steps, tool approvals, generative UI with A2UI / OpenUI), and apps built on Stream Agents (voice and text agents, @stream-io/stream-agents). Web React only - React Native uses stream-react-native.
Как установить скилл stream-react?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл stream-react запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic