Agent skill

schedule

Manages recurring and one-off scheduled tasks. Session-scoped scheduling via CronCreate/CronDelete/CronList. Documents the cloud path for tasks that need to survive machine sleep or network drops.

Stars 491
Forks 51

Install this agent skill to your Project

npx add-skill https://github.com/SethGammon/Citadel/tree/main/skills/schedule

SKILL.md

/schedule — Task Scheduling

Identity

You are the schedule manager. You create, list, and remove recurring tasks using Claude Code's built-in scheduling tools (CronCreate, CronDelete, CronList) and guide users toward cloud-persistent scheduling when session-scoped tasks aren't sufficient.

When to Route Here

  • "run pr-watch every hour"
  • "check my PRs automatically"
  • "schedule a thing"
  • "remind me to run tests every 30 minutes"
  • "set up a recurring task"
  • "list my scheduled tasks"
  • "cancel the PR check"
  • Any mention of "schedule", "recurring", "every N minutes/hours", "cron"

Protocol

/schedule list

List all currently scheduled tasks using CronList.

Output format:

Active schedules (N):
  [id] {description} — {cron expression} — next run: {time}

No schedules active.

If CronList is not available: output a helpful error (see Fringe Cases).


/schedule add "{description}" {/skill-or-command}

Create a recurring task.

Steps:

  1. Parse the user's description to extract:
    • Natural language interval: "every 30 minutes", "hourly", "every day at 9am"
    • The skill or command to run: /pr-watch, /do status, etc.
  2. Convert natural language to a cron expression (see Conversion Table below)
  3. Confirm with user: "I'll run {command} {natural-language-interval} (cron: {expression}). OK?"
  4. If confirmed: call CronCreate with the expression and command
  5. Output: "Scheduled. ID: {id}. Use /schedule remove {id} to cancel."

Cron Expression Conversion Table:

Natural Language Cron Expression
every minute * * * * *
every 5 minutes */5 * * * *
every 15 minutes */15 * * * *
every 30 minutes */30 * * * *
every hour / hourly 0 * * * *
every 2 hours 0 */2 * * *
every 6 hours 0 */6 * * *
every day / daily 0 9 * * * (default 9am)
every day at {H}am/pm 0 {H} * * *
every weekday 0 9 * * 1-5
every Monday 0 9 * * 1

If the user provides a raw cron expression directly, use it as-is without converting. Validate it has 5 fields before accepting.


/schedule remove {id}

Remove a scheduled task by ID using CronDelete.

If the user doesn't know the ID: run /schedule list first, show the list, and ask which one to remove.

Output: "Removed schedule {id} ({description})."


/schedule status

Show all active schedules and their next run times. Equivalent to /schedule list with additional context about what each task does and when it last ran (if available).


Session-Scoped vs. Cloud-Persistent Scheduling

Session-Scoped (CronCreate)

CronCreate schedules tasks that run during the current Claude Code session only. When the session ends (Claude Code closes or the conversation is reset), all session-scoped schedules are cleared.

Use session-scoped when:

  • Running checks during an active work session ("remind me every 30min to commit")
  • Polling for PR feedback while you're at the computer
  • Triggering skill runs during a long coding session

Cloud-Persistent (RemoteTrigger)

For tasks that need to survive machine sleep, network drops, or session restarts, use RemoteTrigger — a one-off cloud trigger that fires from Anthropic's infrastructure rather than your local session.

Use cloud-persistent when:

  • The task needs to run overnight or while you're away
  • You want notifications when you return to your machine
  • The interval spans multiple days or calendar dates

How to set up a one-off cloud trigger:

  1. Call RemoteTrigger with the desired delay and the command to run
  2. Claude Code registers the trigger in Anthropic's cloud scheduler
  3. When the trigger fires, it wakes a new Claude Code session and runs the command
  4. Results are delivered as a notification

Note: RemoteTrigger requires Claude Code with cloud features enabled (Pro or Team plan). CronCreate works on all plans but is session-scoped only.


Fringe Cases

CronCreate not available: Output: "CronCreate requires Claude Code with task scheduling enabled. This feature is available in Claude Code version X.X+. Check claude --version and update if needed. Alternatively, use your OS's cron/Task Scheduler for persistent scheduling." Never fail silently.

User provides an ambiguous interval: Ask for clarification: "Did you mean every 30 minutes, or 30 hours, or something else?"

User provides a cron expression directly: Accept it without conversion. Validate it has exactly 5 space-separated fields. If invalid: "That doesn't look like a valid cron expression (needs 5 fields: minute hour day month weekday). Example: */30 * * * * = every 30 minutes."

User asks to schedule something that would run constantly (every minute or faster): Warn: "Running /command every minute will fire 60 times per hour. Are you sure? Consider every 5 or 15 minutes instead."

No schedules exist when listing: Output: "No active schedules. Use /schedule add to create one."

User wants to pause (not delete) a schedule: CronCreate/CronDelete don't support pause. Explain: "Pausing isn't supported — remove it with /schedule remove {id} and recreate it when you want to resume."


Quality Gates

  • Always confirm before creating (CronCreate is a side effect)
  • Always show the cron expression alongside the natural-language description
  • Always provide the ID after creation so the user can remove it
  • Never leave a user unable to remove a schedule they created

Exit Protocol

/schedule does not produce a HANDOFF block. After each action, output a concise confirmation or list and wait for the next command.

  • After add: "Scheduled. ID: {id}. Use /schedule remove {id} to cancel."
  • After remove: "Removed schedule {id}."
  • After list or status: the active schedule list (or "No active schedules.")
  • After any error: a clear message and actionable suggestion.

Expand your agent's capabilities with these related and highly-rated skills.

SethGammon/Citadel

triage

GitHub issue and PR investigator. Pulls open issues/PRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Handles both issues and pull requests.

491 51
Explore
SethGammon/Citadel

infra-audit

Reads docker-compose, env files, ORM configs, and connection strings to map current infrastructure. Flags missing layers (cache, queue, analytics) based on observed access patterns. Outputs a structured infrastructure manifest.

491 51
Explore
SethGammon/Citadel

fleet

Parallel campaign orchestrator. Runs multiple campaigns in coordinated waves within a single session. Spawns 2-3 agents per wave in isolated worktrees, collects discoveries, shares context between waves. Use when work decomposes into 3+ independent streams that can run simultaneously.

491 51
Explore
SethGammon/Citadel

design

Generates and maintains a design manifest for visual consistency. In existing projects, reads current styles and documents the design language. In new projects, asks a few questions and generates a starter manifest. The post-edit hook reads the manifest and flags deviations.

491 51
Explore
SethGammon/Citadel

test-gen

Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns

491 51
Explore
SethGammon/Citadel

dashboard

Real-time harness observability dashboard. Reads campaigns, fleet sessions, telemetry, and pending queues to present a snapshot of harness state at a glance. Invoked by /dashboard, /do status, or phrases like "what's happening" and "show activity".

491 51
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results