Index of every page on this site: llms.txt
All skills
google avatar

/routines

@ead8d7f
by googlegoogle/adk-recipes11k stars
2,961
Run it yourself

Use for a recurring unattended task (cron; pull data, open a PR, post a digest), or to test/dry-run a routine first. Explains authoring and testing via the routine tool.

  • 1 file
  • 3.2 KB
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/google/adk-recipes/routines

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈45 tokens for metadata: the name and description. ≈772 when used: this file.

Description uses 2.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈180 characters, or 2.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Scheduling routines

A routine is a recurring task that runs unattended on a cron schedule, in a fresh sandbox isolated from the user's workspace, holding only the secrets the routine declares. Use it for "every morning, summarize X and report" / "weekly, bump deps and open a PR" — work that should happen without the user present. There is no one-off reminder tool: it cannot ask the user anything mid-run, so it is the wrong fit for a plain "remind me at 9pm" ping.

The isolation model (why this is safe)

  • The routine runs in its OWN sandbox (lhart-<id>), never the user's — so it cannot see their workspace, other projects, or undeclared secrets.
  • It receives ONLY the secret env vars listed in secrets: — that list IS the blast-radius boundary. Declare the minimum the task needs (check the "Available secret env vars" line for the names).
  • It is headless (nobody to approve mid-run): shell commands run normally in the isolated sandbox — git clone, pip install, build, commit/push all work, since the sandbox is the blast radius. Secret-exfiltration and known-destructive commands are still refused, and any non-shell action that would need approval is auto-denied — design the task to avoid those, or do an irreversible external step as a draft for the user to confirm later.
  • Outputs come back as artifacts in the routine's session — it cannot write into the user's workspace.

How to author one

Call routine(action="create", name=..., schedule=..., task=..., secrets=[...]):

  • schedule: a 5-field cron expression ("0 8 * * *" = daily 08:00 UTC).
  • task: a self-contained instruction — the routine has no memory of this chat and no access to the user's files, so state everything it needs.
  • secrets: the exact secret env names the task requires (e.g. ["GITHUB_PAT"]), or omit for none.

Test it before scheduling

ALWAYS dry-run a routine before you create it:

routine(action="test", name=..., task=..., secrets=[...])

This runs the task ONCE right now under the routine's real isolation — its own lhart- sandbox, headless (shell runs; non-shell approvals denied), only the declared secrets — and blocks until it finishes, returning {success, status, output, ...}. Read the output: if the task didn't work (missing secret, needed an approval, wrong assumption), fix task/secrets and test again. A test schedules nothing (no schedule row, no chat session) — but it does provision the routine's real lhart- sandbox, which the scheduled routine then reuses, so pass the same name you'll create with. Then create.

Scheduling it

The tool asks the user to confirm before scheduling. On the first call it returns status: "awaiting_user_response" — stop, let the user decide, and do NOT claim the routine is scheduled until you get success: true with an id.

Use routine(action="list") to show scheduled routines and routine(action="cancel", id=...) to remove one (the user can also type /routines / /routines remove <id>).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at ead8d7f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 3 months ago

README badge

README badge for google/adk-recipes/routines