$npx -y skills add Sarai-Chinwag/wp-openclaw --skill data-machineSelf-scheduling execution layer for autonomous task orchestration. Use for queuing tasks, chaining pipeline executions, scheduling recurring work, and 24/7 autonomous operation via Agent Ping webhooks.
| 1 | # Data Machine Skill |
| 2 | |
| 3 | **A self-scheduling execution layer for AI agents.** Not just content automation — it's how agents schedule themselves to achieve goals autonomously. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | Use this skill when: |
| 8 | - Setting up automated workflows (content generation, publishing, notifications) |
| 9 | - Creating self-scheduling patterns (reminders, recurring tasks) |
| 10 | - Building multi-phase projects with queued task progression |
| 11 | - Configuring Agent Ping webhooks to trigger external agents |
| 12 | |
| 13 | --- |
| 14 | |
| 15 | ## Core Philosophy |
| 16 | |
| 17 | Data Machine is designed with AI agents as primary users. It functions as a **reminder system + task manager + workflow executor** all in one. |
| 18 | |
| 19 | ### Three Key Concepts |
| 20 | |
| 21 | 1. **Flows operate on schedules** — Configure "ping me at X time to do Y" |
| 22 | 2. **Step-level prompt queues** — Each ping can be a different task instruction |
| 23 | 3. **Multiple purpose-specific flows** — Separate flows for separate concerns |
| 24 | |
| 25 | ### Mental Model |
| 26 | |
| 27 | | Role | How It Works | |
| 28 | |------|--------------| |
| 29 | | **Reminder System** | Flows run on schedules (daily, hourly, cron) and ping the agent | |
| 30 | | **Task Manager** | Queues hold task backlog; each run pops the next task | |
| 31 | | **Workflow Executor** | Pipeline steps execute work (AI generation, publishing, API calls) | |
| 32 | |
| 33 | --- |
| 34 | |
| 35 | ## Architecture Overview |
| 36 | |
| 37 | ### Execution Model |
| 38 | |
| 39 | ``` |
| 40 | Pipeline (template) → Flow (instance) → Job (execution) |
| 41 | ``` |
| 42 | |
| 43 | - **Pipeline**: Reusable workflow template with steps |
| 44 | - **Flow**: Instance of a pipeline with specific configuration and schedule |
| 45 | - **Job**: Single execution of a flow |
| 46 | |
| 47 | ### Step Types |
| 48 | |
| 49 | | Type | Purpose | Has Queue | |
| 50 | |------|---------|-----------| |
| 51 | | `fetch` | Import data (RSS, Sheets, Files, Reddit) | No | |
| 52 | | `ai` | Process with AI (multi-turn, tools) | **Yes** | |
| 53 | | `publish` | Output (WordPress, Twitter, Discord) | No | |
| 54 | | `update` | Modify existing content | No | |
| 55 | | `agent_ping` | Webhook to external agents | **Yes** | |
| 56 | |
| 57 | ### Scheduling Options |
| 58 | |
| 59 | Configure via `scheduling_config` in the flow: |
| 60 | |
| 61 | | Interval | Behavior | |
| 62 | |----------|----------| |
| 63 | | `manual` | Only runs when triggered via UI or CLI | |
| 64 | | `daily` | Runs once per day | |
| 65 | | `hourly` | Runs once per hour | |
| 66 | | `{"cron": "0 9 * * 1"}` | Cron expression (e.g., Mondays at 9am) | |
| 67 | |
| 68 | --- |
| 69 | |
| 70 | ## Working with Flows |
| 71 | |
| 72 | ### List Flows |
| 73 | |
| 74 | ```bash |
| 75 | wp datamachine flows list |
| 76 | ``` |
| 77 | |
| 78 | ### Get Flow Details |
| 79 | |
| 80 | ```bash |
| 81 | wp datamachine flows get <flow_id> |
| 82 | ``` |
| 83 | |
| 84 | ### Run a Flow Manually |
| 85 | |
| 86 | ```bash |
| 87 | wp datamachine flows run <flow_id> |
| 88 | ``` |
| 89 | |
| 90 | ### Check Job Status |
| 91 | |
| 92 | ```bash |
| 93 | wp datamachine jobs list --limit=10 |
| 94 | ``` |
| 95 | |
| 96 | --- |
| 97 | |
| 98 | ## Prompt Queues |
| 99 | |
| 100 | Both AI and Agent Ping steps support queues via `QueueableTrait`. If the configured prompt is empty and `queue_enabled` is true, the step pops from its queue. |
| 101 | |
| 102 | This enables **varied task instructions** per execution — not the same prompt every time. |
| 103 | |
| 104 | ### Queue Management |
| 105 | |
| 106 | ```bash |
| 107 | # Add to queue |
| 108 | wp datamachine flows queue add <flow_id> "Task instruction here" |
| 109 | |
| 110 | # List queue contents |
| 111 | wp datamachine flows queue list <flow_id> |
| 112 | |
| 113 | # Clear queue |
| 114 | wp datamachine flows queue clear <flow_id> |
| 115 | ``` |
| 116 | |
| 117 | ### Chaining Pattern |
| 118 | |
| 119 | When an agent receives a ping, it should: |
| 120 | 1. Execute the immediate task |
| 121 | 2. Queue the next logical task (if continuation needed) |
| 122 | 3. Let the cycle continue |
| 123 | |
| 124 | ``` |
| 125 | Ping: "Phase 1: Design the architecture" |
| 126 | → Agent designs, writes DESIGN.md |
| 127 | → Agent queues: "Phase 2: Implement schema per DESIGN.md" |
| 128 | |
| 129 | Ping: "Phase 2: Implement schema per DESIGN.md" |
| 130 | → Agent implements |
| 131 | → Agent queues: "Phase 3: Build API endpoints" |
| 132 | ``` |
| 133 | |
| 134 | The queue becomes the agent's **persistent project memory** — multi-phase work is tracked in the queue, not held in context. |
| 135 | |
| 136 | --- |
| 137 | |
| 138 | ## Purpose-Specific Flows |
| 139 | |
| 140 | **Critical pattern**: Don't try to do everything in one flow. Create separate flows for separate concerns: |
| 141 | |
| 142 | ``` |
| 143 | Flow: Content Generation (queue-driven) |
| 144 | → AI Step (pops topic from queue) → Publish → Agent Ping |
| 145 | |
| 146 | Flow: Content Ideation (daily) |
| 147 | → Agent Ping: "Review analytics, add topics to content queue" |
| 148 | |
| 149 | Flow: Weekly Review (cron: Monday 9am) |
| 150 | → Agent Ping: "Analyze last week's performance" |
| 151 | |
| 152 | Flow: Coding Tasks (manual, queue-driven) |
| 153 | → Agent Ping (pops from queue): specific coding task instructions |
| 154 | ``` |
| 155 | |
| 156 | Each flow has its own: |
| 157 | - **Schedule**: When it runs |
| 158 | - **Queue**: Task backlog specific to that workflow |
| 159 | - **Purpose**: Single responsibility, clear scope |
| 160 | |
| 161 | --- |
| 162 | |
| 163 | ## Agent Ping Configuration |
| 164 | |
| 165 | Agent Ping steps send webhooks to external agent frameworks (OpenClaw, LangChain, custom handlers). |
| 166 | |
| 167 | ### Handler Configuration |
| 168 | |
| 169 | - `webhook_url`: Where to send the ping |
| 170 | - `prompt`: Static prompt, or leave empty to use queue |
| 171 | - `queue_enabled`: Whether to pop from queue when prompt is empty |
| 172 | |
| 173 | ### Webhook Payload |
| 174 | |
| 175 | The ping includes: |
| 176 | - Flow and job co |