Back to Skills
    🦞

    hzl

    OpenClaw's persistent task database.

    By @tmchow
    View on GitHub
    SKILL.md
    ---
    name: hzl
    description: OpenClaw's persistent task database. Coordinate sub-agents, checkpoint progress, survive session boundaries.
    homepage: https://github.com/tmchow/hzl
    metadata:
      { "openclaw": { "emoji": "đź§ľ", "homepage": "https://github.com/tmchow/hzl", "requires": { "bins": ["hzl"] }, "install": [ { "id": "brew", "kind": "brew", "package": "hzl", "bins": ["hzl"], "label": "Install HZL (Homebrew)" }, { "id": "node", "kind": "node", "package": "hzl-cli", "bins": ["hzl"], "label": "Install HZL (npm)" } ] } }
    ---
    
    # HZL: Persistent task tracking for agents
    
    HZL (https://github.com/tmchow/hzl) is a local-first task ledger (database-backed, optionally cloud-synced for backup) that an agent can use to:
    
    - plan multi-step work into projects + tasks
    - checkpoint progress (so work survives session boundaries)
    - coordinate sub-agents or multiple coding tools with leases
    - generate reliable status reports ("what's done vs what's left")
    
    This skill teaches an agent how to use the `hzl` CLI.
    
    ## When to use HZL
    
    **OpenClaw has NO native task tracking tools.** Unlike Claude Code (which has TodoWrite) or Codex (which has update_plan), OpenClaw relies on memory and markdown files for tracking work. This makes HZL especially valuable for OpenClaw.
    
    **Use HZL by default for any non-trivial task tracking:**
    
    - Multi-step projects with real sequencing (dependencies) and handoffs
    - Work that may outlive this session or span multiple tools/agents
    - Orchestration: delegating work to sub-agents and needing recovery if they crash
    - Anything where "resume exactly where we left off" matters
    - **Any work you want to persist beyond this session**
    - **Any work that needs structure (nesting, dependencies, progress tracking)**
    - **Any work that benefits from a durable record of decisions or ownership**
    
    Multi-session or multi-agent work are common reasons to use HZL, not requirements.
    Use HZL for single-session, single-agent work when the task is non-trivial.
    
    **Why HZL is the right choice for OpenClaw:**
    
    Without HZL, OpenClaw tracks tasks in-context (burns space, fragments during compaction) or in markdown files (requires manual management, no nesting/dependencies, no dashboard). HZL provides:
    
    - Persistent storage that survives session boundaries
    - Nesting (parent tasks + subtasks) and dependencies
    - Web dashboard for human visibility (`hzl serve`)
    - Leases for multi-agent coordination
    - Checkpoints for progress recovery
    
    **Only skip HZL for:**
    
    - Truly trivial, one-step tasks you will complete immediately in this session
    - Time-based reminders/alerts (use OpenClaw Cron instead)
    - Longform notes or knowledge capture (use a notes or memory system)
    
    **Rule of thumb:** If you feel tempted to make a multi-step plan or there is any chance you will not finish in this session, use HZL.
    
    Example: "Investigate failing tests and fix root cause" -> use HZL because it likely involves multiple subtasks, even if you expect to finish within a session.
    
    Personal tasks: HZL is not a polished human to-do app, but it is usable for personal task tracking, and it can also serve as a backend for a lightweight UI.
    
    ## Core concepts
    
    - **Project**: stable container. For OpenClaw, use a single `openclaw` project—this keeps `hzl task next` simple. Check `hzl project list` before creating.
    - **Task**: top-level work item. For multi-step requests, this becomes a parent task.
    - **Subtask**: breakdown of a task into parts (`--parent <id>`). Max 1 level of nesting. Parent tasks are organizational containers—never returned by `hzl task next`.
    - **Checkpoint**: short progress snapshot to support recovery
    - **Lease**: time-limited claim (prevents orphaned work in multi-agent flows)
    
    ## Anti-pattern: Project Sprawl
    
    Use a single `openclaw` project. Requests and initiatives become **parent tasks**, not new projects.
    
    **Wrong (creates sprawl):**
    ```bash
    hzl project create "garage-sensors"
    hzl project create "query-perf"
    # Now you have to track which project to query
    ```
    
    **Correct (single project, parent tasks):**
    ```bash
    # Check for existing project first
    hzl project list
    
    # Use single openclaw project
    hzl task add "Install garage sensors" -P openclaw
    # → Created task abc123
    
    hzl task add "Wire sensor to hub" --parent abc123
    hzl task add "Configure alerts" --parent abc123
    
    # hzl task next --project openclaw always works
    ```
    
    Why this matters:
    - Projects accumulate forever; you'll have dozens of abandoned one-off projects
    - `hzl task next --project X` requires knowing which project to query
    - With a single project, `hzl task next --project openclaw` always works
    
    ## Sizing Parent Tasks
    
    HZL supports one level of nesting (parent → subtasks). Scope parent tasks to completable outcomes.
    
    **The completability test:** "I finished [parent task]" should describe a real outcome.
    - âś“ "Finished installing garage motion sensors"
    - âś“ "Finished fixing query performance"
    - âś— "Finished home automation" (open-ended domain, never done)
    - âś— "Finished backend work" (if frontend still pending for feature to ship)
    
    **Scope by problem, not technical layer.** A full-stack feature (frontend + backend + tests) is usually one parent if it ships together.
    
    **Split into multiple parents when:**
    - Parts deliver independent value (can ship separately)
    - You're solving distinct problems that happen to be related
    
    **Adding context:** Use `-d` for details, `-l` for reference docs:
    ```bash
    hzl task add "Install garage sensors" -P openclaw \
      -d "Per linked spec. Mount sensors at 7ft height." \
      -l docs/sensor-spec.md,https://example.com/wiring-guide
    ```
    
    **Don't duplicate specs into descriptions**—this creates drift. Reference docs instead.
    
    **If no docs exist**, include enough detail for another agent to complete the task:
    ```bash
    hzl task add "Configure motion alerts" -P openclaw -d "$(cat <<'EOF'
    Trigger alert when motion detected between 10pm-6am.
    Use Home Assistant automation. Notify via Pushover.
    EOF
    )"
    ```
    Description supports markdown (16KB max).
    
    ## ⚠️ DESTRUCTIVE COMMANDS - READ CAREFULLY
    
    The following commands **PERMANENTLY DELETE HZL DATA** and cannot be undone:
    
    | Command | Effect |
    |---------|--------|
    | `hzl init --force` | **DELETES ALL DATA.** Prompts for confirmation. |
    | `hzl init --force --yes` | **DELETES ALL DATA WITHOUT CONFIRMATION.** Extremely dangerous. |
    | `hzl task prune ... --yes` | **PERMANENTLY DELETES** old done/archived tasks and their event history. |
    
    **AI agents: NEVER run these commands unless the user EXPLICITLY asks you to delete data.**
    
    - `hzl init --force` deletes the entire event database: all projects, tasks, checkpoints, and history
    - `hzl task prune` deletes only tasks in terminal states (done/archived) older than the specified age
    - There is NO undo. There is NO recovery without a backup.
    
    ## Core Workflows
    
    **Setup:**
    ```bash
    hzl project list                    # Always check first
    hzl project create openclaw         # Only if needed
    ```
    
    **Adding work:**
    ```bash
    hzl task add "Feature X" -P openclaw -s ready         # Ready to claim
    hzl task add "Subtask A" --parent <id>                # Subtask
    hzl task add "Subtask B" --parent <id> --depends-on <subtask-a-id>  # With dependency
    ```
    
    **Working on a task:**
    ```bash
    hzl task next -P openclaw                # Next available task
    hzl task next --parent <id>              # Next subtask of parent
    hzl task next -P openclaw --claim        # Find and claim in one step
    hzl task claim <id>                      # Claim specific task
    hzl task checkpoint <id> "milestone X"   # Notable progress or before pausing
    ```
    
    **Changing status:**
    ```bash
    hzl task set-status <id> ready           # Make claimable (from backlog)
    hzl task set-status <id> backlog         # Move back to planning
    ```
    Statuses: `backlog` → `ready` → `in_progress` → `done` (or `blocked`)
    
    **When blocked:**
    ```bash
    hzl task block <id> --comment "Waiting for API keys from DevOps"
    hzl task unblock <id>                    # When resolved
    ```
    
    **Finishing work:**
    ```bash
    hzl task comment <id> "Implemented X, tested Y"  # Optional: final notes
    hzl task complete <id>
    
    # After completing a subtask, check parent:
    hzl task show <parent-id> --json         # Any subtasks left?
    hzl task complete <parent-id>            # If all done, complete parent
    ```
    
    **Troubleshooting:**
    | Error | Fix |
    |-------|-----|
    | "not claimable (status: backlog)" | `hzl task set-status <id> ready` |
    | "Cannot complete: status is X" | Claim first: `hzl task claim <id>` |
    
    ---
    
    ## Extended Reference
    
    ```bash
    # Setup
    hzl init                                      # Initialize (safe, won't overwrite)
    hzl init --reset-config                       # Reset config to default location
    hzl status                                    # Database mode, paths, sync state
    hzl doctor                                    # Health check for debugging
    
    # Create with options
    hzl task add "<title>" -P openclaw --priority 2 --tags backend,auth
    hzl task add "<title>" -P openclaw --depends-on <other-id>
    hzl task add "<title>" -P openclaw -s in_progress --assignee <name>  # Create and claim
    
    # List and find
    hzl task list -P openclaw --available        # Ready tasks with met dependencies
    hzl task list --parent <id>                  # Subtasks of a parent
    hzl task list --root                         # Top-level tasks only
    
    # Dependencies
    hzl task add-dep <task-id> <depends-on-id>
    hzl validate                                 # Check for circular dependencies
    
    # Web Dashboard
    hzl serve                    # Start on port 3456 (network accessible)
    hzl serve --host 127.0.0.1   # Restrict to localhost only
    hzl serve --background       # Fork to background
    hzl serve --status           # Check if running
    hzl serve --stop             # Stop background server
    
    # Multi-agent recovery
    hzl task claim <id> --assignee <agent-id> --lease 30
    hzl task stuck
    hzl task steal <id> --if-expired --author <agent-id>
    ```
    
    Tip: When a tool needs to parse output, prefer `--json`.
    
    ## Authorship tracking
    
    HZL tracks authorship at two levels
    
    ... (truncated)