rudder-ai-events-setup

rudder-ai-events-setup is a skill for Claude Code from rudderlabs/rudder-agent-skills. It costs 75 tokens per session (3,916 once invoked), scanned A, original, MIT.

A setup guide for adding RudderStack AI event tracking to an existing app. It finds chat, background-agent, browser, and MCP server code, then drafts an `ai-events.yaml` plan for approval.

In plain words
What is it for?
Use it to map an app's AI features and plan events for prompts, responses, feedback, and MCP activity before code changes begin.
Why use it?
It avoids missing AI entry points or adding tracking before the event plan is agreed. RudderStack is a service that collects product and usage events for analysis.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the rudder-ai-events plugin — 3 skills shipped together

Good fit Use it to map an app's AI features and plan events for prompts, responses, feedback, and MCP activity before code changes begin.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rudderlabs/rudder-agent-skills/rudder-ai-events-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rudderlabs/rudder-agent-skills --skill rudder-ai-events-setup
Clone the repo
git clone --depth 1 https://github.com/rudderlabs/rudder-agent-skills

Made for: Claude Code.

Or install rudder-ai-events, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rudder-ai-events-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/rudderlabs/rudder-agent-skills/rudder-ai-events-setup/github.svg)](https://agentmods.dev/skills/rudderlabs/rudder-agent-skills/rudder-ai-events-setup)
Your own site
<a href="https://agentmods.dev/skills/rudderlabs/rudder-agent-skills/rudder-ai-events-setup"><img src="https://agentmods.dev/badge/skills/rudderlabs/rudder-agent-skills/rudder-ai-events-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rudder-ai-events-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/rudderlabs/rudder-agent-skills/rudder-ai-events-setup"><img src="https://agentmods.dev/badge/skills/rudderlabs/rudder-agent-skills/rudder-ai-events-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,916 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.03916
Opus 5.5 $0.00030 $0.01566
Sonnet 5.5 $0.00015 $0.00783
Haiku 4.5 $0.00007 $0.00392

Measured yesterday against content hash 40dc70dd3ddb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rudder-ai-events-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/rudder-ai-events/skills/rudder-ai-events-setup/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RudderStack AI Events Setup

Takes an existing app with LLM features to the standard RudderStack AI events (spec v0.3): 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+), rudderstack-ai (Python 3.12+) and github.com/rudderlabs/ai-sdk-go (Go 1.26+, one module per provider integration). Every SDK version is the release that ships spec v0.3 (0.4.0 is spec v0.2): look it up in step 2 and never invent one.

Workflow

Step What Who
1. Discover Find every AI surface, read-only this skill
2. Plan Write ai-events.yaml, ask, 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.yaml already exists at the repo root, read it first. status: approved goes straight 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. Start the clock. Record the current time (date -u +%Y-%m-%dT%H:%MZ) as metadata.time_to_integrate.started_at when you first write the plan; keep an existing value on resume.
  2. Runtimes and libraries. Node.js, Python and Go versions in use; every LLM, agent and MCP library with its resolved version, checked against the supported ranges. A runtime below Node.js 24 / Python 3.12 / Go 1.26, or a library outside its range, blocks that surface: record it, do not upgrade anything.
  3. Surfaces. Trace each LLM call site to its entry point and classify it: chat (a person waits for the answer: HTTP, SSE, WebSocket routes), background (cron, queue, webhook, Lambda, CLI script, Slack bot, a run started by an MCP Events update), client (browser chat UI on the existing RudderStack JavaScript SDK), mcp (each MCP server the repo serves, with its SDK, transport, auth, tools, resources and prompts). Note the channel each chat surface serves (surface: web, mobile, Slack, ...), attachments, streaming routes, thread pools, tool loops, and per-item fan-out in jobs.
  4. RudderStack. The server client (@rudderstack/rudder-sdk-node, rudder-sdk-python) and where it is created, the env var NAMES it reads, and the browser SDK (v3 rudderanalytics) and whether it calls identify().
  5. Existing AI events and feedback. Hand-built track() calls about chats, prompts, answers, tokens or feedback, with their properties; feedback/copy/retry handlers and whether their requests carry the answer's ID and the conversation ID.
  6. Tracing (optional). Only if the app already uses Langfuse, LangSmith, OpenTelemetry or similar: how the current trace ID is read. With OpenTelemetry, Node.js and Python fill trace_id from the first span inside the interaction once the SDK's span processor is registered; Go needs WithTraceIDFrom(rudderotel.TraceID); other tools pass it in. A value the app passes always wins. It is a link, not a requirement.
  7. Identity. Where the server gets the user ID, tenant/account ID, and whether browser cookies (rl_anonymous_id, rl_session) reach the chat routes.
  8. Intent inputs. System prompts, tool names and descriptions, route names, in-repo docs.

Read the full file on GitHub · 119 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 119 lines · 75 tokens per session scan A 40dc70dd3ddb

Subscribe to this mod's changes

rudder-ai-events-setup is a skill published in the GitHub repository rudderlabs/rudder-agent-skills (19 stars, last pushed today), licensed MIT. It adds 75 tokens to every session and 3,916 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-20.

Related

Other skills, from other repositories

scientific-figure-prompt-compiler

Transform concise scientific or technical descriptions into structured visual specifications and high-quality image-generation prompts. Use for scientific figures, technical diagrams, system architectures, mechanisms, workflows, spatial models, timelines, layered systems, and information-dense visuals. Model-agnostic…

basejb/skills · 72 tokens

seo-optimizer

Search Engine Optimization specialist for content strategy, technical SEO, keyword research, and ranking improvements. Use when optimizing website content, improving search rankings, conducting keyword analysis, or implementing SEO best practices. Expert in on-page SEO, meta tags, schema markup, and Core Web Vitals.

basejb/skills · 60 tokens

ai-collab-evaluator

A review of Claude Code session logs against four hiring criteria for working with AI: how you handle, use, and question AI, and how you weigh trade-offs.

basejb/skills · 169 tokens

learning-companion

A guided learning tool that turns official documents or other sources into lasting study notes through five stages, including explanation, recall, reflection, and next steps.

basejb/skills · 134 tokens

oss-tour

A guided method for learning an unfamiliar open-source repository in layers, from the whole project to folders and core modules. An open-source repository is a publicly available code project whose source can be inspected.

basejb/skills · 106 tokens

image-optimizer

An image-processing tool that converts images to WebP, an image format that can reduce file size while preserving visual quality. It handles individual images, groups of images, and whole directories.

basejb/skills · 43 tokens