agentleFS
lyticslytics/agent-skills/flow-manager/SKILL.md

flow-manager

Skill4 starsChanged 7 months agoMITView on GitHub

Flow/journey CRUD and step management for campaign orchestration. Use when the user wants to list, view, create, update, or delete flows, journeys, or campaign steps.

  • Sends data out

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the confirmation-gate pattern.

    line 139
  2. Distinctive:

    Invalid entry segment: Verify segment exists first

    line 142
  3. Very specific:

    Invalid step references: Ensure next IDs point to existing steps

    line 143
  4. Distinctive:

    State transition errors: Only valid transitions are draft->running, running->draining

    line 144

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Flow Manager

Purpose

Manage flows (customer journeys/campaigns) -- create, update, delete flows and manage their steps including delays, exports, conditionals, A/B tests, and affinity routing.

Environment

Requires authenticated API access. See ../references/auth.md for credential resolution.

API Endpoints

List Flows

curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/flow/ui" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Get Flow

curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/flow/ui/${FLOW_ID}" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Get Flow Version

curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/flow/ui/${FLOW_ID}/${VERSION}" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Create Flow

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 ... }'

Update 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 '{ ... updated flow payload ... }'

Delete Flow

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

Create Work for Flow 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 config ... }'

List Flow States

curl -s "${LYTICS_API_URL:-https://api.lytics.io}/v2/flow/state" \
  -H "Authorization: ${LYTICS_API_TOKEN}"

Flow Payload

{
  "id": "flow_name",
  "label": "Display Name",
  "description": "What this flow does",
  "entry_segment_id": "segment_id",
  "entry_condition": "on_segment_entry",
  "reentry_allowed": false,
  "reentry_delay": "24h",
  "state": "draft",
  "steps": [
    {
      "id": 1,
      "label": "Step 1",
      "type_hint": "work_export",
      "slug": "step_1",
      "next": 2,
      "work_id": "work_id",
      "work_config": {}
    },
    {
      "id": 2,
      "label": "Wait 24 hours",
      "type_hint": "delay",
      "slug": "delay_step",
      "next": 3,
      "delay": "24h"
    }
  ]
}

Flow States

StateDescription
draftEditable, not processing
runningActively processing users
drainingStopping gracefully, processing remaining users
deletedSoft deleted

Entry Conditions

ConditionDescription
in_segmentTriggers for users currently in the segment
on_segment_entryTriggers only when a user enters the segment

Step Types

TypeDescriptionKey Fields
work_exportExport to external systemwork_id, work_config
delayWait before next stepdelay (duration string)
conditionalSplit by FilterQL conditionsplit_conditions
affinityRoute by content affinitysplit_affinities, affinity_config_id
ab_testingRandom split by probabilitysplit_probabilities
work_export_exitExport on flow exitwork_id, work_config

Behavior

For Read Operations

Execute immediately, display flow structure as a visual step chain.

For Write Operations

Use the confirmation-gate pattern. For state changes (draft -> running, running -> draining), explicitly warn about the implications.

Error Handling

  • Invalid entry segment: Verify segment exists first
  • Invalid step references: Ensure next IDs point to existing steps
  • State transition errors: Only valid transitions are draft->running, running->draining

Dependencies

  • Uses: ../references/auth.md, ../references/api-client.md, ../references/confirmation-gate.md
  • Related: segment-manager skill (for entry segments), job-manager skill (for work steps)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.