360 Secure SkillHub
360 安全技能中心

Segment

核心功能:借助Segment的Config与Tracking API,实现源、目的地、追踪计划等资源的增删查改,以及发送追踪事件、用户标识等操作。典型场景:适用于开发者或运维人员批量管理Segment资源、自动化数据追踪流程。输入为命令行指令,需配置两个必填环境变量;输出默认JSON,加--human可获可读格式,兼容Python3.10+,无额外依赖。

aiwithabidi
aiwithabidi
热度 55.82
最近更新 2026-05-10 17:41:38
分类:开发依赖:代码执行 / 第三方 API应用场景:API 集成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add segment
Metadata
name
segment
description
Segment — manage sources, destinations, events, and tracking plans via Config & Tracking APIs
homepage
https://www.agxntsix.ai
license
MIT
compatibility
Python 3.10+ (stdlib only — no dependencies)
metadata
{"openclaw":{"emoji":"📊","requires":{"env":["SEGMENT_ACCESS_TOKEN","SEGMENT_WRITE_KEY"]},"primaryEnv":"SEGMENT_ACCESS_TOKEN","homepage":"https://www.agxntsix.ai"}}

📊 Segment

Segment — manage sources, destinations, events, and tracking plans via Config & Tracking APIs

Requirements

Variable Required Description
SEGMENT_ACCESS_TOKEN ✅ Config API token
SEGMENT_WRITE_KEY ✅ Source write key

Quick Start

# List sources
python3 {{baseDir}}/scripts/segment.py sources

# Get source
python3 {{baseDir}}/scripts/segment.py source-get id <value>

# Create source
python3 {{baseDir}}/scripts/segment.py source-create --name <value> --catalog_name <value>

# Delete source
python3 {{baseDir}}/scripts/segment.py source-delete id <value>

# List destinations
python3 {{baseDir}}/scripts/segment.py destinations

# Get destination
python3 {{baseDir}}/scripts/segment.py destination-get id <value>

# List warehouses
python3 {{baseDir}}/scripts/segment.py warehouses

# List source catalog
python3 {{baseDir}}/scripts/segment.py catalog-sources

All Commands

Command Description
sources List sources
source-get Get source
source-create Create source
source-delete Delete source
destinations List destinations
destination-get Get destination
warehouses List warehouses
catalog-sources List source catalog
catalog-destinations List destination catalog
tracking-plans List tracking plans
tracking-plan-get Get tracking plan
spaces List spaces
functions List functions
track Send track event
identify Send identify

Output Format

All commands output JSON by default. Add --human for readable formatted output.

python3 {{baseDir}}/scripts/segment.py <command> --human

Script Reference

Script Description
{{baseDir}}/scripts/segment.py Main CLI — all commands in one tool

Credits

Built by M. Abidi | agxntsix.ai YouTube | GitHub Part of the AgxntSix Skill Suite for OpenClaw agents.

📅 Need help setting up OpenClaw for your business? Book a free consultation