跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 cron-schedule-planner

Cron Schedule Planner

将 GitHub 动作“ 排程” 表达式概述到多个寄存器中, 并帮助将 CPU 密集型工作( Docker 编译器、 Testcontainers 、 Kind/ k3s 、 矩阵构建) 分散到争议较少的插槽中。 当用户问到“ 何时运行我的 cron 动作 ? ” 、 “ 我的预定构建碰撞 ? ” 、 “ 测试控制器何时运行 ? ” , 或者想要一份 cron 调度概览/ 分布报告 。 通过 ' gh ' (不需要本地检查)或本地检查进行扫描,将协调世界时转换为本地时区,对工作强度进行分类,并写出Markdown报告,其中附有小时直方图、碰撞和混凝土再分配建议.

4376 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

将 GitHub 动作“ 排程” 表达式概述到多个寄存器中, 并帮助将 CPU 密集型工作( Docker 编译器、 Testcontainers、 Kind/ k3s、 矩阵构建) 分散到争议较少的槽中

何时用

用户会问“我的编程动作是什么时候运行的? ” , “我的预定构建串联吗 ? ” , “ Testcontainers 何时运行 ? ” , 或想要一份编程表概览/ 分布报告 。 通过`gh ' (不需要本地检出)或本地检出扫描,将 UTC 转换为 loc

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Cron Schedule Planner、Instructions、Step 1: Decide the repository scope、Step 2: Run the script、Specific owner, Swiss local time, report in target/、Local checkouts (no GitHub API)。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 scripts/cron-schedule-planner.sh、references/classification-and-timezones.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Builds an overview of GitHub Actions `schedule` cron expressions across multiple repositories and helps spread CPU-intensive jobs (Docker Compose, Testcontainers, Kind/k3s, matrix builds) into less contended slots. Use when the user asks 'when do my cron actions run?', 'do my scheduled builds collide?', 'when should the Testcontainers build run?', or wants a cron schedule overview/distribution report across repos. Scans via `gh` (no local checkouts required) or local checkouts, converts UTC to a local timezone, classifies job intensity, and writes a Markdown report with an hourly histogram, collisions and concrete cron redistribution suggestions.

Cron Schedule PlannerInstructionsStep 1: Decide the repository scopeStep 2: Run the scriptSpecific owner, Swiss local time, report in target/Local checkouts (no GitHub API)A few explicit reposStep 3: Present the resultsStep 4: Apply suggestions only after confirmationOptionsOutputClassification

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
cron-schedule-planner
description
Builds an overview of GitHub Actions `schedule` cron expressions across multiple repositories and helps spread CPU-intensive jobs (Docker Compose, Testcontainers, Kind/k3s, matrix builds) into less contended slots. Use when the user asks 'when do my cron actions run?', 'do my scheduled builds collide?', 'when should the Testcontainers build run?', or wants a cron schedule overview/distribution report across repos. Scans via `gh` (no local checkouts required) or local checkouts, converts UTC to a local timezone, classifies job intensity, and writes a Markdown report with an hourly histogram, collisions and concrete cron redistribution suggestions.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 2
  • scripts/cron-schedule-planner.sh
  • references/classification-and-timezones.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「cron-schedule-planner」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-18804bfcebae2b01-%E7%BA%BF%E7%A8%8B%E8%A1%A8-%E8%A7%84%E5%88%92%E5%91%98.html
请存为 .cursor/skills/cron-schedule-planner/SKILL.md 或 .claude/skills/cron-schedule-planner/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/dboeckli/ai-agent-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/dboeckli/ai-agent-skills' --list

npx skills add 'https://github.com/dboeckli/ai-agent-skills' --skill 'cron-schedule-planner'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: cron-schedule-planner description: "Builds an overview of GitHub Actions `schedule` cron expressions across multiple repositories and helps spread CPU-intensive jobs (Docker Compose, Testcontainers, Kind/k3s, matrix builds) into less contended slots. Use when the user asks 'when do my cron actions run?', 'do my scheduled builds collide?', 'when should the Testcontainers build run?', or wants a cron schedule overview/distribution report across repos. Scans via `gh` (no local checkouts required) or local checkouts, converts UTC to a local timezone, classifies job intensity, and writes a Markdown report with an hourly histogram, collisions and concrete cron redistribution suggestions." --- # Cron Schedule Planner Collects GitHub Actions `on.schedule` cron expressions across repositories, classifies how resource-intensive each workflow is, converts the UTC cron times to a local timezone, and produces a Markdown report with an hourly histogram, collisions and concrete redistribution suggestions. Read-only: the script never edits workflows. Suggestions are applied only after the user confirms. ## Instructions ### Step 1: Decide the repository scope - Default: all repositories of the authenticated `gh` user (no local checkouts needed). - `--owner ` to scan a different owner. - `--repo ` (repeatable) for an explicit list. - `--local ` to scan local checkouts instead of the GitHub API. ### Step 2: Run the script ```bash bash scripts/cron-schedule-planner.sh ``` Common variants: ```bash # Specific owner, Swiss local time, report in target/ bash scripts/cron-schedule-planner.sh --owner dboeckli --tz Europe/Zurich # Local checkouts (no GitHub API) bash scripts/cron-schedule-planner.sh --local ~/projects/referenzen # A few explicit repos bash scripts/cron-schedule-planner.sh --repo dboeckli/ai-agent-skills --repo dboeckli/camel-first ``` ### Step 3: Present the results The script prints the hourly histogram, collisions and suggestions, and writes `target/cron-schedule-overview.md`. Summarise: - how many repos / scheduled entries were found, - the most crowded UTC hours (collisions), - which high-intensity jobs sit in crowded hours. ### Step 4: Apply suggestions only after confirmation The redistribution suggestions are heuristic (they move high-intensity jobs out of crowded hours into empty ones, keeping the minute and day fields). Present them as a diff and change workflow files **only after explicit confirmation**. Never edit automatically. ## Options | Option | Meaning | | --------------------- | --------------------------------------------------------------- | | `--owner ` | GitHub owner to scan (default: authenticated user) | | `--repo ` | explicit repo (repeatable); disables owner scan | | `--local ` | scan local checkouts under `` instead of GitHub | | `--tz ` | local timezone for the `Local` column (default `Europe/Zurich`) | | `--limit ` | max repos for the owner scan (default 200) | | `--out ` | Markdown report (default `target/cron-schedule-overview.md`) | | `--no-report` | console only, no report file | | `--top ` | max redistribution suggestions (default 5) | | `--queue-stats` | add observed queue time per UTC hour (via `gh run list`) | | `--runs ` | max runs per repo for queue stats (default 50) | ## Output `target/cron-schedule-overview.md`: - **Scheduled workflows** table: repo, workflow, cron (UTC), UTC time, local time, frequency, intensity, evidence. - **Runs per UTC hour** histogram (bars). - **Runs per frequency / weekday**. - **Collisions** — UTC hours with two or more scheduled runs. - **Observed queue time per UTC hour** (with `--queue-stats`) — average and max wait between `createdAt` and `startedAt` across recent runs, as an empirical contention signal. - **Redistribution suggestions** — high-intensity jobs in crowded hours moved to empty ones; with `--queue-stats` the empty hours with the lowest observed queue are preferred. ## Classification Intensity is derived heuristically from the workflow content. See `references/classification-and-timezones.md` for the exact patterns and the UTC/timezone rules. - **high** — Docker Compose, Testcontainers, service containers (`services:`), Kind/k3s cluster, matrix builds. - **medium** — Maven/Gradle full builds, Docker image builds. - **low** — lint/format/validate and other meta workflows. ## Examples ### Example 1: Are my scheduled builds colliding? User says: "Do my scheduled GitHub Actions builds collide?" Actions: 1. Run `bash scripts/cron-schedule-planner.sh --owner ` 2. Report the crowded UTC hours and the high-intensity jobs in them 3. Point to `target/cron-schedule-overview.md` Result: Collision overview across all repos with concrete evidence. ### Example 2: When should the Testcontainers build run? User says: "When should I schedule the Testcontainers build?" Actions: 1. Run the planner and locate the crowded hours (collisions) 2. Recommend one of the empty hours from the suggestions 3. Offer the concrete cron diff, apply only after confirmation Result: A low-contention slot and a ready-to-apply cron change. ## Troubleshooting ### `gh: not found` or authentication error The script needs an authenticated `gh`. Run `gh auth status`; if that fails, the user must authenticate. Alternatively use `--local ` with local checkouts. ### Empty report No workflow in scope has an `on.schedule` entry. Check the repo scope (`--owner`, `--repo`, `--local`) and that the workflows actually define `schedule:` crons. ### Times look off by one hour Cron is always UTC. Local times are computed for the current date, so daylight-saving transitions can shift them by one hour. Re-run after a DST change or adjust manually. ### `--queue-stats` shows little or no data GitHub reports `startedAt` equal to `createdAt` for most runs (no recorded queue), so the signal is sparse. Increase `--runs` to include older runs. Treat large gaps with care: they can come from approval gates, concurrency limits or manual runs, not only runner contention.

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…