/claudio-routines:routinesfrom claudio-routines
Manage claude.ai routines (scheduled cloud agents) as code. Export the live routines into a private repository, render their prompts from templates, show drift between git and live, lint templates, push a rendered prompt after an explicit approval, seed a tribe routine's state from its previous digest pages or a recap routine's state from its stored state, and run a routine locally in this session. Use for "/routines", "export my routines", "is my routine in sync", "diff routines", "sync the routine", "push the routine prompt", "seed the tribe state", "render the routine", "lint routine templates", "print the environment setup script", "run prod watch locally", "run the routine here". NOT for creating or deleting routines, and NOT for reading a routine's run logs.
Ships in claudio-routines. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Git is the source of truth for routine prompts. The real templates and values live in a private repository; this plugin ships the scripts and generic skeletons.
/claudio-routines:routines export
/claudio-routines:routines diff [slug]
/claudio-routines:routines render <slug> [--place cloud|local] [--post]
/claudio-routines:routines lint
/claudio-routines:routines sync <slug>
/claudio-routines:routines setup-script [--place cloud|local]
/claudio-routines:routines run <slug> [--since T] [--post]
/claudio-routines:routines seed <slug>
R below is python3 ${CLAUDE_PLUGIN_ROOT}/skills/routines/scripts/routines.py.
CLAUDIO_PRIVATE_DIR. When it is unset, ask the owner for the path and pass it as --private <path> to every command.R check-private before any RemoteTrigger call. On exit 2, stop and show its message: the path is missing, or it sits inside another repository's working tree.RemoteTrigger tool with ToolSearch (select:RemoteTrigger) when it is deferred.RemoteTrigger with action: "list".mktemp -d, outside any repository.R export --input <file>.
routines/<slug>.json and routines/<slug>.prompt.md in the private repository.R diff [slug].
in sync; untracked lines are live routines with no template, for information.not exported routines.Run R render <slug> [--place cloud|local] [--post].
--place picks the place whose runtime_dir, state_dir and runs_dir fill the prompt, cloud by default.runs_dir is optional; without it the prompt creates its run folder under /tmp.--post.<!-- not runnable --> is marked not runnable. Render keeps that line and warns, naming the template. --runnable exits 2 on it, with nothing on stdout and no --out file written.R lint --public.
state.py, collect.py, evaluate.py, digest.py, tribe.py and recap.py command and flag against this checkout's runtime.provider-name: a module name under runtime/providers/) in the skeletons, the plugin README and this file.R lint --private <path> [--claudio <checkout>]. It checks every state.py, collect.py, evaluate.py, digest.py, tribe.py and recap.py command and flag against the runtime at the pinned tag, so the tag must exist in a local claudio checkout. Pass --claudio when the plugin runs from the plugin cache.path:line:rule.lint --private runs the role check of this checkout's runtime on every routine file, for both places. It exits 2 naming the file and the key path of the first invalid value, and skips a routine whose template does not call the runtime (no {{runtime.dir}}): a prompt-only mirror or a template marked not runnable.lint --private also checks .claude/settings.json of the private repository, the file the cloud session reads. It reports at line 1 of that file:
settings-missing: the file does not exist.settings-invalid: the file is not a JSON object.deny-missing:<entry>: permissions.deny lacks <entry>, one finding for each of PushNotification, Bash(sleep *) and Monitor.lint --private compares each private <name>-runtime.md template with the public runnable template <name>.md at the pinned runtime commit, and reports at line 1:
runtime-copy-differs:<name>.md: the copy differs; copy the public template again.runtime-copy-missing:<name>.md: the pinned commit has no such public template.marker: the first line is an HTML comment holding not runnable but is not exactly <!-- not runnable -->, so the template would stay runnable. Both lints report it at line 1.lint --private also prints warnings on stderr, naming keys and never values. They leave the exit code unchanged:
literal-value: a template holds the value of a routine key as literal text. Use the placeholder.repeated-value: two routines set the same key to the same value. Move it to the shared values.Pushes one routine's rendered prompt and cron. Never push without the owner's explicit approval of the diff shown in this session.
mktemp -d, outside any repository, and run R render <slug> --runnable --out <dir>/prompt.md. Exit 2 stops the sync with its message, before any API call: the template is marked not runnable, or the render failed.R diff <slug>.
in sync and stop.python3 -c "import uuid; print(uuid.uuid4())") and run R body <slug> --uuid <uuid> > <dir>/before.json, in the same directory. It prints {"trigger_id": ..., "body": ...}, built from the fresh snapshot, so connectors, environment and tools stay as they are live.
body exits 2 on a template marked not runnable: stop the sync with its message.R body <slug> --uuid <uuid> > <dir>/after.json with the same UUID and compare the body built before and after approval with cmp <dir>/before.json <dir>/after.json.
RemoteTrigger with action: "update", the trigger_id and the body of after.json, unchanged.
R diff <slug>.
R setup-script [--place cloud|local]. It renders the setup script from runtime.repo, runtime.tag, runtime.sha and places.<place>.runtime_dir, cloud by default. Exit 2 names an invalid value.cloud: the owner pastes it into the setup script of the cloud environment at claude.ai; no API sets it.local: the owner runs it once on this machine, after each runtime bump.Runs one routine in this session for the local place, with the same template, state branch and runtime as a cloud run. Without --post, the run reports only: it pushes its run record, leaves the state unchanged and prints the digest.
R check-private. On exit 2, stop and show its message.
CLAUDIO_PRIVATE_DIR: Claude Code reads the relay hook from that repository's .claude/settings.json only in a session started there. In any other session, stop and tell the owner to restart it in the private repository.CLAUDIO_RUNTIME_DIR as places.local.runtime_dir, or the relay hook captures nothing.places.local.runtime_dir, places.local.state_dir and runtime.sha from the private config.json (a routine may sit in config/routines/<slug>.json beside it), then run git -C <runtime_dir> rev-parse HEAD and git -C <runtime_dir> status --porcelain --ignored.
rev-parse fails or prints another hash than runtime.sha, or status prints anything: tell the owner to run R setup-script --place local and run its output, then stop.places.local.state_dir does not resolve to the private repository path of the Preconditions (compare the realpath of both): tell the owner to set places.local.state_dir to that path, then stop.mktemp -d directory outside any repository: R render <slug> --place local --runnable --out <dir>/prompt.md, with --post added only when the owner passed it.
python3 -B <runtime_dir>/plugins/claudio-routines/runtime/collect.py check-env --config <state_dir>/config.json --routine <slug> --place local.
missing <source> <variable> line: tell the owner which variable is missing and which source it leaves not read.connector <source> <connector> line: check that this session lists a tool from that connector, and name the missing ones.fallback <source> <from> <to> <variable> line: the source is read through <to>; report nothing for it.injected <source> <host> line: the place's proxy adds that source's credential; report nothing for it.--since T, give it T as the run's start time, in UTC (YYYY-MM-DDTHH:MM:SSZ).
places.local.runs_dir (/tmp without it) and keeps it, raw results included.Never post to the chat channel without --post: the rendered prompt then prints the digest in this session.
Seeds the state of a routine whose engine is tribe from its previous digest pages, or whose engine is recap from the state its live routine kept in the document store, so the first runtime run continues their keys. The seeded state stays in a scratch directory until the owner approves it. Never push the state without the owner's explicit approval of the summary shown in this session.
<private> below is the private repository path of the Preconditions.
Run R check-private. On exit 2, stop and show its message.
Ask the owner for the previous digest pages of the routine, newest first, as page ids or links. Make a directory <dir> with mktemp -d, outside any repository, and fetch each page with the document store connector.
<dir>/page-<n>.json. Otherwise write the full result, first line included, to that path. <n> counts from 1, newest first.recap routine takes no digest pages: ask for the page that holds the stored state, fetch it the same way, and write the JSON of its state to <dir>/source.json.Run R seed <slug> --page <dir>/page-1.json [--page <dir>/page-2.json ...] --out <dir>/state.json, the pages newest first. It runs the seed command of the runtime checked out at runtime.sha in places.local.runtime_dir, so the state matches the version that reads it.
recap routine runs R seed <slug> --from <dir>/source.json --out <dir>/state.json instead: the state is named after the routine's values.digest.name, else its slug, and each unit keeps its kind, channel, status, waiting runs and lateness with its title cut to 8 words; links, blind spots and run bookkeeping are dropped.R setup-script --place local and run its output, then stop.tribe or recap, the input flag does not fit the engine (--page for tribe, --from for recap), the config is invalid, no page holds a valid run state (each page read is named), a run state holds a field outside the allowed values, a warning status excepted (its key path is named), or a stored recap unit cannot be mapped (its key path units.<key>.<field> is named).status other than open, in progress, mitigated, decided or dropped is read as the one it starts with, else as open. Each reading is printed on stderr: show those lines with the summary of step 5.Run git -C <private> fetch origin +claude/state:refs/remotes/origin/claude/state, then git -C <private> cat-file -e origin/claude/state:state/<slug>.json.
claude/state branch: stop the seed with nothing pushed, and tell the owner the branch does not exist.cat-file exits 0: the push replaces the stored state of the routine. Say so.Show the summary printed by step 3 and where the state goes, state/<slug>.json on claude/state. Ask the owner to approve the push for this routine. Wait for an explicit approval. Anything else ends the seed with nothing pushed.
After the approval, save the state with a fast-forward push through a work tree under <dir>, git -C <dir>/store push origin HEAD:refs/heads/claude/state, as one command:
git -C <private> worktree add --detach <dir>/store origin/claude/state && \
mkdir -p <dir>/store/state && \
cp <dir>/state.json <dir>/store/state/<slug>.json && \
git -C <dir>/store add state && \
git -C <dir>/store commit -q -m "seed <slug>" && \
git -C <dir>/store push origin HEAD:refs/heads/claude/state
git -C <private> worktree remove --force <dir>/store.Run the fetch of step 4 again, then git -C <private> show origin/claude/state:state/<slug>.json | cmp - <dir>/state.json.
The private repository changed when Export ran. Offer to commit it there; never commit in this repository on its behalf.
scripts/lint.py (opens in a new tab)scripts/routines.py (opens in a new tab)scripts/test_routines.py (opens in a new tab)templates/chat-recap.md (opens in a new tab)templates/prod-watch.md (opens in a new tab)templates/setup-env.sh (opens in a new tab)templates/tribe-digest.md (opens in a new tab)templates/weekly-status.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jrollin/claudio --plugin claudio-routines