home / skills / openclaw / skills / agent-task-tracker

agent-task-tracker skill

/skills/rikouu/agent-task-tracker

This skill proactively tracks and persists task state across sessions, updating progress, results, and failures for seamless resumption and auditing.

npx playbooks add skill openclaw/skills --skill agent-task-tracker

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.9 KB
---
name: task-tracker
description: Proactive task state management. Use on EVERY task start, progress update, completion, or failure. Tracks what was requested, what's running (background processes, SSH sessions), what's done, and what's next. Survives session resets. Triggers automatically — not user-invoked.
---

# Task Tracker

Maintain a live task state file so context survives session resets/compaction.

## State File

`memory/tasks.md` — single source of truth.

## When to Write

1. **Task received** → add entry with status `🔄 进行中`
2. **Background process started** → record session ID, PID, server, command
3. **Progress update** → update status/notes
4. **Task completed** → mark `✅ 完成`, record results/links
5. **Task failed** → mark `❌ 失败`, record error
6. **Session start** → read `memory/tasks.md` to resume awareness

## Format

```markdown
# Active Tasks

## [task-id] Short description
- **Status**: 🔄 进行中 | ✅ 完成 | ❌ 失败 | ⏸️ 暂停
- **Requested**: YYYY-MM-DD HH:MM
- **Updated**: YYYY-MM-DD HH:MM
- **Background**: session-id (PID) on server-name — `command`
- **Notes**: progress details, partial results
- **Result**: final output, links, summary

# Completed (recent)
<!-- Move completed tasks here, keep last 10, prune older -->
```

## Rules

- Update the file BEFORE reporting to user (write-first)
- Include enough detail to resume without prior conversation context
- For background processes: always record session ID + what server + what command
- For multi-step tasks: update after each step
- Keep it concise — this isn't a log, it's a state snapshot
- **Size limit: keep under 50 lines / 2KB** — this file is read every session start
- Completed tasks: collapse to one-line summary, reference daily notes for details
- Prune completed tasks older than 3 days
- If Active is empty, write (无) to make it obvious

Overview

This skill proactively manages task state so work survives session resets and compaction. It maintains a single source of truth in memory/tasks.md and automatically updates on every task start, progress update, completion, or failure. The skill runs without explicit user invocation, keeping current background sessions, PIDs, and next steps visible.

How this skill works

On task lifecycle events the skill writes a concise state snapshot to memory/tasks.md before reporting to the user. It records requested time, last update, status, background session identifiers (session ID, PID, server, command), notes, and final results. On session start it reads the file to restore awareness and continue tasks where they left off.

When to use it

  • On every new task received — add an active entry immediately
  • When starting background processes, SSH sessions, or detached commands
  • On any progress update or intermediate step of a multi-step task
  • When a task completes or fails — record result or error and collapse to summary
  • Automatically on session start to regain context after resets or compaction

Best practices

  • Write the state file before reporting to the user (write-first rule)
  • Include session ID, server name, PID and exact command for any background work
  • Keep entries concise so memory/tasks.md stays under 50 lines and ~2KB
  • Update after each logical step for multi-step tasks so resumption is straightforward
  • Prune completed tasks older than 3 days and keep only recent summaries
  • If no active tasks remain, write a visible placeholder (e.g., “(none)”) to indicate emptiness

Example use cases

  • Kick off a long-running backup: record background SSH session, PID, server, and expected completion
  • Manage a multi-step archive task: update status after each step and store result links when done
  • Resume a crashed session: read memory/tasks.md to find running PIDs and restart monitoring
  • Report failure details: mark task failed and include error text and remediation steps
  • Maintain daily task dashboard: completed tasks are collapsed to one-line summaries for quick review

FAQ

Does the skill require user commands to run?

No. It triggers automatically on task lifecycle events and on session start to maintain continuity.

How large should the state file be?

Keep memory/tasks.md under roughly 50 lines or 2KB so it can be read quickly at session start.