Introduction¶
When using WorkBuddy’s automation for periodic inspections or scheduled syncs, the task configuration lives in ~/.workbuddy/workbuddy.db and does not travel with the skill zip by default. A common scenario: you package the skill on the source machine and merge the skill directory on the target machine, but the automation tasks still reside in the source machine’s database. If you manually copy the JSON, the cwds and hardcoded local paths in the prompt become invalid on the new machine, often resulting in silent failures.
This article introduces the community Skill “Automation Task Portal” (coordinate: @user_f1d11e73/zfl-automation-port, current version 1.1.4). It packages automations into portable specs with placeholders that can be placed in the skill directory for distribution, and supports dual-machine bundle merging with ledger-based incremental reconciliation. It’s ideal for scenarios where you need to rebuild after a machine change or run the same set of scheduled logic on two machines with offset timing.
What This Is¶
“Automation Task Portal” is a tooling-layer Skill under the ai-agent category on SkillHub, published by user_f1d11e73, tagged with requires_api_key=false — no additional API Key needed.
Its positioning can be summarized as: export, templating, cross-machine import for WorkBuddy automations, plus dual-machine task set merging and mirror synchronization. The helper scripts only perform placeholder substitution and plan generation; they do not connect to workbuddy.db directly. Actual create/update/delete operations are still carried out by the Agent calling automation_update.
Core Features¶
Route A: Migration with the Skill Package¶
Take an automation’s configuration from the source machine (via view), and use template_spec.py to write it as <skill>/automations/<semantic-name>.automation.json. The file ships with the skill’s release or offline bundle. On the target machine, after merging the skill, use reimport_all.py to scan and resolve placeholders, then have the Agent execute automation_update one by one to recreate the tasks.
Placeholder conventions:
| Placeholder | Meaning | Resolved to on import |
|---|---|---|
{{WB_HOME}} |
WorkBuddy home directory | Expanded path of ~/.workbuddy |
{{WORKSPACE}} |
Automation workspace | Route A uses --workspace; Route B uses workspace-map |
A spec inside the skill package does not automatically become a running task; you must complete the resolve → create/update cycle.
Route B: Dual-Machine Mirror Merging & Incremental Sync¶
Export the full set of automations as an automations-bundle.json with a machine_tag (or A.bundle.json / B.bundle.json). For dual-machine merging, use merge_mirror.py: the matching key is the task name (_prompt_hash is only used to determine whether a same-named task has been modified); same-name tasks with different prompts are logged in conflicts and never silently overwritten. The --primary side keeps its baseline schedule, while the other side’s recurring tasks can have a +offset-minutes applied to their rrule (default 30) for staggered triggering.
The incremental phase uses automation-mirror/ledger.json for per-name bookkeeping; diff_sync.py in diff mode is read-only and does not write to the ledger — it only commits after successful execution via --commit. Failed items will be re-reported in the next cycle. Deletes are report-only by default; --apply-deletes is required to actually remove them.
Scripts & Directory¶
The scripts/ folder inside the skill package provides pure Python helpers, including: template_spec.py, resolve_spec.py, reimport_all.py (Route A); export_bundle.py, merge_mirror.py, diff_sync.py, rrule_offset.py (Route B); and a shared json_io.py for JSON read guards.
Installation & Activation¶
The SkillHub page links to unified installation instructions. First confirm that the skillhub CLI is installed locally; when installing a skill, you must use --dir to point to the skills directory your current Agent can recognize, otherwise the default ./skills/ location may not be loaded.
WorkBuddy environment example:
command -v skillhub && skillhub --version
skillhub install @user_f1d11e73/zfl-automation-port --dir ~/.workbuddy/skills/
If installing the same skill package in Cursor, the directory is typically ~/.cursor/skills/:
skillhub install @user_f1d11e73/zfl-automation-port --dir ~/.cursor/skills/
SKILL.md declares dependencies on the same author’s zfl-skill-factory, zfl-skill-syncer, zfl-sync-suite, and other skills; if you’re already using these skills for packaging, syncing, and publishing workflows, Route A specs will be included in the release artifact along with the automations/ directory (the skill documentation explicitly states that release collection does not exclude automations/).
Trigger scenarios include natural-language commands such as “export automation”, “import portable automation”, “dual-machine automation merge”, “scheduled task mirror sync”; it does not apply to system cron/task scheduler, nor to scenarios requiring direct access to workbuddy.db.
Typical Usage¶
Route A: Export a Single Task and Ship with the Skill¶
On the source machine, the Agent obtains the full JSON via automation_update mode=view, then pipes it into the templating script (adjust the path to the owning skill):
echo '<live JSON>' | python scripts/template_spec.py \
--workspace-root "<source machine workspace root path>" \
--name "Engineering Standard Timeliness Watchdog (Monthly Inspection)" \
--out "../<owning-skill>/automations/watchdog_monthly.automation.json"
On the target machine, after merging the skill package, explicitly specify the workspace before batch import (do not guess paths):
python scripts/reimport_all.py --workspace "<target machine workspace>" --skills-dir "~/.workbuddy/skills"
python scripts/reimport_all.py --workspace "<target machine workspace>" --dry-run
Route B: One-Time Dual-Machine Merge¶
Machine A aggregates live JSON and exports the bundle:
python scripts/export_bundle.py --machine-tag A \
--in live_A.json \
--workspace-root "<Machine A workspace root path>" \
--out automation-mirror/A.bundle.json
Prepare workspace-map.json (refer to the bundled machine_workspace_map.example.json), merge, and manually review the manifest:
python scripts/merge_mirror.py \
--a automation-mirror/A.bundle.json \
--b automation-mirror/B.bundle.json \
--primary A --offset-minutes 30 \
--workspace-map automation-mirror/workspace-map.json \
--out-dir automation-mirror/merged
After reviewing conflicts in automation-mirror/merged/merge-manifest.json, the Agent executes automation_update one by one based on for_A.json / for_B.json.
Subsequent incremental reconciliation:
python scripts/diff_sync.py \
--a automation-mirror/A.bundle.json \
--b automation-mirror/B.bundle.json \
--primary A --offset-minutes 30 \
--workspace-map automation-mirror/workspace-map.json \
--ledger automation-mirror/ledger.json \
--out automation-mirror/diff-plan.json
python scripts/diff_sync.py \
--ledger automation-mirror/ledger.json \
--commit automation-mirror/diff-plan.json
For long-term alignment, import the skill’s built-in automations/sync-mirror.automation.json so that a scheduled automation drives the “pull peer bundle → diff → execute → commit” cycle. Both machines need access to the same automation-mirror/ directory (or first transfer the peer’s bundle via a sync channel).
Applicable Scenarios & Caveats¶
Suitable for:
- Automations tied to a specific WorkBuddy skill, where you want to one-click rebuild scheduled tasks after a machine change or skill package merge.
- Two computers each running their own set of WorkBuddy automations, needing set-union merging, staggered triggering, and ongoing incremental alignment.
Limitations & discipline:
- WorkBuddy automations only; helpers do not touch the database, and plans must be executed via the Agent and
automation_update. - If any
{{...}}or un-templated machine-specific paths remain after resolution, output should be rejected;--workspaceor--workspace-mapmust be provided before rebuilding. - Route B matching is based on name; you cannot align tasks across machines using each machine’s local automation id.
- Dual-machine mirroring requires a workspace dual-mapping; both machines cannot share a single hardcoded path.
The SkillHub public page shows a rating of 100,000 and 984 downloads (stats update with the platform). The install count is a page-display field; refer to the store for authoritative numbers.
Conclusion¶
“Automation Task Portal” transforms WorkBuddy scheduled tasks from single-database configurations into versionable, skill-distributable, dual-machine-reconcilable portable specs, reducing path and environment coupling during machine changes and multi-machine collaboration. Official Skill page and API endpoint:
- https://www.skillhub.cn/skills/user_f1d11e73/zfl-automation-port
- https://api.skillhub.cn/user_f1d11e73/zfl-automation-port
Install coordinate: @user_f1d11e73/zfl-automation-port, version 1.1.4.