segment-automation
Automate Segment tasks via Rube MCP (Composio): track events, identify users, manage groups, page views, aliases, batch operations. Always search tools first for current schemas.
What this skill does
# Segment Automation via Rube MCP
Automate Segment customer data platform operations through Composio's Segment toolkit via Rube MCP.
## Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Segment connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `segment`
- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas
## Setup
**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds
2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `segment`
3. If connection is not ACTIVE, follow the returned auth link to complete Segment authentication
4. Confirm connection status shows ACTIVE before running any workflows
## Core Workflows
### 1. Track Events
**When to use**: User wants to send event data to Segment for downstream destinations
**Tool sequence**:
1. `SEGMENT_TRACK` - Send a single track event [Required]
**Key parameters**:
- `userId`: User identifier (required if no `anonymousId`)
- `anonymousId`: Anonymous identifier (required if no `userId`)
- `event`: Event name (e.g., 'Order Completed', 'Button Clicked')
- `properties`: Object with event-specific properties
- `timestamp`: ISO 8601 timestamp (optional; defaults to server time)
- `context`: Object with contextual metadata (IP, user agent, etc.)
**Pitfalls**:
- At least one of `userId` or `anonymousId` is required
- `event` name is required and should follow consistent naming conventions
- Properties are freeform objects; ensure consistent schema across events
- Timestamp must be ISO 8601 format (e.g., '2024-01-15T10:30:00Z')
- Events are processed asynchronously; successful API response means accepted, not delivered
### 2. Identify Users
**When to use**: User wants to associate traits with a user profile in Segment
**Tool sequence**:
1. `SEGMENT_IDENTIFY` - Set user traits and identity [Required]
**Key parameters**:
- `userId`: User identifier (required if no `anonymousId`)
- `anonymousId`: Anonymous identifier
- `traits`: Object with user properties (email, name, plan, etc.)
- `timestamp`: ISO 8601 timestamp
- `context`: Contextual metadata
**Pitfalls**:
- At least one of `userId` or `anonymousId` is required
- Traits are merged with existing traits, not replaced
- To remove a trait, set it to `null`
- Identify calls should be made before track calls for new users
- Avoid sending PII in traits unless destinations are configured for it
### 3. Batch Operations
**When to use**: User wants to send multiple events, identifies, or other calls in a single request
**Tool sequence**:
1. `SEGMENT_BATCH` - Send multiple Segment calls in one request [Required]
**Key parameters**:
- `batch`: Array of message objects, each with:
- `type`: Message type ('track', 'identify', 'group', 'page', 'alias')
- `userId` / `anonymousId`: User identifier
- Additional fields based on type (event, properties, traits, etc.)
**Pitfalls**:
- Each message in the batch must have a valid `type` field
- Maximum batch size limit applies; check schema for current limit
- All messages in a batch are processed independently; one failure does not affect others
- Each message must independently satisfy its type's requirements (e.g., track needs event name)
- Batch is the most efficient way to send multiple calls; prefer over individual calls
### 4. Group Users
**When to use**: User wants to associate a user with a company, team, or organization
**Tool sequence**:
1. `SEGMENT_GROUP` - Associate user with a group [Required]
**Key parameters**:
- `userId`: User identifier (required if no `anonymousId`)
- `anonymousId`: Anonymous identifier
- `groupId`: Group/organization identifier (required)
- `traits`: Object with group properties (name, industry, size, plan)
- `timestamp`: ISO 8601 timestamp
**Pitfalls**:
- `groupId` is required; it identifies the company or organization
- Group traits are merged with existing traits for that group
- A user can belong to multiple groups
- Group traits update the group profile, not the user profile
### 5. Track Page Views
**When to use**: User wants to record page view events in Segment
**Tool sequence**:
1. `SEGMENT_PAGE` - Send a page view event [Required]
**Key parameters**:
- `userId`: User identifier (required if no `anonymousId`)
- `anonymousId`: Anonymous identifier
- `name`: Page name (e.g., 'Home', 'Pricing', 'Dashboard')
- `category`: Page category (e.g., 'Docs', 'Marketing')
- `properties`: Object with page-specific properties (url, title, referrer)
**Pitfalls**:
- At least one of `userId` or `anonymousId` is required
- `name` and `category` are optional but recommended for proper analytics
- Standard properties include `url`, `title`, `referrer`, `path`, `search`
- Page calls are often automated; manual use is for server-side page tracking
### 6. Alias Users and Manage Sources
**When to use**: User wants to merge anonymous and identified users, or manage source configuration
**Tool sequence**:
1. `SEGMENT_ALIAS` - Link two user identities together [Optional]
2. `SEGMENT_LIST_SCHEMA_SETTINGS_IN_SOURCE` - View source schema settings [Optional]
3. `SEGMENT_UPDATE_SOURCE` - Update source configuration [Optional]
**Key parameters**:
- For ALIAS:
- `userId`: New user identifier (the identified ID)
- `previousId`: Old user identifier (the anonymous ID)
- For source operations:
- `sourceId`: Source identifier
**Pitfalls**:
- ALIAS is a one-way operation; cannot be undone
- `previousId` is the anonymous/old ID, `userId` is the new/identified ID
- Not all destinations support alias calls; check destination documentation
- ALIAS should be called once when a user first identifies (e.g., signs up)
- Source updates may affect data collection; review changes carefully
## Common Patterns
### User Lifecycle
Standard Segment user lifecycle:
```
1. Anonymous user visits -> PAGE call with anonymousId
2. User interacts -> TRACK call with anonymousId
3. User signs up -> ALIAS (anonymousId -> userId), then IDENTIFY with traits
4. User takes action -> TRACK call with userId
5. User joins org -> GROUP call linking userId to groupId
```
### Batch Optimization
For bulk data ingestion:
```
1. Collect events in memory (array of message objects)
2. Each message includes type, userId/anonymousId, and type-specific fields
3. Call SEGMENT_BATCH with the collected messages
4. Check response for any individual message errors
```
### Naming Conventions
Segment recommends consistent event naming:
- **Events**: Use "Object Action" format (e.g., 'Order Completed', 'Article Viewed')
- **Properties**: Use snake_case (e.g., 'order_total', 'product_name')
- **Traits**: Use snake_case (e.g., 'first_name', 'plan_type')
## Known Pitfalls
**Identity Resolution**:
- Always include `userId` or `anonymousId` on every call
- Use ALIAS only once per user identity merge
- Identify before tracking to ensure proper user association
**Data Quality**:
- Event names should be consistent across all sources
- Properties should follow a defined schema for downstream compatibility
- Avoid sending sensitive PII unless destinations are configured for it
**Rate Limits**:
- Use BATCH for bulk operations to stay within rate limits
- Individual calls are rate-limited per source
- Batch calls are more efficient and less likely to be throttled
**Response Parsing**:
- Successful responses indicate acceptance, not delivery to destinations
- Response data may be nested under `data` key
- Check for error fields in batch responses for individual message failures
**Timestamps**:
- Must be ISO 8601 format with timezone (e.g., '2024-01-15T10:30:00Z')
- Omitting timestamp uses server receive time
- Historical data imports should include explicit timestamps
## Quick Reference
| Task | Tool Slug | Key Params |
|------|-----------|------------|
| Track event | SEGMENT_TRACK | userId, event, properties |
| IdeRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.