Skip to content
Development
Skill

/rudder-ai-events-setup

Onboards an app to RudderStack AI events, including moving existing RudderStack LLM, chat or agent events to them: discovers chat, agent, browser and MCP surfaces and drafts ai-events.md. Use when adding @rudderstack/ai, rudderstack-ai or ai-sdk-go, or replacing custom AI

From plugin
rudder-agent-skills
1928 skills1 MCP

Claude Code

$ npx -y skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup --agent claude-code

SKILL.md

rudder-ai-events-setup.SKILL.md
name: rudder-ai-events-setup
description: "Onboards an app to RudderStack AI events, including moving existing RudderStack LLM, chat or agent events to them: discovers chat, agent, browser and MCP surfaces and drafts ai-events.md. Use when adding @rudderstack/ai, rudderstack-ai or ai-sdk-go, or replacing custom AI tracking."
allowed-tools: "Bash(rg *), Bash(grep *), Bash(node --version), Bash(deno --version), Bash(python3 --version), Bash(uv run python --version), Bash(*/.venv/bin/python --version), Bash(go version), Bash(npm view *), Bash(pip index versions *), Bash(go list -m *), Bash(git status), Bash(git fetch *), Bash(git log *), Bash(git rev-parse *), Bash(git branch *), Read, Write, Edit, Glob, Grep"

RudderStack AI Events Setup

Takes an existing app with LLM features to the standard RudderStack AI events (spec v0.4): one `ai_user_prompt_created` and one `ai_response_received` per answer, `ai_user_action` for feedback, and `mcp_*` events for MCP servers, through the app's existing RudderStack client. SDKs, each for chat, background agents and MCP servers: `@rudderstack/ai` (Node.js 24+, or Deno via npm compatibility), `rudderstack-ai` (Python 3.12+) and `github.com/rudderlabs/ai-sdk-go` (public Go modules, one per provider integration; the Go floor is the `go` line of the chosen version's `go.mod`). Use 0.8.0 / v0.4.0 or later (spec v0.4, with the migration check and recorders verify uses); resolve the latest in step 2.3 and never invent one. Other product events (non-AI features): `rudder-code-first-instrumentation` or `rudder-design-first-instrumentation`.

Workflow

| Step | What | Who | |---|---|---| | 1. Discover | Find every AI surface, read-only | this skill | | 2. Plan | Write `ai-events.md`, ask once, then **stop for approval** | this skill | | 3. Instrument | Minimal code changes from the approved plan | `rudder-ai-events-instrument` | | 4. Verify | Capture events locally, validate against the spec | `rudder-ai-events-verify` |

**Resuming.** If `ai-events.md` already exists at the repo root, read it, then before anything else: fetch and compare the branch with the default branch (`git fetch`, `git log HEAD..origin/<default>`) and, if it is behind, say so (the user decides whether to update it); re-resolve the latest SDK versions (step 2.3); re-check every entry under Dependencies and blockers. Correct the plan where any of these changed (an approved plan goes back to `draft`). Then `status: approved` goes to step 3; `status: draft` re-presents the plan (step 2.6).

Step 1: Discover (read-only)

Change nothing. Use Glob, Grep, Read and the read-only commands allowed above; do not run the app, install packages or read `.env` files. Patterns for every check: `references/discovery.md`.

1. **Runtimes and libraries.** Node.js, Deno, Python and Go versions in use; every LLM, agent and MCP library with its resolved version, checked against the supported ranges. A runtime below the floor, or a library outside its range, blocks that surface: record it, do not upgrade anything. Install preflight (release-age gates, private registries, peer ranges): `references/discovery.md`, "Install preflight". 2. **Surfaces.** Trace every LLM call site to its entry point (for chat, both the path of a new chat's first message, such as a welcome or empty-state component, and the follow-up path) and classify it: `chat` (a person waits for the answer, including Slack replies and one-shot buttons: generate, suggest, autofill, summarize, rewrite, translate, fix, planned with `input_method: button` and `conversation_id` set to the interaction ID, plus their accept, edit and reject handlers), `background` (cron, queue, webhook, Lambda, CLI script, automated Slack message with no person waiting, MCP Events run), `client` (browser chat UI on the RudderStack JavaScript SDK), `mcp` (each MCP server, and each endpoint that serves one). A UI call that fires on page load without a typed prompt is `background`. Note channel, attachments, streaming, thread pools, tool loops, per-item fan-out, and where each entry point already records its own failures, including best-effort generators that swallow an unparseable reply and return an empty result (they must end with a failure status). Every call site found goes in the plan. Recommend `skipped` for dev-only local CLI/REPL surfaces with no user identity in the batched questions (override any); instrument the rest unless blocked or the user opts out. Detect Claude Agent SDK session resume and its usage store, human-in-the-loop pauses (LangGraph `interrupt(`, Claude Agent SDK permission callbacks, OpenAI Agents SDK approvals: `paused` with `pause_reason`), plan repeated pauses with in-process or JSON snapshot resume, and estimate events per turn and run with `sample_rates` for high-volume MCP and per-call events (`references/discovery.md`, section 2). Answers and client copies stay unsampled by default. 3. **RudderStack.** The server client and where it is created, the env var NAMES it reads, the browser SDK (v3) and whether it calls `identify()`, and the config library the app uses for flags (does it reload at runtime?). Also mobile RudderStack SDKs and AI events sent from Java, Ruby, PHP or raw HTTP: each is a surface with `status: unsupported` and its reason. 4. **Existing AI events and feedback.** Hand-built `track()` calls about chats, prompts, answers, tokens or feedback; feedback/copy/retry handlers and whether their requests carry the answer and conversation IDs; accept/reject blocks. Search the wider names too (agent, tool, run, job, handoff, hitl, credit, generate, suggestion, confidence) and schema-generated emitters. Compare each legacy field by meaning, not name (field aliases and mapping rows: `references/ai-events-md.md`), run every breaking-change check there, and list the legacy fields that carry raw prompts, answers, feedback text, emails or file names. 5. **Tracing (optional).** Only if the app already uses Langfuse, LangSmith, Ope

Read more
@rudderlabs
Ships withrudder-agent-skills

A Claude Code plugin marketplace and Agent Skills collection that teaches your AI coding agent how to drive every programmatic RudderStack surface — CLI, MCP server, Terraform, Profiles, and AI events — with the right preflight checks, commands, and recovery

1928 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
19
Star history of rudderlabs/rudder-agent-skills on GitHub, a chart by star-history.com

Other skills on rudder-agent-skills.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills3w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2w252k
@facebook@facebookInstall Skill

Questions about rudder-ai-events-setup.

Which coding agents can use rudder-ai-events-setup?
rudder-ai-events-setup installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.