rudder-ai-events-instr…
Adds RudderStack AI events code from an approved ai-events.md plan: installs @rudderstack/ai, rudderstack-ai or ai-sdk-go, wraps…
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
Claude Code
$ npx -y skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup --agent claude-code
Codex
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup -a codex -y
Cursor
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup -a cursor -y
Gemini CLI
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup -a gemini-cli -y
GitHub Copilot
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup -a github-copilot -y
OpenCode
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup -a opencode -y
Windsurf
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup -a windsurf -y
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"
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`.
| 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).
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
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
Adds RudderStack AI events code from an approved ai-events.md plan: installs @rudderstack/ai, rudderstack-ai or ai-sdk-go, wraps…
Verifies RudderStack AI events locally and checks a move from existing RudderStack events: validates captures against the v0.4…
Installs and authenticates rudder-cli. Use when installing rudder-cli, setting up rudder cli, rudder-cli command not found, or…
Validates, previews, and applies RudderStack resource changes via YAML specs. Use when iterating on RudderStack resources with…
Imports existing RudderStack workspace resources into YAML files for git-based management. Use when importing existing…
Creates and manages RudderStack transformations and libraries with local testing. Use when creating, editing, or managing…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.