scheduled-task

scheduled-task is a skill for Claude Code from metraton/gaia. It costs 86 tokens per session (2,745 once invoked), scanned A, original, MIT.

A procedure for running an AI coding task automatically on a repeating schedule, such as every morning or every few hours. The task runs without a person present and leaves a report for later review.

In plain words
What is it for?
Creating, running, and reviewing scheduled tasks that use the operating system's cron scheduler and the headless Claude Code command.
Why use it?
It handles recurring work without waiting for a user to answer questions during the run, while recording approval needs when an operation cannot run unattended.

Skill for Claude Code

Written for Claude Code: $CLAUDE_SESSION_ID variable. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Claude Code.

Part of the gaia plugin — 38 skills, 9 agents, 11 hooks shipped together

Good fit Creating, running, and reviewing scheduled tasks that use the operating system's cron scheduler and the headless Claude Code command.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/metraton/gaia/scheduled-task
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add metraton/gaia --skill scheduled-task
Clone the repo
git clone --depth 1 https://github.com/metraton/gaia

Made for: Claude Code.

Or install gaia, the plugin that ships this one along with the rest of its 38 skills, 9 agents, 11 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scheduled-task

README.md
[![agentmods](https://agentmods.dev/badge/skills/metraton/gaia/scheduled-task.svg)](https://agentmods.dev/skills/metraton/gaia/scheduled-task)
Your own site
<a href="https://agentmods.dev/skills/metraton/gaia/scheduled-task"><img src="https://agentmods.dev/badge/skills/metraton/gaia/scheduled-task.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00086 $0.02745
Opus 5 $0.00043 $0.01373
Sonnet 5 $0.00017 $0.00549
Haiku 4.5 $0.00009 $0.00275

Measured 8d ago against content hash 6a7d1c2fcdaf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

scheduled-task scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/run-scheduled-task.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/scheduled-task/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Scheduled Task

A scheduled task is a Gaia task that runs unattended on a recurring schedule via the OS crontab, executes claude -p headless, and leaves the user a report in the notifications inbox instead of asking anything mid-run. This skill covers the three flows of its lifecycle: creating one, executing it headless, and consuming what it reports. Work the user wants done once, now, in this session is an ordinary dispatch, not a scheduled task.

The load-bearing constraint that shapes everything below: a headless run has no user to answer a prompt. So a scheduled task must complete everything it can WITHOUT a T3 mutation, and when a T3 is unavoidable it must NOT try to ask -- it accumulates the approval_id, finishes the rest, and reports back so the user can resume and grant later. Gaia's T3 layer gates independently of Claude Code's permission dialog: --dangerously-skip-permissions removes the TUI prompt, but Gaia still blocks/accumulates T3 mutations exactly the same.

When to use

Trigger when the user asks for routine/scheduled execution: "cada noche corre X", "rutinariamente revisa Y", "cada 6 horas", "prográmame Z". If they want it run once now, this is the wrong skill -- that is an ordinary one-shot dispatch.

Flow A -- Creation (mount the task)

Build three artifacts, in order. Heavy mechanics and the full wrapper rationale are in reference.md; the runnable templates are in scripts/.

  1. Write the task as a read-only-first atomic prompt. State the task's job as a self-contained prompt that opens with the headless preamble (Flow B). Front-load everything read-only; isolate any mutation as an explicit, clearly-labeled step so the headless run can skip-and-accumulate it cleanly. Store the prompt in its own file (one task = one prompt file).
  2. Copy the wrapper scripts/run-scheduled-task.sh to a per-task file (e.g. ~/ws/me/scheduled-tasks/<task>.sh) and edit its ==CONFIG== block: TASK_NAME, PROJECT_DIR, PROMPT_FILE. The wrapper exports credentials and PATH explicitly (cron has almost no environment), runs the validated headless invocation, persists the session, and parses out the session_id. Do not drop --output-format json or add --no-session-persistence -- the session MUST stay resumable.
  3. Add a staggered crontab entry from scripts/crontab.template. Give the wrapper an ABSOLUTE path, redirect to a per-task log, and offset the minute so no two tasks start in the same minute.

Read the full file on GitHub · 197 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 197 lines · 86 tokens per session scan A 6a7d1c2fcdaf

Subscribe to this mod's changes

scheduled-task is a skill published in the GitHub repository metraton/gaia (3 stars, last pushed today), licensed MIT. It adds 86 tokens to every session and 2,745 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories