Skills pulseflow
Maintain a Markdown task dashboard backed by agent-written append-only AI work logs, then sync a daily AI DONE TODAY section plus a weekly usage panel via heartbeat or on-demand refresh. Use when building or operating a reusable task system where: (1) human tasks live in a single NOW.md dashboard, (2) agents automatically append work records after each completed work unit, (3) heartbeat scans logs and refreshes the AI-derived sections, (4) a new workspace or vault needs initialization with templates, paths, and sync state.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ayao99315/pulseflow" ~/.claude/skills/openclaw-skills-pulseflow && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/ayao99315/pulseflow" ~/.openclaw/skills/openclaw-skills-pulseflow && rm -rf "$T"
skills/ayao99315/pulseflow/SKILL.mdPulseFlow
Build and operate a simple task system with one human-facing dashboard file and one append-only AI log flow.
Core model
Use one current dashboard file as the source of truth for active work.
- Weekly usage lives in one top summary panel only:
AI USAGE THIS WEEK - Human work lives in four sections only:
,FOCUS
,TODAY
,UP NEXTDONE - AI work lives in one summary section only:
AI DONE TODAY - Agents do not write the dashboard directly
- Agents append one log line after each completed work unit
- Heartbeat or an explicit refresh reads usage data plus logs and rewrites the AI-derived sections
File roles
Use these files and keep their roles strict:
— current dashboardtodo/NOW.md
— monthly archivetodo/history/YYYY-MM.md
— installation-specific paths and agent listtodo/system/config.json
— last processed offsets/checkpointstodo/system/sync-state.json
— append-only per-agent daily work logsreports/<agent>-ai-log-YYYY-MM-DD.jsonl
Initialization workflow
When setting up a new installation:
- Create
,todo/
, andtodo/history/todo/system/ - Create
from the dashboard template intodo/NOW.mdreferences/now-template.md - Create
fromtodo/history/<current-month>.md
if missingreferences/history-template.md - Create
fromtodo/system/config.jsonreferences/config-template.json - Create
fromtodo/system/sync-state.jsonreferences/sync-state-template.json - Fill installation-specific values:
- dashboard path
- history directory
- reports directory per agent
- optional
per agentagentsFilePath - enabled agent list
- timezone
- If an older dashboard exists, migrate the human task sections into the new
todo/NOW.md - Do not import old AI activity retroactively unless explicitly requested
- Create today's empty AI log files for enabled agents
- Install or refresh managed AI logging rules in configured
filesAGENTS.md - If the installation explicitly wants scheduled summaries, fill
in config and runnotifications.summaryCronsscripts/install_summary_crons.js
Agent write contract
Each agent must append one JSON object per completed work unit to its own daily JSONL log.
Required fields:
— ISO timestamp with timezonets
— agent nameagent
— one-line work summarytask
— optional integer token count for that work unit; may betokens
or omitted0
Example line:
{"ts":"2026-04-05T14:10:00+08:00","agent":"main","task":"完成量化交易系统回测模块初版","tokens":12000}
Rules:
- Append only; never edit prior lines in-place
- Write after each completed work unit, not only at day end
- One line should be readable without extra context
- Do not depend on per-task token totals for daily usage accounting
- Do not write to
directly from agentstodo/NOW.md
Heartbeat sync workflow
On heartbeat or explicit refresh:
- Read
todo/system/config.json - Read
todo/system/sync-state.json - For each enabled agent, locate today's JSONL log
- Parse all valid lines for today
- Query OpenClaw usage summary for the current week and rebuild
AI USAGE THIS WEEK - Rebuild the
section from the log contents for todayAI DONE TODAY - Compute today's total tokens from OpenClaw usage data, not by summing task lines
- Rewrite only the AI-derived sections in
todo/NOW.md - Update
todo/system/sync-state.json
Important:
- Treat the dashboard AI section as a derived view, not a write-ahead log
- Rebuild from source logs for the current day instead of incrementally appending into Markdown
- Skip malformed lines; never let one bad line break the whole sync
Dashboard format
Keep the dashboard simple and stable.
Top usage section:
## AI USAGE THIS WEEK- table columns:
Date / Total Tokens / Input / Output / Cache / Hit Rate
Human task sections:
## FOCUS## TODAY## UP NEXT## DONE
AI section:
## AI DONE TODAY- then bullet items formatted as:
<agent>: <task>
Archive workflow
At end of day or next-day rollover:
- Append completed human tasks and the AI section snapshot into
todo/history/YYYY-MM.md - Update the month file's
block with finalized per-day usage rowsAI Usage Daily Summary - Group archived day entries by clipped week sections inside the month file, and keep one
table per visible week blockAI Usage Weekly Summary - Reset
inDONEtodo/NOW.md - Reset
for the new day on first syncAI DONE TODAY - Rebuild
for the new current weekAI USAGE THIS WEEK - Move unfinished
and unfinishedFOCUS
into the new day'sTODAYTODAY - Keep unfinished
unchangedUP NEXT - Reset
to an empty placeholderFOCUS
Scripts
— appends one JSONL AI work record to today's per-agent logscripts/append_ai_log.js
— installs or updates managed AI log rule blocks in configuredscripts/install_agent_log_rules.js
filesAGENTS.md
— optionally installs or updates template-driven notification cron jobs fromscripts/install_summary_crons.js
in config; these jobs supplement rollover and do not replace itnotifications.summaryCrons
— creates missing dashboard, history, config, state files, today's empty AI logs, and installs managed agent log rules when configured; it does not install cron jobs by defaultscripts/init_system.js
— repairs missing runtime files without overwriting healthy onesscripts/repair_system.js
— daily rollover script; archives yesterday's human done + AI snapshot into a week-grouped month file, updates that week'sscripts/rollover_now.js
, clearsAI Usage Weekly Summary
, resetsDONE
, carries unfinished tasks forward, and updatesAI DONE TODAYrollover-state.json
— deterministic sync script for heartbeat or manual refresh; reads config, queries weekly usage, scans today's agent JSONL logs, rebuildsscripts/sync_ai_done.js
plusAI USAGE THIS WEEK
, and updates sync stateAI DONE TODAY
— runs a local end-to-end validation covering init, sync, repair, rollover, and rollover idempotencyscripts/validate_system.js
Run rollover with:
node <skill-dir>/scripts/rollover_now.js
Recommended scheduler:
- daily cron at
Asia/Shanghai00:15
Run with:
node <skill-dir>/scripts/sync_ai_done.js
Optional config override:
AI_WORKLOG_CONFIG=/path/to/config.json node <skill-dir>/scripts/sync_ai_done.js
Validation:
node <skill-dir>/scripts/validate_system.js
Install or refresh agent rules:
AI_WORKLOG_CONFIG=/absolute/path/to/todo/system/config.json node <skill-dir>/scripts/install_agent_log_rules.js
Optionally install or update summary cron jobs after filling
notifications.summaryCrons in config:
AI_WORKLOG_CONFIG=/absolute/path/to/todo/system/config.json node <skill-dir>/scripts/install_summary_crons.js
Review the planned cron changes first with:
AI_WORKLOG_CONFIG=/absolute/path/to/todo/system/config.json node <skill-dir>/scripts/install_summary_crons.js --dry-run
Recommended production invocation:
AI_WORKLOG_CONFIG=/absolute/path/to/todo/system/config.json node <skill-dir>/scripts/sync_ai_done.js
Templates and references
Read these files as needed:
— base dashboard templatereferences/now-template.md
— monthly archive templatereferences/history-template.md
— install config shape, including optional summary-cron settingsreferences/config-template.json
— sync checkpoint shapereferences/sync-state-template.json
— log schema and examplesreferences/agent-log-format.md
— heartbeat operating checklistreferences/heartbeat-checklist.md
— optional 15:30 summary structurereferences/midday-summary-template.md
— optional 00:05 previous-day report structure, intended to run before rolloverreferences/daily-close-template.md
— env overrides, installation assumptions, and optional cron-install notesdocs/portability.md
Output standard
When asked to initialize, produce or update the installation files only. When asked to sync, update only the AI-derived sections and sync state unless the user asks for more. When asked to design or migrate, keep the system minimal and reusable; avoid installation-specific assumptions outside config.json.
Runtime note
The JavaScript runtime is the only supported implementation.