con un clic
stream-swift
// Build and integrate Stream Chat, Video, and Feeds in Swift apps. Use for SwiftUI, UIKit, Xcode, and iOS project work with Stream package setup, auth wiring, and view blueprints.
// Build and integrate Stream Chat, Video, and Feeds in Swift apps. Use for SwiftUI, UIKit, Xcode, and iOS project work with Stream package setup, auth wiring, and view blueprints.
Use when creating, building, or integrating Stream Chat and Stream Video in React Native Community CLI or Expo apps - new RN/Expo Chat or Video apps from scratch, existing-app integration, stream-chat-react-native, stream-chat-expo, @stream-io/video-react-native-sdk, migration/setup, channel list, message list, MessageComposer, attachment picker, image/file attachments, media picker, audio messages, threads, thread list, video call, livestream, audio room, ringing, CallContent, ParticipantView, React Navigation, Expo Router, theming, offline support, push notifications, and Chat or Video UI customization. Not for Feeds or Moderation UI.
Stream router for Chat, Video, Feeds, and Moderation. Use when the user wants to build a new app with Stream, scaffold a project, add Chat/Video/Feeds/Moderation to an existing app, integrate Stream, build for Swift/SwiftUI/UIKit/iOS/Xcode, query Stream data, list channels, list calls, show flagged messages, find users, run stream api / stream config / stream auth commands, install the Stream CLI, set up Stream, search Stream SDK documentation, look up Stream React/iOS/Android/Node/Flutter/Unity SDK methods, ask how-to questions about Stream hooks/components/methods, configure moderation blocklists or automod, set up webhooks, or anything tagged Chat React, Video iOS, Feeds Node, Moderation, etc. Routes to the right sub-skill based on the task.
Build and integrate Stream Chat, Video, and Feeds in Android apps. Use for Jetpack Compose, Android Studio, and Gradle project work — including Stream package setup, auth and token wiring, screen blueprints, and any follow-up Stream UI work such as adding screens, navigating between channel list and channel/message screens, channel tap handling, deep links, push routing, theming, custom channel/message UI, video calling flows (joining/starting calls, ringing, custom call controls and participant tiles), and Feeds surfaces (timeline, activity composer, threaded comments, follow graph / profile, notification feed, stories).
Build a new app or add Stream products (Chat, Video, Feeds, Moderation) to an existing app. Scaffold Next.js + Tailwind + Shadcn + Stream SDKs end-to-end with Steps 0-7. Add Chat/Video/Feeds/Moderation to an existing project (enhance flow). Triggers on 'build me a ... app', 'scaffold', 'create a new ...', 'add Chat to this app', 'integrate Video', 'drop Feeds into ...'. Covers livestreaming, video conferencing, team messaging, direct messaging, social feed use cases.
Query Stream data and run CLI operations against Chat, Video, Feeds, and Moderation: list channels, list calls, show flagged messages, find users, query any Stream resource. Run stream api / stream config / stream auth commands. Install the Stream CLI binary. Use when the user gives operational verbs ('list', 'show', 'find', 'check', 'query') with Stream nouns, or invokes the CLI literally.
Search live Stream SDK documentation for Chat, Video, Feeds, and Moderation. Look up how a Stream React/iOS/Android/Node/Flutter/Unity/Angular hook, component, or method works. Answer how-to questions about any Stream SDK across every framework and version. Triggers on 'docs', 'documentation', explicit SDK tokens (Chat React, Video iOS, Feeds Node, Moderation), and 'how do I ... in <framework>' phrasing. Answers come verbatim from getstream.io with citations - no CLI required.
| name | stream-swift |
| description | Build and integrate Stream Chat, Video, and Feeds in Swift apps. Use for SwiftUI, UIKit, Xcode, and iOS project work with Stream package setup, auth wiring, and view blueprints. |
| license | See LICENSE in repository root |
| compatibility | Requires an Xcode or Swift/iOS project. No Stream CLI required. |
| metadata | {"author":"GetStream"} |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash(ls *), Bash(grep *), Bash(find . *), Bash(cat Package.swift), Bash(cat Package.resolved), Bash(cat Podfile), Bash(stream token *), Bash(stream chat *), Bash(stream config *), Bash(stream --safe *) |
Rules: Read RULES.md once per session - every non-negotiable rule is stated there, nowhere else.
This file is the single entrypoint: intent classification, local project detection, and module pointers for Stream work in Swift apps.
Before any tool call, decide the track from the user's input alone - no probes first.
| Signal in user input | Track |
|---|---|
Explicit product/framework token: Chat SwiftUI, Chat UIKit, Video iOS, Feeds Swift, Livestream SwiftUI, etc. | C - Reference lookup |
| Words "docs" or "documentation" around Stream Swift/iOS work | C - Reference lookup |
| "How do I {X} in SwiftUI/UIKit/Xcode?", "What does {SDK type/method/view} do?" | C - Reference lookup |
| "Build me a new iOS app", "create a SwiftUI app", "new UIKit app" + Stream product | A - New app |
| "Build a livestream app", "creator and viewer mode", "go live", "one-to-many broadcast" | A - New app (load LIVESTREAM-SWIFTUI.md + LIVESTREAM-SWIFTUI-blueprints.md) |
| "Add/integrate Stream into this app", "wire Chat/Video/Feeds into my Xcode project" | B - Existing app |
| "Install Stream packages", "set up Stream in Xcode", "wire auth/token flow" with no broader feature request | D - Bootstrap / setup |
Bare /stream-swift with no args | List the tracks briefly and wait |
If the request is ambiguous between build/integrate and reference lookup, ask one short question and wait:
Do you want me to wire this into the project, or just map the Swift SDK pattern and files?
builder.md and sdk.md.Run this once per session, right after intent classification, before the Project signals probe.
Collect the Stream API key, a user token, and optionally seed a few channels - all before touching code - so the app has real data to show from the first run.
Post one message asking all relevant things together. Do not split into multiple rounds.
For Chat projects:
To wire everything up with real data, I need a few quick answers:
- Credentials - Should I fetch your API key from the dashboard and generate a token via the Stream CLI, or will you paste them yourself?
- Token expiry - If I'm generating the token: should it expire? (e.g.
1h,1d,30m) or never expire?- Seed channels - Should I pre-create a few channels with random usernames so the app has something to show immediately?
If you want to handle everything yourself, just paste your API key and token and tell me whether to seed channels.
For Feeds projects (no channel seeding - feed groups are configured in the dashboard):
To wire everything up with real data, I need a couple of quick answers:
- Credentials - Should I fetch your API key from the dashboard and generate a token via the Stream CLI, or will you paste them yourself?
- Token expiry - If I'm generating the token: should it expire? (e.g.
1h,1d,30m) or never expire?- Feed groups - What feed groups do you need? (defaults:
user,timeline,notification- tell me if you want different names)If you want to handle everything yourself, just paste your API key and token and confirm the feed group names.
For Video projects (calls are ephemeral - no seeding needed):
To wire everything up, I need a couple of quick answers:
- Credentials - Should I fetch your API key from the dashboard and generate a token via the Stream CLI, or will you paste them yourself?
- Token expiry - If I'm generating the token: should it expire? (e.g.
1h,1d,30m) or never expire?If you want to handle everything yourself, just paste your API key and token.
Once the user answers, execute all CLI steps in sequence without pausing for confirmation between them. Narrate each step briefly as you go (one line per action), but do not stop to ask "shall I continue?".
stream --safe keys
stream keys auto-resolves the org and app and prints the API key on a line shaped API Key: <key>. Output format is fixed — -o json is ignored. Extract with:
api_key=$(stream --safe keys | awk '/^API Key:/ {print $3}')
Note: stream keys also auto-copies the app secret to the system clipboard. The SDK never needs the secret — discard with pbcopy </dev/null if that's a concern.
# Never-expiring
stream token <user_id>
# Expiring
stream token <user_id> --ttl <duration>
Hold the token in context. In generated code, reference credentials via named constants (e.g., Config.apiKey, Config.userToken defined in a dedicated config file) — do not embed raw credential values directly in code snippets.
Create 3-5 channels with random realistic usernames. Use messaging as the default channel type.
# Create a channel and add members (repeat for each channel)
stream chat channel create --type messaging --id <channel-id> --members <user1>,<user2>
Generate short memorable channel IDs (e.g. general, random, team-alpha) and use a small set of random usernames (e.g. alice, bob, carol, dave, eve). Make sure the token user is a member of at least one channel so they can see it on first launch.
After seeding, print a brief summary:
Created channels:
general(alice, bob),random(carol, dave),team-alpha(alice, eve)
After all CLI steps succeed, move straight to Project signals and then into builder.md - no additional prompt needed. If any CLI step fails, explain the error briefly and ask the user to paste the missing value manually before continuing.
Read-only local probe. Use it to detect whether the user is in an Xcode project, a Swift package, or an empty directory.
bash -c 'echo "=== XCODE ==="; find . -maxdepth 3 \( -name "*.xcodeproj" -o -name "*.xcworkspace" \) -print 2>/dev/null; echo "=== MANIFESTS ==="; find . -maxdepth 3 \( -name "Package.swift" -o -name "Package.resolved" -o -name "Podfile" \) -print 2>/dev/null; echo "=== EMPTY ==="; test -z "$(ls -A 2>/dev/null)" && echo "EMPTY_CWD" || echo "NON_EMPTY"'
Hold the result in conversation context. Don't re-run it unless the user changes directory or the project shape clearly changed.
Use the result to produce a one-line status, for example:
SwiftUI app detected - MyApp.xcodeproj - ready for Stream wiringUIKit workspace detected - Podfile present - preserve existing package managerNo Xcode project found - user needs to create the app in Xcode first| Track | Module(s) |
|---|---|
| A - New app | builder.md + sdk.md + relevant reference files |
| B - Existing app | builder.md + sdk.md + relevant reference files |
| C - Reference lookup | sdk.md + relevant reference files |
| D - Bootstrap / setup | builder.md + sdk.md |
Shared Swift/iOS patterns live in sdk.md.
Product and framework specifics live under references/ using a flat naming scheme that can grow with the full Stream Swift surface:
references/<PRODUCT>-<FRAMEWORK>.mdreferences/<PRODUCT>-<FRAMEWORK>-blueprints.mdCurrent extracted modules:
references/CHAT-SWIFTUI.md + references/CHAT-SWIFTUI-blueprints.mdreferences/CHAT-UIKIT.md + references/CHAT-UIKIT-blueprints.mdreferences/VIDEO-SWIFTUI.md + references/VIDEO-SWIFTUI-blueprints.mdreferences/VIDEO-UIKIT.md + references/VIDEO-UIKIT-blueprints.mdreferences/LIVESTREAM-SWIFTUI.md + references/LIVESTREAM-SWIFTUI-blueprints.mdreferences/COMBINED-CHAT-VIDEO.mdreferences/FEEDS-SWIFTUI.md + references/FEEDS-SWIFTUI-blueprints.mdFeeds has no pre-built UI components.
FEEDS-SWIFTUI.mdcovers SDK patterns for both SwiftUI and UIKit - only the view layer differs. Load both files for any Feeds request.
Future Swift product coverage should stay in this naming family instead of creating more top-level skills.
Full detail: builder.md - use the new-project path.
| Phase | Name | What you do |
|---|---|---|
| A1 | Detect | Run Project signals. If there is no iOS app yet, tell the user to create one in Xcode first. |
| A2 | Choose lane | Confirm product(s) and UI layer: SwiftUI, UIKit, or mixed. |
| A3 | Install + wire | Follow builder.md + sdk.md, then load only the needed product references. |
| A4 | Verify | Confirm package resolution, client lifetime, auth, and first rendered screen. |
Full detail: builder.md - use the existing-project path.
| Phase | Name | What you do |
|---|---|---|
| B1 | Detect | Run Project signals and inspect the existing app structure before editing. |
| B2 | Preserve | Keep the current UI layer, package manager, and navigation architecture unless the user asks for a migration. |
| B3 | Integrate | Use sdk.md for shared wiring, then load only the needed product reference files. |
| B4 | Verify | Confirm the requested Stream flow builds and renders inside the existing app. |
Load only the relevant files for the requested product and UI layer.
sdk.mdreferences/CHAT-SWIFTUI.mdreferences/CHAT-SWIFTUI-blueprints.mdreferences/CHAT-UIKIT.mdreferences/CHAT-UIKIT-blueprints.mdreferences/VIDEO-SWIFTUI.mdreferences/VIDEO-SWIFTUI-blueprints.mdreferences/VIDEO-UIKIT.mdreferences/VIDEO-UIKIT-blueprints.mdreferences/LIVESTREAM-SWIFTUI.mdreferences/LIVESTREAM-SWIFTUI-blueprints.mdreferences/COMBINED-CHAT-VIDEO.mdreferences/FEEDS-SWIFTUI.mdreferences/FEEDS-SWIFTUI-blueprints.mdUse when the user wants the install and wiring path more than a feature build:
sdk.md