← 返回
开发者工具 中文

Workflow

Build automated pipelines with reusable components, data flow between nodes, and state management.
使用可复用组件构建自动化流水线,实现节点间数据流与状态管理
ivangdavila
开发者工具 clawhub v1.0.0 1 版本 99798.6 Key: 无需
★ 4
Stars
📥 3,884
下载
💾 57
安装
1
版本
#latest

概述

Architecture

Workflows live in workflows/ with components and flows:

workflows/
├── index.md                 # Inventory with tags
├── components/
│   ├── connections/         # Auth configs
│   ├── nodes/               # Reusable operations
│   └── triggers/            # Event sources
└── flows/{name}/
    ├── flow.md              # Definition
    ├── config.yaml          # Parameters
    ├── run.sh               # Executable
    ├── state/               # Persistent between runs
    └── logs/

Quick Reference

TopicFile
-------------
Directory layout, naming, formatsstructure.md
Data passing between nodesdata-flow.md
Cursor, seen set, checkpointstate.md
Retry, rollback, idempotencyerrors.md
Connections, nodes, triggerscomponents.md
Create, test, update, archivelifecycle.md

Requirements

  • jq — JSON processing
  • yq — YAML config parsing
  • curl — HTTP requests
  • flock — Lock files to prevent concurrent runs
  • Secrets in macOS Keychain (security find-generic-password)

Data Storage

  • Location: workflows/ in workspace root
  • State: flows/{name}/state/ — cursor.json, seen.json, checkpoint.json
  • Logs: flows/{name}/logs/ — JSONL per run
  • Data: flows/{name}/data/ — intermediate files between nodes

Core Rules

1. Data Flow Pattern

Each node writes output to data/{NN}-{name}.json. Next node reads it.

curl ... > data/01-fetch.json
jq '...' data/01-fetch.json > data/02-filter.json

Breaking this pattern = nodes can't communicate.

2. Error Declaration

Every node in flow.md MUST declare:

  • On error: retry(N) | fail | continue | alert
  • On empty: skip | continue | fail

Undefined behavior = unpredictable workflow.

3. Lock Files

Prevent concurrent runs:

LOCKFILE="/tmp/workflow-${NAME}.lock"
exec 200>"$LOCKFILE"
flock -n 200 || exit 0

4. State Files

FilePurpose
---------------
cursor.json"Where did I leave off?"
seen.json"What have I processed?"
checkpoint.json"Multi-step recovery"

5. Component Reuse

Before creating new connections/nodes/triggers:

ls workflows/components/connections/
ls workflows/components/nodes/

Use existing. Update "Workflows Using This" when adding.


Related: For LLM-driven multi-phase processes, see the cycle skill.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 19:57 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,801
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,188
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,172