|
| 1 | +--- |
| 2 | +name: clawflow-openclaw-installer |
| 3 | +description: Use this skill when users want to install OpenClaw skills, configure cron jobs, validate cron format, or troubleshoot ClawFlow CLI commands such as install, cron-add, cron-edit, cron-list, and cron-remove. |
| 4 | +--- |
| 5 | + |
| 6 | +# ClawFlow OpenClaw Installer |
| 7 | + |
| 8 | +Use this skill for ClawFlow workflows that combine skill installation and cron management. |
| 9 | + |
| 10 | +## Trigger Conditions |
| 11 | + |
| 12 | +Use this skill when user asks to: |
| 13 | +- install a skill/package for OpenClaw |
| 14 | +- add/edit/remove/list cron jobs via ClawFlow |
| 15 | +- validate cron format (`*/5 * * * *`, `@daily`, `every 15m`, `5m`) |
| 16 | +- troubleshoot `openclaw` / `clawhub` / `clawflow` command failures |
| 17 | + |
| 18 | +## Required Checks |
| 19 | + |
| 20 | +Before changing anything: |
| 21 | +1. Confirm CLI availability: `openclaw --version`, `clawhub --version`, `node ./bin/clawflowhub.js --version` |
| 22 | +2. Confirm OpenClaw cron status: `openclaw cron status --json` |
| 23 | +3. Confirm current jobs: `openclaw cron list --all --json` |
| 24 | + |
| 25 | +## Core Workflows |
| 26 | + |
| 27 | +### 1) Install Package + Skills |
| 28 | + |
| 29 | +1. Run `clawflow install <package>` |
| 30 | +2. If registry install fails, use git fallback when repository metadata exists. |
| 31 | +3. Validate result by checking skill path and running `clawflow status`. |
| 32 | + |
| 33 | +### 2) Add Cron Job |
| 34 | + |
| 35 | +1. Normalize schedule from `--every` or `--schedule` to standard cron. |
| 36 | +2. Validate schedule before apply. |
| 37 | +3. Add job: |
| 38 | + - `clawflow cron-add <skill> --every 5m --description "..." [--params '{"key":"value"}']` |
| 39 | +4. Verify with: |
| 40 | + - `openclaw cron list --all --json` |
| 41 | + - `clawflow cron-list` |
| 42 | + |
| 43 | +### 3) Edit Cron Job |
| 44 | + |
| 45 | +1. Confirm target id exists from `clawflow cron-list`. |
| 46 | +2. Edit one or more fields: |
| 47 | + - `clawflow cron-edit <id> --every 15m` |
| 48 | + - `clawflow cron-edit <id> --description "updated"` |
| 49 | + - `clawflow cron-edit <id> --params '{"k":"v"}'` |
| 50 | +3. Re-check with `openclaw cron list --all --json`. |
| 51 | + |
| 52 | +### 4) Remove Cron Job |
| 53 | + |
| 54 | +1. Confirm target id. |
| 55 | +2. Remove: `clawflow cron-remove <id>` |
| 56 | +3. Verify no remaining job mismatch between OpenClaw and ClawFlow list. |
| 57 | + |
| 58 | +## Cron Format Rules |
| 59 | + |
| 60 | +Accepted inputs: |
| 61 | +- Raw cron: `*/5 * * * *` |
| 62 | +- Presets: `@hourly`, `@daily`, `@weekly`, `@monthly` |
| 63 | +- Duration shorthand: `5m`, `1h`, `2d`, `every 15m` |
| 64 | + |
| 65 | +Reject if: |
| 66 | +- invalid token count |
| 67 | +- out-of-range values |
| 68 | +- ambiguous text that cannot be normalized |
| 69 | + |
| 70 | +## Troubleshooting |
| 71 | + |
| 72 | +- `too many arguments for 'add'`: |
| 73 | + - check Windows argument quoting and pass params as valid JSON string |
| 74 | +- `command not found`: |
| 75 | + - run through `node ./bin/clawflowhub.js ...` or ensure global npm bin in PATH |
| 76 | +- OpenClaw gateway unavailable: |
| 77 | + - verify OpenClaw service is running and `OPENCLAW_URL` points correctly |
| 78 | + |
| 79 | +## Completion Checklist |
| 80 | + |
| 81 | +- command executed successfully |
| 82 | +- user sees expected job in `openclaw cron list --all --json` |
| 83 | +- `clawflow cron-list` output matches OpenClaw state |
| 84 | +- no config parse errors |
0 commit comments