[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-fd532a03-2f60-46b0-81fa-37f3af6a9b77":3,"$fwPcMlxD1X8p-byQ_3MbT7e0BsDl-SXgYremgDtlNkxM":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"fd532a03-2f60-46b0-81fa-37f3af6a9b77","segment-automation","通过Rube MCP（Composio）自动化Segment任务：跟踪事件、识别用户、管理分组、页面浏览、别名、批量操作。始终首先搜索当前架构的工具。","cat_prod_automation","mod_productivity","sickn33,productivity","---\nname: segment-automation\ndescription: \"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.\"\nrisk: critical\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Segment Automation via Rube MCP\n\nAutomate Segment customer data platform operations through Composio's Segment toolkit via Rube MCP.\n\n## Prerequisites\n\n- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)\n- Active Segment connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `segment`\n- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas\n\n## Setup\n\n**Get Rube MCP**: Add `https:\u002F\u002Frube.app\u002Fmcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.\n\n\n1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds\n2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `segment`\n3. If connection is not ACTIVE, follow the returned auth link to complete Segment authentication\n4. Confirm connection status shows ACTIVE before running any workflows\n\n## Core Workflows\n\n### 1. Track Events\n\n**When to use**: User wants to send event data to Segment for downstream destinations\n\n**Tool sequence**:\n1. `SEGMENT_TRACK` - Send a single track event [Required]\n\n**Key parameters**:\n- `userId`: User identifier (required if no `anonymousId`)\n- `anonymousId`: Anonymous identifier (required if no `userId`)\n- `event`: Event name (e.g., 'Order Completed', 'Button Clicked')\n- `properties`: Object with event-specific properties\n- `timestamp`: ISO 8601 timestamp (optional; defaults to server time)\n- `context`: Object with contextual metadata (IP, user agent, etc.)\n\n**Pitfalls**:\n- At least one of `userId` or `anonymousId` is required\n- `event` name is required and should follow consistent naming conventions\n- Properties are freeform objects; ensure consistent schema across events\n- Timestamp must be ISO 8601 format (e.g., '2024-01-15T10:30:00Z')\n- Events are processed asynchronously; successful API response means accepted, not delivered\n\n### 2. Identify Users\n\n**When to use**: User wants to associate traits with a user profile in Segment\n\n**Tool sequence**:\n1. `SEGMENT_IDENTIFY` - Set user traits and identity [Required]\n\n**Key parameters**:\n- `userId`: User identifier (required if no `anonymousId`)\n- `anonymousId`: Anonymous identifier\n- `traits`: Object with user properties (email, name, plan, etc.)\n- `timestamp`: ISO 8601 timestamp\n- `context`: Contextual metadata\n\n**Pitfalls**:\n- At least one of `userId` or `anonymousId` is required\n- Traits are merged with existing traits, not replaced\n- To remove a trait, set it to `null`\n- Identify calls should be made before track calls for new users\n- Avoid sending PII in traits unless destinations are configured for it\n\n### 3. Batch Operations\n\n**When to use**: User wants to send multiple events, identifies, or other calls in a single request\n\n**Tool sequence**:\n1. `SEGMENT_BATCH` - Send multiple Segment calls in one request [Required]\n\n**Key parameters**:\n- `batch`: Array of message objects, each with:\n  - `type`: Message type ('track', 'identify', 'group', 'page', 'alias')\n  - `userId` \u002F `anonymousId`: User identifier\n  - Additional fields based on type (event, properties, traits, etc.)\n\n**Pitfalls**:\n- Each message in the batch must have a valid `type` field\n- Maximum batch size limit applies; check schema for current limit\n- All messages in a batch are processed independently; one failure does not affect others\n- Each message must independently satisfy its type's requirements (e.g., track needs event name)\n- Batch is the most efficient way to send multiple calls; prefer over individual calls\n\n### 4. Group Users\n\n**When to use**: User wants to associate a user with a company, team, or organization\n\n**Tool sequence**:\n1. `SEGMENT_GROUP` - Associate user with a group [Required]\n\n**Key parameters**:\n- `userId`: User identifier (required if no `anonymousId`)\n- `anonymousId`: Anonymous identifier\n- `groupId`: Group\u002Forganization identifier (required)\n- `traits`: Object with group properties (name, industry, size, plan)\n- `timestamp`: ISO 8601 timestamp\n\n**Pitfalls**:\n- `groupId` is required; it identifies the company or organization\n- Group traits are merged with existing traits for that group\n- A user can belong to multiple groups\n- Group traits update the group profile, not the user profile\n\n### 5. Track Page Views\n\n**When to use**: User wants to record page view events in Segment\n\n**Tool sequence**:\n1. `SEGMENT_PAGE` - Send a page view event [Required]\n\n**Key parameters**:\n- `userId`: User identifier (required if no `anonymousId`)\n- `anonymousId`: Anonymous identifier\n- `name`: Page name (e.g., 'Home', 'Pricing', 'Dashboard')\n- `category`: Page category (e.g., 'Docs', 'Marketing')\n- `properties`: Object with page-specific properties (url, title, referrer)\n\n**Pitfalls**:\n- At least one of `userId` or `anonymousId` is required\n- `name` and `category` are optional but recommended for proper analytics\n- Standard properties include `url`, `title`, `referrer`, `path`, `search`\n- Page calls are often automated; manual use is for server-side page tracking\n\n### 6. Alias Users and Manage Sources\n\n**When to use**: User wants to merge anonymous and identified users, or manage source configuration\n\n**Tool sequence**:\n1. `SEGMENT_ALIAS` - Link two user identities together [Optional]\n2. `SEGMENT_LIST_SCHEMA_SETTINGS_IN_SOURCE` - View source schema settings [Optional]\n3. `SEGMENT_UPDATE_SOURCE` - Update source configuration [Optional]\n\n**Key parameters**:\n- For ALIAS:\n  - `userId`: New user identifier (the identified ID)\n  - `previousId`: Old user identifier (the anonymous ID)\n- For source operations:\n  - `sourceId`: Source identifier\n\n**Pitfalls**:\n- ALIAS is a one-way operation; cannot be undone\n- `previousId` is the anonymous\u002Fold ID, `userId` is the new\u002Fidentified ID\n- Not all destinations support alias calls; check destination documentation\n- ALIAS should be called once when a user first identifies (e.g., signs up)\n- Source updates may affect data collection; review changes carefully\n\n## Common Patterns\n\n### User Lifecycle\n\nStandard Segment user lifecycle:\n```\n1. Anonymous user visits -> PAGE call with anonymousId\n2. User interacts -> TRACK call with anonymousId\n3. User signs up -> ALIAS (anonymousId -> userId), then IDENTIFY with traits\n4. User takes action -> TRACK call with userId\n5. User joins org -> GROUP call linking userId to groupId\n```\n\n### Batch Optimization\n\nFor bulk data ingestion:\n```\n1. Collect events in memory (array of message objects)\n2. Each message includes type, userId\u002FanonymousId, and type-specific fields\n3. Call SEGMENT_BATCH with the collected messages\n4. Check response for any individual message errors\n```\n\n### Naming Conventions\n\nSegment recommends consistent event naming:\n- **Events**: Use \"Object Action\" format (e.g., 'Order Completed', 'Article Viewed')\n- **Properties**: Use snake_case (e.g., 'order_total', 'product_name')\n- **Traits**: Use snake_case (e.g., 'first_name', 'plan_type')\n\n## Known Pitfalls\n\n**Identity Resolution**:\n- Always include `userId` or `anonymousId` on every call\n- Use ALIAS only once per user identity merge\n- Identify before tracking to ensure proper user association\n\n**Data Quality**:\n- Event names should be consistent across all sources\n- Properties should follow a defined schema for downstream compatibility\n- Avoid sending sensitive PII unless destinations are configured for it\n\n**Rate Limits**:\n- Use BATCH for bulk operations to stay within rate limits\n- Individual calls are rate-limited per source\n- Batch calls are more efficient and less likely to be throttled\n\n**Response Parsing**:\n- Successful responses indicate acceptance, not delivery to destinations\n- Response data may be nested under `data` key\n- Check for error fields in batch responses for individual message failures\n\n**Timestamps**:\n- Must be ISO 8601 format with timezone (e.g., '2024-01-15T10:30:00Z')\n- Omitting timestamp uses server receive time\n- Historical data imports should include explicit timestamps\n\n## Quick Reference\n\n| Task | Tool Slug | Key Params |\n|------|-----------|------------|\n| Track event | SEGMENT_TRACK | userId, event, properties |\n| Identify user | SEGMENT_IDENTIFY | userId, traits |\n| Batch calls | SEGMENT_BATCH | batch (array of messages) |\n| Group user | SEGMENT_GROUP | userId, groupId, traits |\n| Page view | SEGMENT_PAGE | userId, name, properties |\n| Alias identity | SEGMENT_ALIAS | userId, previousId |\n| Source schema | SEGMENT_LIST_SCHEMA_SETTINGS_IN_SOURCE | sourceId |\n| Update source | SEGMENT_UPDATE_SOURCE | sourceId |\n| Warehouses | SEGMENT_LIST_CONNECTED_WAREHOUSES_FROM_SOURCE | sourceId |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,216,417,"2026-05-16 13:38:34",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"效率工具","productivity","mdi-lightning-bolt-outline","文档处理、数据分析、自动化工作流",4,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"自动化","automation","mdi-robot-outline","工作流自动化、批处理",3,101,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"6105654e-8f3f-4df4-9b4c-32d15aa0abca","1.0.0","segment-automation.zip",3577,"uploads\u002Fskills\u002Ffd532a03-2f60-46b0-81fa-37f3af6a9b77\u002Fsegment-automation.zip","50448efbd7de597edcfd87731f3fd311ce82f110d9430d366552b7cfbfb0710f","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":9184}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]