agentleFS
OrchardxyzOrchardxyz/agent-skills/skills/deprecated/scheduling-codex-window-starts/SKILL.md

scheduling-codex-window-starts

Skill0 starsChanged 4 months agoMITView on GitHub

Use when a Codex user wants recurring start points optimized around predictable daily working periods and a rolling usage window.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not ask how early to start.

    line 21
  2. Very specific:

    Use a callable, account-level usage/reset tool when the current environment provides one.

    line 25
  3. Very specific:

    When no reliable tool is available, use W = 300 minutes without blocking on user input.

    line 27
  4. Very specific:

    Use a start-gap buffer B between consecutive scheduled starts.

    line 31
  5. Very specific:

    Default to B = 5 minutes.

    line 33
  6. Very specific:

    Never use B < 1; clamp any smaller value up to 1 minute and say that you did so.

    line 35
  7. Very specific:

    Treat working intervals and windows as half-open intervals [start, end) in minutes after midnight.

    line 41
  8. Distinctive:

    Run the bundled optimizer:

    line 50
  9. Distinctive:

    If a pair is too close, it moves the earlier start earlier first.

    line 68
  10. Distinctive:

    If that is impossible without entering working time, it moves the later start later and reports that tradeoff in the JSON output.

    line 69
  11. Distinctive:

    Ask the user to confirm or adjust the recommendation.

    line 87
  12. Distinctive:

    Use the Codex automation tool and update a matching automation instead of duplicating it.

    line 91
  13. Distinctive:

    If the confirmed daily times do not share the same minute value, prefer one automation per time instead of trying to encode them in one …

    line 93
  14. Distinctive:

    Use this minimal prompt:

    line 95
  15. Distinctive:

    If no automation tool is available, provide the schedule and prompt without claiming they were saved.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Scheduling Codex Window Starts

Overview

Calculate up to three scheduled start points whose rolling windows cover as much working time as possible, then ask the user to confirm the recommendation before creating automations.

Gather Only Necessary Inputs

Ask for:

  • daily working intervals, such as 10:00-12:00,15:00-18:00
  • recurrence: workdays, every day, or a custom weekly pattern

Infer the timezone from the current environment and state the inference. Ask only if it is unavailable or likely wrong. Ask about holiday behavior only when the chosen recurrence makes it relevant.

Do not ask how early to start; start times are outputs of the optimization.

Window Length

Use a callable, account-level usage/reset tool when the current environment provides one. The interactive /usage TUI command is not itself an Agent tool and must not be assumed callable.

When no reliable tool is available, use W = 300 minutes without blocking on user input. State this assumption when presenting the result. Accept a different window length when the user supplies one.

Buffer Between Starts

Use a start-gap buffer B between consecutive scheduled starts.

  • Default to B = 5 minutes.
  • Accept a different buffer when the user supplies one.
  • Never use B < 1; clamp any smaller value up to 1 minute and say that you did so.

This buffer is between starts, not added to the usage window itself. The target gap between consecutive starts is W + B.

Optimization Model

Treat working intervals and windows as half-open intervals [start, end) in minutes after midnight.

  • A scheduled start must fall outside all working intervals.
  • A start at s creates [s, s + W).
  • A later start should be scheduled at least W + B minutes after the previous start.
  • Evaluate at most K = 3 starts.
  • Maximize working minutes covered by the union of effective windows.
  • Among equal maximum-coverage solutions, use the fewest starts; among remaining ties, prefer later starts.

Run the bundled optimizer:

python3 scripts/optimize_starts.py \
  --interval 10:00-12:00 \
  --interval 15:00-18:00 \
  --window 300 \
  --buffer 5 \
  --max-starts 3

The script evaluates every non-working minute with dynamic programming, then applies the configured start-gap buffer. Do not replace the result with a fixed lead-time heuristic.

The script handles B directly:

  1. It optimizes the base schedule with the true window length W.
  2. It keeps the latest start fixed when possible.
  3. It walks backward through earlier starts and ensures each consecutive pair is separated by at least W + B.
  4. If a pair is too close, it moves the earlier start earlier first.
  5. If that is impossible without entering working time, it moves the later start later and reports that tradeoff in the JSON output.
  6. It re-checks coverage using the original window length W, not W + B.

For a custom weekly schedule, run the optimizer once per distinct daily interval pattern and group weekdays that produce the same start points.

For the example above, the base optimizer recommends 09:59 and 14:59, covering all 300/300 working minutes. With the default B = 5, the final schedule becomes 09:54 and 14:59. Show the adjusted result and coverage from the script output.

Present Before Creating

Show:

  • recommended start times and resulting windows
  • covered minutes / total working minutes and percentage
  • assumed or observed window length
  • assumed or chosen buffer
  • timezone and recurrence
  • any uncovered working intervals

Ask the user to confirm or adjust the recommendation. Do not create an automation in the same turn that first collects the working intervals unless the user already authorized immediate creation.

Create the Automation

Use the Codex automation tool and update a matching automation instead of duplicating it. Use one standalone automation containing all confirmed daily times when supported. Preserve default model and reasoning settings.

If the confirmed daily times do not share the same minute value, prefer one automation per time instead of trying to encode them in one RRULE that would create unwanted cross-product times.

Use this minimal prompt:

This is a lightweight Codex window start. Do not inspect or modify project files, run commands, access the network, or perform follow-up work. Complete with nothing to report.

If no automation tool is available, provide the schedule and prompt without claiming they were saved.

Limits

  • A normal user request during an active window does not move its end time.
  • A user request while no window is active may change the real schedule. Local thread activity cannot reliably reveal account window state.
  • Checking account state from inside a Codex automation cannot avoid that run's usage; Codex has already been invoked.
  • The optimizer maximizes guaranteed coverage from scheduled starts; it does not model quota consumption within a window.
  • Each automation consumes agentic usage. Never describe it as free or as a guaranteed quota reset.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.