scheduled-task-autopsy
БесплатноЗапускает вложенные скриптыНе проверен定时任务「显示启用却没产出」法医诊断。用三路独立证据判定卡在哪一环:①应用日志按 小时统计模型请求事件(区分「调度器没触发」和「触发了但产出丢失」);②输出文件 mtime(last-run.md 多久没更新);③仓库提交时间戳(任务是否真的交付过)。附带 通知目标失效探测与三处常见误判清单。Forensic…
от z-zihan73 установки в других каталогахОб этом скилле
scheduled-task-autopsy — 定时任务法医诊断
语言规则
检测用户使用的语言,全程使用同一语言输出。 中文用户 → 读下方中文部分;English users → read the English section.
中文版
核心用途
定时任务「看起来配置正常(enabled)却没有任何产出」时,用独立于任务自身汇报的三路物证判断卡点,避免两类常见误判:把「触发了但产出丢失」错怪成调度器,或反过来。
真实案例(2026-11-30):四个每日任务通知目标会话失效、日报投递丢失,任务列表仍显示 enabled,一度被当成「调度器停摆」;日志小时计数 + 仓库提交时间戳证明任务每天正常运行——坏的是投递,不是调度。
三处常见误判(先读这个)
- 「任务列表 enabled」≠「今天触发了」:enabled 只说明配置存在。要看触发的物证。
- 「任务没跑」≠「调度器坏了」:触发的铁证是应用日志里调度小时的模型/工具事件爆发(空闲基线约 240 行/小时,纯心跳;真实运行会是数百到上千事件)。日志按 UTC 日期分文件名、内容含 UTC+8 当地 0 点起的事件,且 JSON 转义存储。
- 「任务跑过」≠「产出送达」:提交时间戳、last-run.md mtime 只证明执行侧交付;日报/通知走的是另一个投递通道(绑定会话 ID 失效会报 delivery_target_unavailable),投递丢失时执行侧一切正常。
执行步骤
- 仓库有没有提交:
python3 scripts/schedule_autopsy.py commits --repo <仓库路径> --since-days 3有提交 → 任务在跑,跳第 3 步查投递;没有 → 进第 2 步。 - 日志里有没有触发:
python3 scripts/schedule_autopsy.py hourly --logs-dir <日志目录> --date <UTC日期>调度小时无事件爆发 → 真没触发(查调度器/任务暂停状态);有爆发但仓库无产出 → 触发了但执行失败(查任务自身错误与 last-run.md)。 - 输出文件多旧:
python3 scripts/schedule_autopsy.py mtime --path <任务目录>/last-run.mdmtime 新鲜但用户没收到 → 投递通道问题。 - 投递通道探测:对通知绑定的目标会话,用配置接口同值回写探测(无效目标会报 delivery_target_unavailable);修复=改绑当前有效会话/目标。
输出
每个子命令给出数据行 + VERDICT 结论行;三路证据合起来回答「调度、执行、投递」哪一环断了。
异常处理
- 日志文件名没有匹配日期:先确认日志按 UTC 日期命名、本地日期要换算(北京时间 −8h)。
- 脚本只读(读日志 / git log / 文件 mtime),不改任何状态、不发通知。
验收标准
- 对一份真实的按日分卷日志,
hourly能给出逐小时计数并区分心跳基线与任务爆发。 - 对一个三天没提交的仓库,
commits给出「任务没跑」结论;对有提交的仓库给出「投递侧」指向。
English
Purpose
Forensic diagnosis for scheduled tasks that look enabled but produce nothing: three independent evidence paths decide whether the scheduler, the executor, or the delivery channel is broken, instead of trusting the task's own reporting.
Steps
commits— recent repo commits prove the task ran; none → step 2.hourly— per-hour counts of model/tool events in the app logs (idle baseline ≈240 lines/h; logs named by UTC date, JSON-escaped content covering the local day). A burst in the scheduled hour proves triggering.mtime— staleness of the task's output file; fresh mtime + missing user report = delivery-channel issue.- Probe the notification binding (invalid target reports delivery_target_unavailable); fix by rebinding to a live session.
Read-only: reads logs, git log, and file mtimes; never mutates state or sends notifications.
Установить scheduled-task-autopsy в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(python3:*)Bash(git log:*)Bash(ls:*)ReadGlobGrepFAQ
Что делает скилл scheduled-task-autopsy?
定时任务「显示启用却没产出」法医诊断。用三路独立证据判定卡在哪一环:①应用日志按 小时统计模型请求事件(区分「调度器没触发」和「触发了但产出丢失」);②输出文件 mtime(last-run.md 多久没更新);③仓库提交时间戳(任务是否真的交付过)。附带 通知目标失效探测与三处常见误判清单。Forensic autopsy for enabled-but-silent scheduled tasks: per-hour log event counts, output-file staleness, and repo commit evidence, plus the three usual misreadings. 触发词:定时任务没跑, 定时任务没产出, 调度器坏了, 日报没收到, cron 没触发, task didn't run, scheduled task silent, 诊断定时任务, 任务卡死, 静默失败。
Как установить скилл scheduled-task-autopsy?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scheduled-task-autopsy запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic