Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计通过

campaign-flow-builder活动流程构建器

Agent Skill

campaign-flow-builder 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

504

周安装

21

GitHub Stars

2

下载量

168
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:campaign-flow-builder(活动流程构建器)
来源仓库:https://github.com/lytics/agent-skills
仓库路径:skills/campaign-flow-builder
安装命令:
npx skills add https://github.com/lytics/agent-skills --skill campaign-flow-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lytics/agent-skills --skill campaign-flow-builder

简介

campaign-flow-builder 引导构建 Lytics 平台的用户旅程流程。

  • 从业务目标出发,逐步定义入口节点、分支逻辑与 A/B 测试规则。
  • 采用顾问式交互模式,支持迭代调整直至满足需求。
  • 需配合 LYTICS_API_TOKEN 使用,确保 API 权限范围正确。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Campaign Flow Builder

Purpose

Guides users from business intent ("I want a welcome email series") to a complete, validated flow with entry segments, delays, conditional branches, A/B tests, and export steps. Follows the advisor pattern: understand the goal, suggest structure, iterate, then create.

Flows are the most complex Lytics object -- this skill makes them approachable.

Environment

  • LYTICS_API_TOKEN -- API authentication token
  • LYTICS_API_URL -- Base URL (default: https://api.lytics.io)

Flow API Format

Flows use a node-edge graph representation (TranslatedFlow format):

  • Nodes: Steps in the journey (trigger, delay, export, conditional, A/B test, exit)
  • Edges: Connections between steps (with optional conditions or probabilities)

Building a Flow

Step 1: Understand the Campaign Goal

Classify the user's intent:

  • "Welcome email series" -> trigger on segment entry, delays between emails
  • "Re-engagement campaign" -> trigger on lapsed users, conditional check, export
  • "A/B test two offers" -> trigger, A/B split, two export paths
  • "Multi-channel nurture" -> trigger, delays, conditionals, multiple export channels

Ask:

  • What triggers entry? (entering a segment, being in a segment)
  • How many steps/touchpoints?
  • Any branching logic? (VIP vs standard, engaged vs not)
  • What timing between steps?
  • Can users re-enter?

Step 2: Verify Entry Segment

The flow needs a trigger segment. Check if it exists:

curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/segment?table=user&sizes=true" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

If no suitable segment exists, suggest using audience-builder skill or audience-advisor skill to create one.

Step 3: Design the Flow Structure

Present a visual text diagram of the proposed flow:

TRIGGER: On entry to "New Signups" segment
  |
  v
[Send Welcome Email] (export)
  |
  v
[Wait 3 days] (delay)
  |
  v
[Opened Welcome?] (conditional split)
  |           |
  YES         NO
  |           |
  v           v
[Send Offer] [Send Reminder]
  |           |
  v           v
[EXIT]       [EXIT]

Iterate with the user until they're happy with the structure.

Step 4: Build the Flow Payload

Node Types

Trigger (always sequence_id: 0):

{
  "sequence_id": 0,
  "type": "trigger",
  "entry_segment_id": "segment-uuid-here",
  "entry_condition": "on_segment_entry",
  "reentry_allowed": false,
  "reentry_delay": 86400
}

Entry conditions:

  • "on_segment_entry" -- fires when user enters the segment (event-based, most common)
  • "in_segment" -- fires for users currently in the segment (snapshot)

Reentry delay is in seconds. Minimum is 3600 (1 hour).

Export (send to external platform):

{
  "sequence_id": 1000,
  "type": "export",
  "label": "Send Welcome Email",
  "work_config": {}
}

The work_config is configured separately after flow creation via the work endpoint.

Delay (wait between steps):

{
  "sequence_id": 2000,
  "type": "delay",
  "label": "Wait 3 days",
  "delay": 259200000000000
}

Delay is in nanoseconds. Common values:

  • 1 hour: 3600000000000
  • 24 hours: 86400000000000
  • 3 days: 259200000000000
  • 7 days: 604800000000000

Optional: delay_condition (FilterQL) -- proceed only when condition is met. Optional: delay_until_enters (array of segment IDs) -- wait until user enters all listed segments.

Conditional Split (if/else branching):

{
  "sequence_id": 3000,
  "type": "conditional_split",
  "label": "Opened Welcome?"
}

Conditions are defined on the edges, not the node. See Edges section.

A/B Test (random split):

{
  "sequence_id": 4000,
  "type": "ab_test",
  "label": "50/50 Test"
}

Probabilities are defined on the edges. Must sum to 1.0.

Exit (end of flow):

{
  "sequence_id": 9999,
  "type": "exit"
}

Edge Types

Simple connection:

{"id": "0-1000", "source": 0, "target": 1000, "type": "connected"}

Conditional split edge (with FilterQL):

{
  "id": "3000-4000",
  "source": 3000,
  "target": 4000,
  "type": "connected",
  "condition": {
    "definition": "FILTER AND (email_opened = true) FROM user",
    "label": "Yes",
    "priority": 2
  }
}

Higher priority numbers are checked first. The default/fallback edge should have "definition": "" and "priority": 1.

A/B test edge (with probability):

{
  "id": "4000-5000",
  "source": 4000,
  "target": 5000,
  "type": "connected",
  "probability": 0.5
}

All probabilities from the same source node must sum to 1.0.

Step ID Assignment

  • Trigger is always sequence_id: 0
  • All other IDs are caller-assigned positive integers (must be unique within the flow)
  • Convention: use multiples of 1000 (1000, 2000, 3000) for readability

Step 5: Confirm and Create

Use the confirmation-gate pattern. Show:

  • Flow diagram (text visual)
  • Entry segment name and size
  • Step count and types
  • Timing summary
  • Raw API payload
curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/flow/ui" \
  -H "Authorization: ${LYTICS_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ ... flow payload ... }'

Step 6: Configure Export Steps

After the flow is created in draft state, configure the work/export for each export step:

curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/flow/ui/${FLOW_ID}/step/${STEP_ID}/work" \
  -H "Authorization: ${LYTICS_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ ... work configuration ... }'

Then publish the work:

curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/flow/ui/${FLOW_ID}/step/${STEP_ID}/work/publish" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Step 7: Activate the Flow

Once all export steps have published work, activate the flow:

curl -s -X POST "${LYTICS_API_URL:-https://api.lytics.io}/v2/flow/ui/${FLOW_ID}" \
  -H "Authorization: ${LYTICS_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"state": "running"}'

Important: Only one version of a flow can be running at a time. Publishing a new version automatically sets the old one to draining.

Common Campaign Patterns

Welcome Series

TRIGGER (on_segment_entry: "New Signups")
  -> [Send Welcome] -> [Wait 3d] -> [Send Tips] -> [Wait 7d] -> [Send Offer] -> EXIT

Re-engagement

TRIGGER (in_segment: "Lapsed 30d")
  -> [Send Win-Back] -> [Wait 7d]
  -> CONDITIONAL (opened email?)
     YES -> [Send Discount] -> EXIT
     NO  -> [Send Final Notice] -> EXIT

A/B Test

TRIGGER (on_segment_entry: "Trial Users")
  -> [Wait 1d]
  -> A/B TEST (50/50)
     A -> [Send Offer A] -> EXIT
     B -> [Send Offer B] -> EXIT

Multi-Channel Nurture

TRIGGER (on_segment_entry: "High Intent")
  -> [Send Email] -> [Wait 2d]
  -> CONDITIONAL (converted?)
     YES -> EXIT
     NO  -> [Push Notification] -> [Wait 3d]
           -> [Retarget on Facebook] -> EXIT

Flow States

StateDescriptionCan Edit?
draftNot active, fully editableYes -- add/remove/modify steps
runningActive, processing usersLimited -- can update work_config, labels, conditions; cannot add/remove steps
drainingWinding down, no new entriesSame as running
deletedPermanently deletedNo

Error Handling

  • Invalid FilterQL in conditions: Validate conditions before creating the flow
  • Probabilities don't sum to 1.0: Adjust and retry
  • Entry segment not found: Help create one with audience-builder
  • Duplicate step IDs: Regenerate with unique values
  • Missing work config: Guide through export step configuration

Dependencies

  • Composes: segment-manager skill, audience-builder skill, job-manager skill
  • References: ../references/filterql-grammar.md, ../references/confirmation-gate.md, ../references/api-client.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.49%
按下载量换算58

Claude

31.76%
按下载量换算53

Cursor

20.28%
按下载量换算34

Gemini CLI

10.74%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills