/rudder-cli:rudder-import-and-evolvefrom rudder-cli
Imports existing RudderStack workspace resources into YAML files for git-based management. Guides safe evolution of tracking schema without breaking production SDKs.
Ships in rudder-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill teaches how to import existing RudderStack resources into CLI management and safely evolve your tracking schema over time.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ RudderStack │────▶│ Import to │────▶│ Local YAML │
│ Workspace │ │ Local Files │ │ Files │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Git Version │
│ Control │
└─────────────────┘
rudder-cli auth login
This prompts for an access token; the token decides the workspace. An agent does not run it: it asks the user to export RUDDERSTACK_ACCESS_TOKEN in the shell that starts the agent, and never asks the user to paste a token into the chat. See rudder-cli-setup.
rudder-cli workspace info --json
Should show your workspace name and workspaceID.
rudder-cli import workspace
This imports:
imported/
├── data-catalog/
│ ├── events/
│ │ └── *.yaml
│ ├── properties/
│ │ └── *.yaml
│ ├── categories/
│ │ └── *.yaml
│ └── custom-types/
│ └── *.yaml
└── tracking-plans/
└── *.yaml
Each file includes import metadata:
version: "rudder/v1"
kind: "event"
metadata:
name: "events"
import:
id: "evt_abc123xyz" # Links to workspace resource
workspace: "ws_xyz789"
spec:
name: "Product Viewed"
# ... rest of spec
Important: The metadata.import section links local files to workspace resources. Don't modify these IDs.
See references/evolution-patterns.md for detailed patterns including:
The examples there end with rudder-cli apply -l ./, which waits on a confirmation prompt. An agent shows the user the rudder-cli apply --dry-run -l ./ output first and waits for an explicit yes. Only then does it run rudder-cli apply --confirm=false -l ./, which applies with no prompt. Without --confirm=false, a non-interactive run auto-declines the prompt and applies nothing.
The CLI applies to the workspace of its token, not to the workspace a directory was imported from. The dry run names that workspace only from rudder-cli 0.28.0, on a first line Workspace: <name> (<id>). In the multi-workspace examples, run rudder-cli workspace info --json before each dry run and check that workspaceID is that directory's workspace. Get that ID from the user, or from the workspace info --json output recorded when the directory was imported. Never take it from the workspace_id in a spec's metadata.import, because a spec copied from another directory carries that workspace's ID. If the IDs differ, stop. Changing the CLI's workspace means restarting the agent: the user exports that workspace's token as RUDDERSTACK_ACCESS_TOKEN and starts the agent again from that shell.
Problem: Someone made changes in the UI after import.
Solution 1: Re-import (overwrites local)
# Warning: This overwrites your local changes!
rudder-cli import workspace --force
Solution 2: Manual reconciliation
# 1. Compare local vs workspace
rudder-cli apply --dry-run -l ./
# 2. Review differences
# "Updated" means local differs from workspace
# Decide: use local (apply) or use workspace (re-import that file)
# 3. Apply your version, only after the user says yes to the dry run
rudder-cli apply --confirm=false -l ./
Best practice: After import, all changes go through CLI. Disable UI editing for data catalog if possible.
Import is a one-time snapshot. There's no rudder-cli pull to sync changes from workspace.
# This doesn't exist:
rudder-cli pull # ❌ Not a command
# Instead, re-import to get latest:
rudder-cli import workspace # Overwrites local
If you copy files between workspaces, update the metadata.import section:
# Wrong: IDs from different workspace
metadata:
import:
id: "evt_from_other_workspace"
workspace: "ws_different"
# Right: Remove import metadata for new workspace
metadata:
name: "events"
# No import section - will create new resource
If you import, delete some files, then apply:
# The dry run lists the deleted files' resources under "Removed resources:".
# Show it to the user and wait for an explicit yes.
rudder-cli apply --dry-run -l ./
# This will DELETE those resources from the workspace!
rudder-cli apply --confirm=false -l ./
The CLI tracks what was imported. Missing files = deletions.
# Authenticate (a person at a terminal; agents use RUDDERSTACK_ACCESS_TOKEN)
rudder-cli auth login
# Show current workspace
rudder-cli workspace info --json
# Import all resources
rudder-cli import workspace
# Import specific resource types
rudder-cli import workspace --resources events,properties
# Validate imported files
rudder-cli validate -l ./
# Preview changes
rudder-cli apply --dry-run -l ./
# Apply changes, only after the user says yes to the dry run
rudder-cli apply --confirm=false -l ./
RUDDERSTACK_ACCESS_TOKEN - never run rudder-cli auth login on the user's behalf and never ask the user to paste a token into the chatWhen importing resources from RudderStack workspace:
metadata.import.id values are legitimate workspace resourcesBefore applying changes:
rudder-cli validate -l ./ - no errorsrudder-cli apply --dry-run -l ./ - reviewed all changesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/rudder-cli-setupInstalls and authenticates rudder-cli. Use when installing rudder-cli, setting up rudder cli, rudder-cli command not found, or authenticating with RudderStack/rudder-cli-workflowValidates, previews, and applies RudderStack resource changes via YAML specs. Use when iterating on RudderStack resources with rudder-cli - validates specs, previews changes with dry-run, and applies changes to workspaces/rudder-transformationsCreates and manages RudderStack transformations and libraries with local testing. Use when creating, editing, or managing RudderStack transformations and transformation libraries using the Rudder CLI/rudder-typer-workflowGenerates type-safe SDKs (Swift/Kotlin) from tracking plans with compile-time validation. Use when generating type-safe event tracking code from tracking plans using RudderTypernpx claudepluginhub rudderlabs/rudder-agent-skills --plugin rudder-cliOther plugins' skills for the same job