/building-with-tambo
Integrates Tambo into existing React apps — detects tech stack, installs @tambo-ai/react, wires TamboProvider, registers components with Zod schemas, and sets up tools/context. Use when adding AI-powered generative UI to an existing codebase. Triggers on "add Tambo", "integrate
$ npx -y skills add tambo-ai/tambo --skill building-with-tambo --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/building-with-tambo
Context preview
The summary Claude sees to decide when to auto-load this skill.
Integrates Tambo into existing React apps — detects tech stack, installs @tambo-ai/react, wires TamboProvider, registers components with Zod schemas, and sets up tools/context. Use when adding AI-powered generative UI to an existing codebase. Triggers on "add Tambo", "integrate
SKILL.md
building-with-tambo.SKILL.mdname: building-with-tambo
description: Integrates Tambo into existing React apps — detects tech stack, installs @tambo-ai/react, wires TamboProvider, registers components with Zod schemas, and sets up tools/context. Use when adding AI-powered generative UI to an existing codebase. Triggers on "add Tambo", "integrate Tambo", "add AI chat to my app", "add generative UI", or when the user has an existing React/Next.js/Vite project and wants to add AI-powered components. For brand-new projects, use generative-ui instead.
Building with Tambo
Detect tech stack and integrate Tambo while preserving existing patterns.
Reference Guides
Load these when you reach the relevant step or need deeper implementation details:
- [Components](references/components.md) - **Load at Step 5.** Generative vs interactable components, propsSchema, ComponentRenderer.
- [Component Rendering](references/component-rendering.md) - Streaming props, loading states, persistent state. Load when building custom message rendering.
- [Threads and Input](references/threads.md) - **Load when building custom chat UI.** useTambo(), useTamboThreadInput(), userKey/userToken auth, suggestions, voice.
- [Tools and Context](references/tools-and-context.md) - **Load when wiring host app APIs.** defineTool(), MCP servers, contextHelpers.
- [CLI Reference](references/cli.md) - **Load at Step 6.** `tambo add` component library, `tambo init` flags, non-interactive mode.
- [Skills](references/skills.md) - **Mention as a next step after setup.** Project-scoped agent skills via CLI and dashboard.
- [Add Components to Registry](references/add-components-to-registry.md) - **Load when registering existing app components.** Analyzes props, generates Zod schemas, writes descriptions.
Shared references (components, rendering, threads, tools/context, CLI, skills) are duplicated into generative-ui so each skill works independently. `add-components-to-registry` is unique to this skill.
Workflow
1. **Detect tech stack** - Analyze package.json, lock files, project structure, monorepo layout 2. **Confirm with user** - Present findings, ask about preferences 3. **Install dependencies** - Add @tambo-ai/react and zod using the project's package manager 4. **Create provider setup** - Wire TamboProvider with apiKey, userKey, components 5. **Create component registry** - Set up lib/tambo.ts 6. **Add chat UI** - Install pre-built Tambo components via CLI, set up path aliases and globals.css
Step 1: Detect Tech Stack
Check these files to understand the project:
# Key files to read
package.json # Dependencies, scripts, AND package manager
tsconfig.json # TypeScript config, path aliases
next.config.* # Next.js
vite.config.* # Vite
tailwind.config.* # Tailwind CSS
postcss.config.* # PostCSS
src/index.* or app/ # Entry points
yarn.lock / pnpm-lock.yaml / package-lock.json # Which package manager
Detection Checklist
| Technology | Detection | | ---------------- | ------------------------------------------------- | | Next.js | `next` in dependencies, `next.config.*` exists | | Vite | `vite` in devDependencies, `vite.config.*` exists | | Create React App | `react-scripts` in dependencies | | TypeScript | `typescript` in deps, `tsconfig.json` exists | | Tailwind | `tailwindcss` in deps, config file exists | | Plain CSS | No Tailwind, CSS files in src/ | | Zod | `zod` in dependencies | | Other validation | `yup`, `joi`, `superstruct` in deps |
Package Manager Detection
**Always detect and use the project's package manager.** Do not assume npm.
| Lock file | Manager | Install command | | ------------------- | ------- | ----------------------------- | | `package-lock.json` | npm | `npm install @tambo-ai/react` | | `yarn.lock` | Yarn | `yarn add @tambo-ai/react` | | `pnpm-lock.yaml` | pnpm | `pnpm add @tambo-ai/react` |
For **monorepos**, install in the correct workspace:
- Yarn: `yarn workspace <app-name> add @tambo-ai/react`
- pnpm: `pnpm --filter <app-name> add @tambo-ai/react`
- npm: `npm install @tambo-ai/react -w <app-name>`
Monorepo Detection
Check for monorepo indicators:
- `workspaces` field in root `package.json`
- `pnpm-workspace.yaml`
- `turbo.json` or `nx.json`
- Multiple `package.json` files in `apps/` or `packages/`
If monorepo detected, identify which package is the web app that will use Tambo (usually in `apps/web`, `apps/frontend`, or similar).
Global Keyboard Shortcuts Detection
Check if the app captures keyboard events globally (common in drawing tools, editors, IDEs). Look for:
- `document.addEventListener("keydown", ...)` in the codebase
- Canvas-based apps (Excalidraw, Figma-like, code editors)
- Keyboard shortcut libraries (hotkeys-js, mousetrap, etc.)
If found, the Tambo chat UI wrapper must stop event propagation (see Step 6).
Step 2: Confirm with User
Present findings including the package manager and any special concerns:
I detected your project uses:
- Framework: Next.js 14 (App Router)
- Package manager: Yarn
- Styling: Tailwind CSS
- Validation: No Zod (will need to add)
- TypeScript: Yes
- Monorepo: No
- Global keyboard shortcuts: No
Should I:
1. Install Tambo with these settings?
2. Use plain CSS instead of Tailwind for Tambo components?
3. Something else?
Step 3: Install Dependencies
Use the project's package manager (detected in Step 1):
# npm
npm install @tambo-ai/react
npm install zod # if no Zod installed
# yarn
yarn add @tambo-ai/react
yarn add zod
# pnpm
pnpm add @tambo-ai/react
pnpm add zod
# Monorepo (install in the correct workspace)
yarn workspace <app-name> add @tambo-ai/react zod
pnpm --filter <app-name> add @tambo-ai/react zod
npm
Read more
name: building-with-tambo description: Integrates Tambo into existing React apps — detects tech stack, installs @tambo-ai/react, wires TamboProvider, registers components with Zod schemas, and sets up tools/context. Use when adding AI-powered generative UI to an existing codebase. Triggers on "add Tambo", "integrate Tambo", "add AI chat to my app", "add generative UI", or when the user has an existing React/Next.js/Vite project and wants to add AI-powered components. For brand-new projects, use generative-ui instead.
Building with Tambo
Detect tech stack and integrate Tambo while preserving existing patterns.
Reference Guides
Load these when you reach the relevant step or need deeper implementation details:
- [Components](references/components.md) - **Load at Step 5.** Generative vs interactable components, propsSchema, ComponentRenderer.
- [Component Rendering](references/component-rendering.md) - Streaming props, loading states, persistent state. Load when building custom message rendering.
- [Threads and Input](references/threads.md) - **Load when building custom chat UI.** useTambo(), useTamboThreadInput(), userKey/userToken auth, suggestions, voice.
- [Tools and Context](references/tools-and-context.md) - **Load when wiring host app APIs.** defineTool(), MCP servers, contextHelpers.
- [CLI Reference](references/cli.md) - **Load at Step 6.** `tambo add` component library, `tambo init` flags, non-interactive mode.
- [Skills](references/skills.md) - **Mention as a next step after setup.** Project-scoped agent skills via CLI and dashboard.
- [Add Components to Registry](references/add-components-to-registry.md) - **Load when registering existing app components.** Analyzes props, generates Zod schemas, writes descriptions.
Shared references (components, rendering, threads, tools/context, CLI, skills) are duplicated into generative-ui so each skill works independently. `add-components-to-registry` is unique to this skill.
Workflow
1. **Detect tech stack** - Analyze package.json, lock files, project structure, monorepo layout 2. **Confirm with user** - Present findings, ask about preferences 3. **Install dependencies** - Add @tambo-ai/react and zod using the project's package manager 4. **Create provider setup** - Wire TamboProvider with apiKey, userKey, components 5. **Create component registry** - Set up lib/tambo.ts 6. **Add chat UI** - Install pre-built Tambo components via CLI, set up path aliases and globals.css
Step 1: Detect Tech Stack
Check these files to understand the project:
# Key files to read package.json # Dependencies, scripts, AND package manager tsconfig.json # TypeScript config, path aliases next.config.* # Next.js vite.config.* # Vite tailwind.config.* # Tailwind CSS postcss.config.* # PostCSS src/index.* or app/ # Entry points yarn.lock / pnpm-lock.yaml / package-lock.json # Which package manager
Detection Checklist
| Technology | Detection | | ---------------- | ------------------------------------------------- | | Next.js | `next` in dependencies, `next.config.*` exists | | Vite | `vite` in devDependencies, `vite.config.*` exists | | Create React App | `react-scripts` in dependencies | | TypeScript | `typescript` in deps, `tsconfig.json` exists | | Tailwind | `tailwindcss` in deps, config file exists | | Plain CSS | No Tailwind, CSS files in src/ | | Zod | `zod` in dependencies | | Other validation | `yup`, `joi`, `superstruct` in deps |
Package Manager Detection
**Always detect and use the project's package manager.** Do not assume npm.
| Lock file | Manager | Install command | | ------------------- | ------- | ----------------------------- | | `package-lock.json` | npm | `npm install @tambo-ai/react` | | `yarn.lock` | Yarn | `yarn add @tambo-ai/react` | | `pnpm-lock.yaml` | pnpm | `pnpm add @tambo-ai/react` |
For **monorepos**, install in the correct workspace:
- Yarn: `yarn workspace <app-name> add @tambo-ai/react`
- pnpm: `pnpm --filter <app-name> add @tambo-ai/react`
- npm: `npm install @tambo-ai/react -w <app-name>`
Monorepo Detection
Check for monorepo indicators:
- `workspaces` field in root `package.json`
- `pnpm-workspace.yaml`
- `turbo.json` or `nx.json`
- Multiple `package.json` files in `apps/` or `packages/`
If monorepo detected, identify which package is the web app that will use Tambo (usually in `apps/web`, `apps/frontend`, or similar).
Global Keyboard Shortcuts Detection
Check if the app captures keyboard events globally (common in drawing tools, editors, IDEs). Look for:
- `document.addEventListener("keydown", ...)` in the codebase
- Canvas-based apps (Excalidraw, Figma-like, code editors)
- Keyboard shortcut libraries (hotkeys-js, mousetrap, etc.)
If found, the Tambo chat UI wrapper must stop event propagation (see Step 6).
Step 2: Confirm with User
Present findings including the package manager and any special concerns:
I detected your project uses: - Framework: Next.js 14 (App Router) - Package manager: Yarn - Styling: Tailwind CSS - Validation: No Zod (will need to add) - TypeScript: Yes - Monorepo: No - Global keyboard shortcuts: No Should I: 1. Install Tambo with these settings? 2. Use plain CSS instead of Tailwind for Tambo components? 3. Something else?
Step 3: Install Dependencies
Use the project's package manager (detected in Step 1):
# npm npm install @tambo-ai/react npm install zod # if no Zod installed # yarn yarn add @tambo-ai/react yarn add zod # pnpm pnpm add @tambo-ai/react pnpm add zod # Monorepo (install in the correct workspace) yarn workspace <app-name> add @tambo-ai/react zod pnpm --filter <app-name> add @tambo-ai/react zod npm
Repo: tambo-ai/tambo
Other skills on tambo.
- /ai-sdk-model-manager
Manages AI SDK model configurations - updates packages, identifies missing models, adds new models with research, and updates documentation
Open skill - /api-resource-lifecycle
Guides CRUD operations for API resources with cascading dependencies, descriptive validation, and orphan prevention. Use when adding delete/remove operations, creating validation logic, building resources that depend on other resources, or when the user mentions "cascade
Open skill - /building-settings-ui
Use this skill when adding or modifying settings UI in Tambo Cloud. Covers where a new settings section belongs (Agent tab vs Settings tab), and the component patterns used across both pages (card layout, toasts, confirmation dialogs, destructive styling, save behavior
Open skill - /compound-components
Creates unstyled compound components that separate business logic from styles. Use when building headless UI primitives, creating component libraries, implementing Radix-style namespaced components, or when the user mentions "compound components", "headless", "unstyled",
Open skill - /creating-styled-wrappers
Creates styled wrapper components that compose headless/base compound components. Use when refactoring styled components to use base primitives, implementing opinionated design systems on top of headless components, or when the user mentions "use base components", "compose
Open skill - /validating-accessibility
Use this skill when creating, modifying, or reviewing any .tsx component in apps/web, even if the user doesn't mention "accessibility." Covers semantic HTML, aria labels, navigation landmarks, forms, dialogs, and keyboard navigation. Trigger on: adding buttons, links, toggles,
Open skill

