task-watchdog
任务锁与超时监控系统。外部文件承载任务状态,不污染 agent 上下文,纯靠 heartbeat + GRACE 判断,不发即时告警。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/axelhu/task-watchdog-axelWhat This Skill Does
The task-watchdog skill provides a robust, file-based persistence layer for managing long-running tasks in OpenClaw. Unlike volatile in-memory state tracking, this skill creates dedicated lock files within ~/.openclaw/agents/{agent_id}/locks/ to maintain the lifecycle of your agentic workflows. It decouples task status from the agent's active memory, allowing for seamless recovery after crashes or restarts. The system utilizes two distinct timing markers: last_heartbeat for system presence and last_progress for actual task progression, ensuring that stalled tasks are identified correctly without generating false-positive alerts. It is designed for reliability, enabling agents to self-heal by identifying dead sessions and reassigning or cleaning up abandoned tasks automatically.
Installation
To integrate task-watchdog into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/axelhu/task-watchdog-axel
Ensure that your agent has write permissions for the ~/.openclaw/ directory to allow for lock file management and archival processes.
Use Cases
- Long-running Batch Processing: Ideal for multi-step tasks like web scraping or large dataset analysis that may take hours or days to complete.
- Agent Resilience: Automatically resumes interrupted tasks after an agent process crash by detecting abandoned session IDs.
- Workload Auditing: Allows administrators or developers to generate reports on pending, stalled, or completed tasks using the built-in
lock-reportandlock-archiveutilities. - Automated Housekeeping: Regularly clears out legacy task data to maintain a clean environment using the customizable cleanup parameters.
Example Prompts
- "OpenClaw, initialize the data-collection task and create a lock file so I can track the progress later."
- "Update the task status for the current session to show that the second phase of the analysis is now complete."
- "Run the self-check diagnostic to see if there are any stalled tasks from my previous sessions that I need to resume."
Tips & Limitations
- Not for Instant Alerts: This skill is focused on state management, not real-time push notifications. Use it to build a reliable history of what your agents are doing.
- Use Progress Wisely: Always update the
last_progressfield at meaningful checkpoints. Relying solely on thelast_heartbeatmight mask situations where an agent is running but not doing any work. - Scheduling: Set up a cron job or an agent loop to trigger
lock-self-check.shperiodically to ensure that dead sessions are cleaned up or handed over without manual intervention. - Storage Limits: Periodically run
lock-archive.sh --cleanup-days 30to prevent thelocks/directory from growing too large over time.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-axelhu-task-watchdog-axel": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read
Related Skills
Openclaw Sleep
Skill by axelhu
superpowers-overview
Use when starting any development work or when unsure which superpowers development skill to use - provides entry point and navigation to the full superpowers skill suite for OpenClaw agents
superpowers-subagent-dev
Use when executing implementation plans with independent tasks - coordinates task execution by dispatching subagents per task with verification checkpoints, adapted for OpenClaw's isolated session model
contacts
通讯录查询与维护技能。用于查找联系人信息(open_id、chat_id、account_id 等)、记录新联系人、或查询历史沟通偏好。触发时机:(1) 需要 @某人或向某渠道发消息时 (2) 认识新联系人后需要录入通讯录时 (3) 查询某人的联系方式或交流偏好时 (4) 询问"谁知道xxx的飞书ID"或"怎么联系xxx"时。
superpowers-executing-plans
Use when executing a written implementation plan in the current session with sequential task execution and review checkpoints - for when subagent-driven mode is not available