К основному содержанию
скилл CX Codex

cron-schedule-planner — скилл для Claude Code: функции и установка

Находит расписания GitHub Actions во всех репозиториях и помогает развести тяжёлые сборки по свободным часам. Создаёт отчёт с коллизиями и готовыми cron-таймингами.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add dboeckli/ai-agent-skills --skill cron-schedule-planner -a claude-code
Открыть на GitHub

Что делает cron-schedule-planner

Скрипт scripts/cron-schedule-planner.sh сканирует расписания on.schedule в репозиториях организации или локальных папках. Он переводит время из UTC в локальный часовой пояс (по умолчанию Europe/Zurich) и оценивает ресурсоёмкость задач. Сборки с Docker Compose, Testcontainers, Kind и матрицами получают высокий приоритет нагрузки, а линтеры получают низкий.

Результаты сохраняются в Markdown-отчёт target/cron-schedule-overview.md. В нём строится гистограмма запусков по часам, отмечаются коллизии при двух и более сборках одновременно, а флаг --queue-stats подтягивает среднее время ожидания в очереди через GitHub API. Скрипт не меняет файлы воркфлоу сам: он только предлагает готовый diff и ждёт подтверждения.

Для удалённого поиска нужен авторизованный GitHub CLI (gh). Без него поиск сломается, если не передать локальные репозитории через ключ --local.

Какие задачи решает

  • найти пересечения по времени в расписаниях GitHub Actions между проектами
  • перенести тяжёлые тесты с Testcontainers на незагруженные часы
  • оценить время ожидания раннеров с флагом --queue-stats
  • перевести cron-выражения из UTC в локальный часовой пояс для отчёта

Примеры запросов агенту

  • Проверь, сталкиваются ли расписания наших сборок в GitHub Actions.
  • Когда лучше запускать ночные сборки с Testcontainers, чтобы не перегружать раннеры?
  • Сделай отчёт по cron-расписаниям для репозиториев пользователя dboeckli в таймзоне Europe/Zurich.

Как установить cron-schedule-planner

1Через Skills CLI (Vercel)

npx skills add dboeckli/ai-agent-skills --skill cron-schedule-planner -a claude-code

2Вручную: положить файлы

~/.claude/skills/cron-schedule-planner/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/cron-schedule-planner/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о cron-schedule-planner

Как установить cron-schedule-planner в Claude Code?

Выполните команду npx skills add dboeckli/ai-agent-skills --skill cron-schedule-planner -a claude-code. Файл навыка сохранится в ~/.claude/skills/cron-schedule-planner/SKILL.md.

Что делает cron-schedule-planner?

Он сканирует cron-триггеры schedule в GitHub Actions, распределяет задачи по уровню нагрузки и находит часы с наложением сборок. Итоговый отчёт содержит рекомендации по переносу таймингов.

Меняет ли скилл файлы репозитория автоматически?

Нет, скрипт работает только на чтение. Он выводит рекомендуемые изменения в виде diff и применяет их в воркфлоу только после явного подтверждения.

Исходный текст

SKILL.md · MIT
---
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 <owner>` to scan a different owner.
- `--repo <owner/repo>` (repeatable) for an explicit list.
- `--local <dir>` 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 <owner>`     | GitHub owner to scan (default: authenticated user)              |
| `--repo <owner/repo>` | explicit repo (repeatable); disables owner scan                 |
| `--local <dir>`       | scan local checkouts under `<dir>` instead of GitHub            |
| `--tz <zone>`         | local timezone for the `Local` column (default `Europe/Zurich`) |
| `--limit <n>`         | max repos for the owner scan (default 200)                      |
| `--out <file>`        | Markdown report (default `target/cron-schedule-overview.md`)    |
| `--no-report`         | console only, no report file                                    |
| `--top <n>`           | max redistribution suggestions (default 5)                      |
| `--queue-stats`       | add observed queue time per UTC hour (via `gh run list`)        |
| `--runs <n>`          | 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 <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 <dir>` 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.

© dboeckli · MIT · dboeckli/ai-agent-skills

Похожие скиллы

Все скиллы по теме «DevOps и инфраструктура» →
wizard Matt Pocock Скилл создаёт интерактивный bash-скрипт для ручных шагов: настройки сервисов, секретов CI и разовых миграций. 553 369установок hyperframes-cli heygen-com Управляет проектами HyperFrames через терминал: собирает таймлайн, проверяет контраст кадров, запускает предпросмотр и рендерит видео локально или в облаке. CX Codex +1 1 300 000установок setup-pre-commit Matt Pocock Скилл настраивает pre-commit для JavaScript-репозитория: Husky запускает форматирование, проверку типов и тесты перед коммитом. 489 289установок using-git-worktrees Jesse Vincent Готовит изолированное рабочее дерево перед доработкой или выполнением плана. Проверяет текущий репозиторий, выбирает нативные средства платформы либо Git. CX Codex 217 153установок finishing-a-development-branch Jesse Vincent Скилл проверяет тесты и помогает выбрать, как завершить работу в ветке: слить её, открыть Pull Request или оставить как есть. CX Codex 214 439установок orca-cli stablyai Скилл даёт агенту доступ к worktree, терминалам, артефактам и встроенному браузеру Orca через CLI. Пригодится, когда работа идёт в окружении Orca. CX Codex +1 354 000установок

Из того же набора5

Спонсоры проекта

Компании, которые помогают держать аналитику открытой