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…
Generates type-safe SDKs (Swift/Kotlin) from tracking plans with compile-time validation. Use when generating type-safe event tracking code from tracking plans using RudderTyper
Claude Code
$ npx -y skills add rudderlabs/rudder-agent-skills --skill rudder-typer-workflow --agent claude-code
Codex
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-typer-workflow -a codex -y
Cursor
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-typer-workflow -a cursor -y
Gemini CLI
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-typer-workflow -a gemini-cli -y
GitHub Copilot
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-typer-workflow -a github-copilot -y
OpenCode
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-typer-workflow -a opencode -y
Windsurf
$ npx skills add rudderlabs/rudder-agent-skills --skill rudder-typer-workflow -a windsurf -y
name: rudder-typer-workflow description: Generates type-safe SDKs (Swift/Kotlin) from tracking plans with compile-time validation. Use when generating type-safe event tracking code from tracking plans using RudderTyper allowed-tools: "Bash(rudder-cli *), Read, Write, Edit"
This skill teaches how to use **RudderTyper** to generate type-safe SDKs from your tracking plan, enabling compile-time validation of analytics calls.
RudderTyper generates native code from your tracking plan so developers:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Tracking Plan │────▶│ RudderTyper │────▶│ Generated SDK │
│ (YAML) │ │ (Generator) │ │ (Swift/Kotlin) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Mobile App │
│ (Type-safe!) │
└─────────────────┘| Platform | Language | Status | Use Case | |----------|----------|--------|----------| | iOS | Swift | Available | iOS, macOS, tvOS, watchOS apps | | Android | Kotlin | Available | Android apps, JVM applications | | Web | TypeScript | Manual | Web apps, Node.js (see [TypeScript Type Alignment](#typescript-type-alignment-manual)) |
rudder-cli typer init
Creates `ruddertyper.yml`:
version: "1.0.0" trackingPlan: id: "tp_abc123" # Your tracking plan ID workspace: "ws_xyz789" # Your workspace ID language: kotlin # or "swift" output: path: ./generated # Where to generate code
rudder-cli typer generate
Add the generated directory to your project and import the Analytics class.
# tracking-plan.yaml
version: "rudder/v1"
kind: "tracking-plan"
metadata:
name: "tracking-plans"
spec:
name: "Mobile App Tracking Plan"
events:
- event: "urn:rudder:event/product-viewed"
- event: "urn:rudder:event/product-added-to-cart"
- event: "urn:rudder:event/order-completed"RudderTyper generates:
// generated/Analytics.kt
/**
* User viewed a product detail page
*/
fun productViewed(
product: ProductType,
pageUrl: String? = null,
referrerUrl: String? = null
) {
track("Product Viewed", mapOf(
"product" to product.toMap(),
"page_url" to pageUrl,
"referrer_url" to referrerUrl
))
}
/**
* User added a product to their cart
*/
fun productAddedToCart(
product: ProductType,
quantity: Int,
cartTotal: Double? = null,
productCount: Int? = null
) {
track("Product Added to Cart", mapOf(
"product" to product.toMap(),
"quantity" to quantity,
"cart_total" to cartTotal,
"product_count" to productCount
))
}
/**
* Customer completed a purchase
*/
fun orderCompleted(
orderId: String,
orderTotal: Double,
customerEmail: String,
products: List<ProductType>,
shippingAddress: AddressType,
billingAddress: AddressType
) {
track("Order Completed", mapOf(
"order_id" to orderId,
"order_total" to orderTotal,
"customer_email" to customerEmail,
"products" to products.map { it.toMap() },
"shipping_address" to shippingAddress.toMap(),
"billing_address" to billingAddress.toMap()
))
}
// Custom type classes
data class ProductType(
val productId: String,
val productSku: String,
val productName: String,
val productCategory: ProductCategory,
val productPrice: Double,
val productMsrp: Double? = null
)
enum class ProductCategory {
FOOTWEAR,
CLOTHING,
ACCESSORIES
}
data class AddressType(
val address: String,
val city: String,
val state: String,
val zipcode: String
)**Before RudderTyper** (error-prone):
// Typos won't be caught until runtime
analytics.track("Product Viewd", mapOf( // Typo in event name!
"product_id" to "shoes-001",
"proudct_name" to "Running Shoes", // Typo in property!
"price" to "89.99" // Wrong type (string vs number)!
))**After RudderTyper** (type-safe):
// IDE autocomplete, compile-time validation
analytics.productViewed(
product = ProductType(
productId = "shoes-001",
productSku = "RUN-001",
productName = "Running Shoes",
productCategory = ProductCategory.FOOTWEAR,
productPrice = 89.99
)
)Compile errors catch:
// generated/Analytics.swift
/// User viewed a product detail page
func productViewed(
product: ProductType,
pageUrl: String? = nil,
referrerUrl: String? = nil
) {
track("Product Viewed", properties: [
"product": product.toDictionary(),
"page_url": pageUrl,
"referrer_url": referrerUrl
])
}
struct ProductType {
let productId: String
let productSku: String
let productName: String
let productCategory: ProductCategory
let productPrice: Double
let productMsrp: Double?
}
enum ProductCategory: StrA 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…
Onboards an app to RudderStack AI events, including moving existing RudderStack LLM, chat or agent events to them: discovers…
Verifies RudderStack AI events locally and checks a move from existing RudderStack events: validates captures against the v0.3…
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…
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.