← Back to Skills Marketplace
mathlife

Chronos

by mathlife · GitHub ↗ · v1.6.0 · MIT-0
cross-platform ⚠ suspicious
323
Downloads
0
Stars
1
Active Installs
16
Versions
Install in OpenClaw
/install chronos
Description
通用周期任务管理器 - 支持6种周期类型、每月N次配额、自动cron、统一视图,适用于所有定时任务场景
README (SKILL.md)

Chronos - Universal Periodic Task Manager

What this skill controls

  • 周期任务表periodic_tasks + periodic_occurrences(默认使用共享 todo.db
  • 原 todo 表entries(仅兼容 legacy inbox / 未迁移旧任务)
  • 统一入口todo.py

Capabilities

周期类型

  • once:一次性(有明确 --start-date 时走 canonical task/occurrence)
  • daily:每天
  • hourly:每 N 小时(--interval-hours + --time 作为锚点)
  • weekly:每周(指定星期几)
  • monthly_fixed:每月固定日期(如15号)
  • monthly_range:每月区间(如11号→5号,跨月)
  • monthly_n_times:每月限次(如每周三每月最多2次,或 weekday 留空表示“每天都可提醒,但本月完成满额后停止”)
  • monthly_dates:每月多个固定日期(如 1,15,31

智能配额

  • completed 计数,skip 不计
  • monthly_n_timesweekday 为空,则按“每日可提醒”展开,但仍受每月配额约束
  • 配额用满后自动完成当月剩余活动日
  • 每月1号自动重置计数器

自动提醒

  • Cron 任务自动生成(未来事件)
  • 每日自动清理过期 cron
  • 提醒投递必须显式指定目标 chat
  • 若时间已过,会走补发提醒分支
  • hourly 任务会在当天展开为多个 occurrence,按 scheduled_time 各自提醒/补完成

统一视图

  • todo.py list:合并显示周期任务和普通任务
  • todo.py add:智能路由(scheduled recurring / scheduled once → canonical task;无日期的一次性便签 → entries)
  • todo.py complete:完成单个 occurrence 或普通任务
  • todo.py complete-overdue:优先基于 occurrence 补完成;legacy entries 仅保留兼容兜底
  • todo.py show:查看详情
  • todo.py skip:跳过任务且不消耗 monthly_n_times 配额

显式 system handler

  • special_handler 元数据挂在 periodic_tasks 上,不再只能靠 entries.text 正则猜测
  • 当前已支持:meta_review_fallbacksync_subagent_memory
  • sync_subagent_memorymemory/subagent_sync_ledger.json 读取待同步 subagent session;现在应由 OpenClaw 在 subagent 完成路径自动写入 ledger,memory_manager.py record-subagent \x3Csession_id> 仅保留给补录/回填场景,成功后标记 handled
  • overdue completion 会把 handler 结果写回 occurrence:completion_mode / special_handler_result
  • 对同一天同一 hourly 任务的多个 overdue occurrence,如存在 special_handlercomplete-overdue 只执行一次 handler,再把所有相关 occurrence 标记为 fallback_handler_merged,并写入 merged trace(merge_key / merged occurrence index/count)

Configuration

  • Chat ID: Reminder notifications target a specific chat. Configure via:
    • Environment variable: CHRONOS_CHAT_ID
    • Config file: ~/.config/chronos/config.json (or CHRONOS_CONFIG_PATH) with field chat_id
    • If neither is set, Chronos raises a configuration error
  • No implicit routing: Chronos does not fall back to last or any implicit delivery target
  • Workspace/DB overrides:
    • CHRONOS_DB_PATH
    • CHRONOS_WORKSPACE / OPENCLAW_WORKSPACE
    • OPENCLAW_BIN

Usage

# 列出活跃待办(自动确保今天 occurrence 已生成)
python3 skills/chronos/scripts/todo.py list

# 如需连 skipped 一起看,显式打开
python3 skills/chronos/scripts/todo.py list --include-skipped

# 添加周期任务(例如:每月2次,每周三10:00)
python3 skills/chronos/scripts/todo.py add "周三抢券" \
  --cycle-type monthly_n_times \
  --weekday 2 \
  --n-per-month 2 \
  --time 10:00

# 添加“每天都可提醒,但本月完成一次后本月不再提醒”的任务
python3 skills/chronos/scripts/todo.py add "福建农行秒杀京东卡" \
  --cycle-type monthly_n_times \
  --n-per-month 1 \
  --time 09:00

# 添加每4小时任务(08:00 作为锚点;当天展开为 00/04/08/12/16/20)
python3 skills/chronos/scripts/todo.py add "同步 subagent 记忆" \
  --cycle-type hourly \
  --interval-hours 4 \
  --time 08:00 \
  --task-kind system \
  --special-handler sync_subagent_memory

# 添加一次性计划任务(Phase 1 起:有 start-date 就进入 canonical task)
python3 skills/chronos/scripts/todo.py add "周五 10 点抢券" \
  --cycle-type once \
  --start-date 2026-03-27 \
  --time 10:00

# 添加每月多个日期任务
python3 skills/chronos/scripts/todo.py add "月初/中/末检查" \
  --cycle-type monthly_dates \
  --dates-list 1,15,31 \
  --time 09:00

# 添加普通 inbox 便签(仍走 entries)
python3 skills/chronos/scripts/todo.py add "买牛奶" --category 生活

# 添加 system task(显式 handler)
python3 skills/chronos/scripts/todo.py add "Meta-Review fallback" \
  --cycle-type daily \
  --time 02:00 \
  --task-kind system \
  --special-handler meta_review_fallback

# 完成任务
python3 skills/chronos/scripts/todo.py complete FIN-123  # 周期任务 occurrence
python3 skills/chronos/scripts/todo.py complete 45      # legacy / inbox 任务 ID

# 统一补完成今天已经过时的计划任务
python3 skills/chronos/scripts/todo.py complete-overdue
python3 skills/chronos/scripts/todo.py complete-overdue --dry-run

# 跳过任务(不影响配额)
python3 skills/chronos/scripts/todo.py skip FIN-123     # 周期任务
python3 skills/chronos/scripts/todo.py skip 45         # 普通任务

# 自然语言支持
python3 skills/chronos/scripts/todo.py "跳过 FIN-123"
python3 skills/chronos/scripts/todo.py "查询待办"
python3 skills/chronos/scripts/todo.py "添加任务 每4小时 08:00 同步subagent记忆"

# 查看详情
python3 skills/chronos/scripts/todo.py show FIN-123

Verification

python3 -m unittest discover -s skills/chronos/tests -v
python3 skills/chronos/scripts/schema_preflight.py
python3 skills/chronos/scripts/test_config.py
Usage Guidance
This package appears to implement the described recurring-task manager, but there are a few red flags to consider before installing or running it: - Metadata vs runtime mismatch: the skill metadata lists no required environment variables, but the code and SKILL.md require CHRONOS_CHAT_ID (mandatory) and optionally accept CHRONOS_DB_PATH, CHRONOS_WORKSPACE / OPENCLAW_WORKSPACE, OPENCLAW_BIN, CHRONOS_PYTHON_BIN, and CHRONOS_PREDICTION_LOGGER. Ask the author to declare these explicitly in the skill metadata and explain which are required vs optional. - Sensitive/side-effecting actions: Chronos will read and alter your local todo DB (todo.db), add schema columns, delete/normalize rows, and can create/remove cron reminders (via OpenClaw). Back up your DB before running migration/cleanup scripts and review any schema changes in core/db.py (ensure_schema). - Arbitrary local script execution: core/learning.py will invoke an optional prediction-logger script if CHRONOS_PREDICTION_LOGGER is set or a default script exists in the workspace. If that script exists and is untrusted, it could run arbitrary code. Ensure scripts in your workspace (and the configured prediction_logger path) are trusted before enabling them. - OpenClaw dependency: The skill constructs OpenClaw cron commands using OPENCLAW_BIN. If you configure OPENCLAW_BIN to point to a different binary or if your environment has an unexpected openclaw binary, commands may run with that binary. Use the default only if you trust the system-level openclaw command. - Testing advice: run the unit tests and schema_preflight in an isolated environment (copy of your DB) first: python3 -m unittest discover -s skills/chronos/tests -v and python3 skills/chronos/scripts/schema_preflight.py. Run migration/cleanup scripts in dry-run modes where supported. Inspect any prediction_logger or other scripts the skill would invoke. If you need to proceed: provide CHRONOS_CHAT_ID explicitly, set CHRONOS_DB_PATH to a safe copy of your DB for initial testing, and avoid setting CHRONOS_PREDICTION_LOGGER or setting OPENCLAW_BIN to an untrusted binary until you have audited those components.
Capability Analysis
Type: OpenClaw Skill Name: chronos Version: 1.6.0 The Chronos skill bundle is a sophisticated and well-documented periodic task manager designed for the OpenClaw platform. It manages task definitions and occurrences in a SQLite database (`todo.db`) and integrates with the OpenClaw cron system to provide automated reminders and system maintenance tasks. Key features include natural language command parsing in `scripts/todo.py`, automated schema management in `core/db.py`, and specialized handlers for subagent memory synchronization and meta-reviews. The codebase demonstrates high quality with extensive unit tests, clear architectural separation, and safe use of `subprocess` for executing local scripts and platform binaries. No indicators of malicious intent, data exfiltration, or unauthorized persistence were found.
Capability Assessment
Purpose & Capability
Name/description (periodic task manager) align with the provided code: scheduling, monthly quotas, occurrences, migration helpers, and a todo CLI all appear implemented. The files and functions (scheduler, models, db, todo CLI scripts) are consistent with the described purpose.
Instruction Scope
SKILL.md and the code instruct reading config (~/.config/chronos/config.json or CHRONOS_CONFIG_PATH), operating on a local todo DB, generating cron reminders, and reading a subagent ledger (memory/subagent_sync_ledger.json). Those are in-scope for a scheduler, but the runtime also invokes an optional external prediction logger and builds OpenClaw cron commands (which may be executed elsewhere). The instructions do not appear to attempt unrelated system access, but they do read and modify local DB and local files and expect an external 'openclaw' binary.
Install Mechanism
No install spec is present (instruction-only), which is low risk. The skill bundle nevertheless includes many code files that will run on the agent when invoked; there is no remote download or obscure installer in the manifest. The code alters local DB schema at runtime (ensure_schema), so installation is minimal but runtime will write/modify local state.
Credentials
Registry metadata declared no required environment variables or primary credential, but SKILL.md and code require/expect CHRONOS_CHAT_ID (mandatory), and optionally CHRONOS_CONFIG_PATH, CHRONOS_DB_PATH, CHRONOS_WORKSPACE/OPENCLAW_WORKSPACE, OPENCLAW_BIN, CHRONOS_PYTHON_BIN, CHRONOS_PREDICTION_LOGGER, and CHRONOS_PREDICTION_LOGGER-related scripts. This mismatch is an incoherence: a required configuration (CHRONOS_CHAT_ID) and several potentially sensitive paths/variables were not declared in metadata. Some optional env vars (prediction logger path, OPENCLAW_BIN) can cause execution of local scripts or external binaries — they must be trusted.
Persistence & Privilege
The skill does not request always: true and does not declare elevated platform privileges. It will modify local application state: alter/ensure columns in your todo DB, create/remove cron reminders via OpenClaw command construction, and write bookkeeping metadata. Those effects are proportionate to a scheduler but are persistent and affect user data — back up the DB before running.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install chronos
  3. After installation, invoke the skill by name or use /chronos
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.0.1
Minimalize package: remove tests/outputs/local db; keep runtime scripts
v1.6.0
Canonical scheduling cleanup, hourly/system task support, legacy archive handling, safer overdue completion, and improved reminder semantics.
v1.5.1
修复:schedule_reminder_cron 添加 missing --to 参数
v1.5.0
新增 skip 功能:跳过任务不扣减配额,支持自然语言
v1.4.1
脱敏:移除所有敏感 chat ID,使用占位符
v1.4.0
Breaking: 移除硬编码 chat ID,用户必须配置 CHRONOS_CHAT_ID
v1.3.6
修复提醒发送:使用明确的 chat ID 确保消息到达
v1.3.5
修复提醒发送:使用 isolated session + announce 确保消息到达 Telegram
v1.3.4
修复 systemEvent delivery:移除不兼容参数,确保提醒正常发送
v1.3.3
修复 cron 参数:使用正确的 --announce 和 --channel 参数
v1.3.2
修复提醒消息传递:添加 delivery 配置确保消息发送到 Telegram
v1.3.1
修复提醒时间:现在会提前5分钟触发,而非活动开始时间
v1.3.0
Fixed past-due task reminders: now send immediate notification when manager runs after event time. Improved natural language parsing for end dates.
v1.2.0
Added end_date support with natural language parsing. Integrate double-loop learning in all critical methods. Fixed complete_activity_cycle to only complete up to today.
v1.1.0
Major refactor: Universal periodic task manager. Renamed financial_* → periodic_* throughout. New todo.py entry. Fixed cron past-time and monthly_n_times auto-complete bugs.
v1.0.0
Initial release
Metadata
Slug chronos
Version 1.6.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 16
Frequently Asked Questions

What is Chronos?

通用周期任务管理器 - 支持6种周期类型、每月N次配额、自动cron、统一视图,适用于所有定时任务场景. It is an AI Agent Skill for Claude Code / OpenClaw, with 323 downloads so far.

How do I install Chronos?

Run "/install chronos" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Chronos free?

Yes, Chronos is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Chronos support?

Chronos is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Chronos?

It is built and maintained by mathlife (@mathlife); the current version is v1.6.0.

💬 Comments