task-watcher for Openclaw

Monitor long-running asynchronous tasks and receive automated status updates via Discord or Telegram.

lanyasheng
v1.2.1
Mar 7, 2026
0
889
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install task-watcher

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install task-watcher using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is task-watcher?

The task-watcher skill is a specialized asynchronous monitoring engine designed for the Openclaw Skills ecosystem. It allows developers and AI agents to register long-running tasks—such as social media content reviews, CI/CD pipeline runs, or complex deployments—and automatically track their progress without manual intervention.

By leveraging a pluggable architecture of adapters and notifiers, this skill ensures that state changes are captured and communicated effectively. It acts as a reliable bridge between asynchronous system processes and the user's preferred communication channels, making it an essential component for any automated workflow within Openclaw Skills.

task-watcher Use Cases

  • Monitoring social media content review status (e.g., Xiaohongshu) after an agent posts a note.
  • Tracking GitHub PR merge status and build completions for automated dev workflows.
  • Watching cloud deployment rollout statuses to ensure high availability.
  • Managing any long-running async workflow that requires a notification trigger upon state change or completion.

How task-watcher Works

  1. An agent or CLI tool registers a new task into the shared-context tasks.jsonl store.
  2. A cron job executes the watcher script at a defined interval (e.g., every 3 minutes).
  3. The watcher identifies active tasks and selects the appropriate Adapter to check the current system state.
  4. If the state has changed or reached a terminal condition, the Notification Policy evaluates the urgency and frequency requirements.
  5. The Notifier sends an update to the configured channel, such as Discord or Telegram, using the Openclaw Skills messaging infrastructure.

task-watcher Setup

Install the skill using the ClawHub CLI:

clawhub install task-watcher

Register a monitoring task via the provided CLI script:

cd ~/.openclaw/workspace/skills/task-watcher
python3 scripts/register_task.py \
  --task-id tsk_my_001 \
  --system xiaohongshu \
  --object-id note_abc123 \
  --reply-to channel:1234567890 \
  --expires-hours 6

Finally, add the watcher to your crontab to enable periodic polling:

# Edit crontab with crontab -e
*/3 * * * * cd ~/.openclaw/workspace/skills/task-watcher && \
  python3 scripts/watcher.py --once >> ~/.openclaw/logs/watcher.log 2>&1

task-watcher Data Schema & Taxonomy

The task-watcher skill organizes its data within the Openclaw Skills shared context directory to ensure persistence and accessibility:

File Path Purpose
~/.openclaw/shared-context/monitor-tasks/tasks.jsonl Stores active tasks, metadata, and current state using JSONL format with file locking.
~/.openclaw/shared-context/monitor-tasks/audit.log Maintains a comprehensive audit trail of all monitoring activities and changes.
~/.openclaw/shared-context/monitor-tasks/notifications/ Directory where individual notification status files are stored.

Each task record includes critical metadata such as task_id, owner_agent, target_system, target_object_id, and expires_at timestamps.

task-watcher Advanced Features

  • Pluggable Adapters: Easily extend the system by creating custom Python adapters for any API or internal system.
  • Flexible Notifiers: Built-in support for Discord, Telegram, and local session files.
  • Configurable Policies: Fine-tune notification frequency, escalation paths, and retry logic for sensitive tasks.
  • Built-in Protection: Includes 6-hour default timeouts and delivery failure escalation to prevent orphan processes within Openclaw Skills.
  • Standard Library Only: High performance and easy deployment with zero external Python dependencies.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*