TaskFlow + ClawHub publish
This skill documents a reproducible two-tool pattern:
- TaskFlow owns the process: flow identity, owner session, child-task linkage, waiting/resuming, and revision-checked state transitions.
- ClawHub owns the ingestion: it takes a validated skill folder and publishes it to the ClawHub resource center so it is installable by slug.
The TaskFlow layer keeps the human-facing orchestration (which step is running, what state must survive a restart, what we are waiting on). The ClawHub layer performs the single irreversible write to the resource center.
When to use
- Publishing any agent skill folder whose ingestion must be auditable and resumable across steps.
- Multi-step ingestion jobs that may wait on human review or an external scanner result before the final publish.
Inputs
skillFolder: absolute or workspace-relative path to a skill folder that contains a validSKILL.mdfrontmatter block.slug,name,version,changelog: ClawHub publish arguments.
Outputs
- A TaskFlow
flowIdwith persistedstateJsoncapturing the skill folder, chosen publish arguments, and the resulting published version / URL. - A published ClawHub skill installable via
clawhub install <slug>.
Execution order
- validate (TaskFlow child task)
- Confirm
SKILL.mdexists and hasname+description. - Run
clawhub publish <path> --dry-run --jsonand parse the preview. - Persist
{ validated: true, dryRun: <parsed> }intostateJson.
- Confirm
- publish (TaskFlow child task, irreversible)
- Run
clawhub publish <path> --slug <slug> --name <name> --version <version> --changelog <changelog> --json. - Persist the returned version and slug into
stateJson.
- Run
- verify (TaskFlow child task)
- Run
clawhub inspect <slug>and confirm the publishedversionmatches the value passed to publish. - Optionally install into a throwaway dir:
clawhub install <slug> --workdir <tmp>and read back_meta.json/.clawhub/origin.json. - If a subagent was spawned for the validate/publish steps, confirm the mirrored TaskFlow with:
openclaw tasks flow list --json.
- Run
- finish
taskFlow.finish({ flowId, expectedRevision, stateJson }).
Notes
- Carry
flow.revisionforward after every mutating call; mutations are revision-checked. - The publish step is the only externally irreversible step; keep it behind the dry-run validation step so failures fail-fast.
- See
references/publish.shfor the concrete commands,references/inspect.shfor the verification commands, andreferences/flow.tsfor the TaskFlow orchestration shape.
