src/skills/runtime/scheduler/SKILL.md
This skill should be used when the model needs to create, inspect, enable, disable, or remove recurring schedules in msgcode, or when diagnosing schedule state in the current workspace.
npx skillsauth add 42atom/msgcode schedulerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
本 skill 是定时任务能力说明书,不是系统内建编排器。
add/list/remove/enable/disable 的正确命令模板。cron_add、schedule_add 之类不存在的工具。本 skill 是参考实现,不是唯一方式。周期任务可用 cron;一次性任务(如“明早 10 点”)请根据环境自行选择实现(at、launchd、定时脚本等)。
在以下场景读取并使用本 skill:
优先入口:~/.config/msgcode/skills/scheduler/main.sh
先读 ~/.config/msgcode/skills/index.json,再读本 skill,再用 bash 调入口脚本。禁止跳过本 skill 直接猜 msgcode schedule 参数。
不要直接把原始 msgcode schedule ... 当成首选入口。先走 wrapper,再由 wrapper 调正式 CLI。
cron_add、schedule_add 之类不存在的 LLM tool。bash ~/.config/msgcode/skills/scheduler/main.sh ...。--workspace 必须使用 system prompt 中 [当前工作区] 提示提供的绝对路径,禁止猜测或虚构。list 或查看 schedule 文件,再等待 scheduler 在后台执行。<workspace>/.msgcode/schedules/*.json、~/.config/msgcode/cron/jobs.json、~/.config/msgcode/cron/runs.jsonl。bash ~/.config/msgcode/skills/scheduler/main.sh add <schedule-id> --workspace <workspace-abs-path> --cron '<expr>' --tz <iana> --message '<text>'
关键提醒:
<schedule-id> 是位置参数,不是 --scheduleId<schedule-id>、--workspace、--cron、--tz、--message--workspace 必须使用 system hint 提供的绝对路径--cron / --tz / --messagebash ~/.config/msgcode/skills/scheduler/main.sh list --workspace <workspace-abs-path>
bash ~/.config/msgcode/skills/scheduler/main.sh remove <schedule-id> --workspace <workspace-abs-path>
bash ~/.config/msgcode/skills/scheduler/main.sh enable <schedule-id> --workspace <workspace-abs-path>
bash ~/.config/msgcode/skills/scheduler/main.sh disable <schedule-id> --workspace <workspace-abs-path>
# 错误:不要发明 --scheduleId
bash ~/.config/msgcode/skills/scheduler/main.sh add --scheduleId live-cron --workspace <workspace-abs-path> --cron '*/1 * * * *' --tz <iana> --message 'live cron'
# 错误:漏 --tz,会触发 add 合同失败
bash ~/.config/msgcode/skills/scheduler/main.sh add live-cron --workspace <workspace-abs-path> --cron '*/1 * * * *' --message 'live cron'
# 错误:漏 --cron 或漏 --message,都会触发 add 合同失败
bash ~/.config/msgcode/skills/scheduler/main.sh add live-cron --workspace <workspace-abs-path> --tz <iana> --message 'live cron'
bash ~/.config/msgcode/skills/scheduler/main.sh add live-cron --workspace <workspace-abs-path> --cron '*/1 * * * *' --tz <iana>
# 正确:使用完整 add 合同
bash ~/.config/msgcode/skills/scheduler/main.sh add live-cron --workspace <workspace-abs-path> --cron '*/1 * * * *' --tz Asia/Singapore --message 'live cron'
推荐验证顺序:
~/.config/msgcode/skills/index.jsonadd / list / remove / enable / disable<workspace>/.msgcode/schedules/<scheduleId>.json~/.config/msgcode/cron/jobs.json~/.config/msgcode/cron/runs.jsonlscheduleId 写成 --scheduleId--workspace--cron--tz--messagemsgcode schedule 参数schedule 文件:
<workspace>/.msgcode/schedules/<scheduleId>.json最小文件结构:
{
"version": 1,
"enabled": true,
"tz": "Asia/Shanghai",
"cron": "0 9 * * *",
"message": "每天早上 9 点提醒我看日报",
"delivery": {
"mode": "reply-to-same-chat",
"maxChars": 2000
}
}
参数速查:
add <scheduleId>:创建 scheduleremove <scheduleId>:删除 scheduleenable <scheduleId>:启用 scheduledisable <scheduleId>:禁用 schedule--workspace <abs-path>:当前工作区绝对路径--cron '<expr>':cron 表达式,例如 */5 * * * *--tz <iana>:IANA 时区,例如 Asia/Singapore--message '<text>':到点发送的内容--json:返回结构化结果,便于后续处理wrapper 已经兼容部分常见模型漂移,但不要依赖这些兼容层替代正确命令:
--scheduleId / --schedule-id / --iddelete / stop / rm / del--tz 时的透明补时区data-ai
This skill should be used when the model needs detailed image understanding beyond the system preview summary, and needs a provider-neutral capability index.
development
# todo skill 触发:任务记录、查看待办、标记完成。 优先入口:`~/.config/msgcode/skills/todo/main.sh` 默认 workspace:当前目录 `$PWD`(可被 `--workspace` 覆盖)。 常用: - `bash ~/.config/msgcode/skills/todo/main.sh add "补充测试报告" --json` - `bash ~/.config/msgcode/skills/todo/main.sh list --json` - `bash ~/.config/msgcode/skills/todo/main.sh done <taskId> --json`
development
# thread skill 触发:查看/切换会话线程,读取线程消息。 优先入口:`msgcode thread ...` 常用: - `msgcode thread list --json` - `msgcode thread active --json` - `msgcode thread messages <thread-id> --limit 20 --json` - `msgcode thread switch <thread-id> --json`
tools
This skill should be used when the task is complex enough to benefit from task-local planning files, but should not introduce a new plan mode, supervisor, or memory layer.