setup-routines

setup-routines is a skill for Claude Code from ArcBlock/agent-skills. It costs 164 tokens per session (3,815 once invoked), scanned B, original, MIT.

An interactive setup process for reconciling a repository's scheduled cloud routines and optional local cron jobs. A cron job is a task that runs automatically on a schedule.

In plain words
What is it for?
Creating or updating cloud triggers, staggering runs across runners, configuring local scheduled jobs, and reviewing routines that cannot be deleted automatically.
Why use it?
It keeps declared routines aligned with configured schedules while requiring a person to approve durable external changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

Part of the agentloop plugin — 20 skills shipped together

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.

agentmods
npx agentmods add skills/arcblock/agent-skills/setup-routines
Any agent
npx skills add ArcBlock/agent-skills --skill setup-routines
Clone the repo
git clone --depth 1 https://github.com/ArcBlock/agent-skills

Made for: Claude Code.

Or install agentloop, the plugin that ships this one along with the rest of its 20 skills.

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 setup-routines

README.md
[![agentmods](https://agentmods.dev/badge/skills/arcblock/agent-skills/setup-routines.svg)](https://agentmods.dev/skills/arcblock/agent-skills/setup-routines)
Your own site
<a href="https://agentmods.dev/skills/arcblock/agent-skills/setup-routines"><img src="https://agentmods.dev/badge/skills/arcblock/agent-skills/setup-routines.svg" alt="Measured on agentmods" height="20"></a>
Per session 164 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,815 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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.00164 $0.03815
Opus 5 $0.00082 $0.01907
Sonnet 5 $0.00033 $0.00763
Haiku 4.5 $0.00016 $0.00381

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

Security

Grade B, and why

setup-routines scanned grade B with 1 finding 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 5d ago.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat .claude/routines/catalog.json # the contract; stop if absent
plugins/agentloop/skills/setup-routines/SKILL.md · 263 lines

How it starts

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

Setup Routines — one Q&A pass, a repo's custom routines fully reconciled

Any team member runs /agentloop:setup-routines inside a repo that ships a routine catalog (.claude/routines/), answers a few all-defaulted questions, and gets:

  • Cloud routines (via the RemoteTrigger tool): create-or-update by canonical name, per-runner stagger, per-trigger git sources, prompt rendered from the repo's templates
  • Durable local cron jobs (system crontab + dedicated worktree/clone, optional)
  • Reconciliation of what already exists: canonical-name matches are updated in place; unknown routines are listed for the human (the API has no delete)

★ Interactive skill — never run unattended. Denied by a deny-interactive-unattended hook = you are in an unattended environment → stop and say "/agentloop:setup-routines needs a human present". Do NOT silently apply defaults: registering schedules is a durable outward action.

Scope split: /agentloop:fleet-setup owns the generic per-repo issue-sweep/pr-sweep loop (driver-based, multi-repo). This skill owns the routines a repo declares in its own catalog — producers, QA sweeps, nightly deploys, GC jobs, anything repo-shaped. Never schedule issue/pr-sweep from here (it would double-fire against the fleet and the templates have long since diverged).

The catalog contract (what the consuming repo provides)

Everything repo-specific lives in the repo, not in this skill:

.claude/routines/
  catalog.json        # the machine-readable routine list (schema below)
  templates/*.md      # one prompt template per routine, {{RUNNER}} etc. placeholders

catalog.json schema (all routine fields except name/template/cron optional):

{
  "repo": "Owner/repo",                     // canonical slug, used for trigger sources
  "envSetupScript": ["line1", "line2"],     // the environment's setup-script lines (printed, see Step 2c)
  "identity": { "gitUserName": true },      // Step 2 renders `git config --global user.name <runner>` advice into report
  "presenceRegister": "CMD {{RUNNER}} {{ROUTINES}} {{MODEL}} {{LOCAL}}",  // optional post-reconcile hook, run from repo root
  "routines": [
    {
      "name": "issue-graph producer hourly",  // canonical trigger name — the reconcile key
      "template": "templates/producer.md",
      "cron": "{{MIN}} * * * *",              // {{MIN}} = (minBase + runner offset) % 60
      "minBase": 45,
      "allowedTools": ["Bash", "Read", "Glob", "Grep"],
      "model": "claude-sonnet-5",             // default; Step 1 lets the user override
      "extraSources": ["Owner/other-repo"],   // additional git sources → per-trigger scope (see doctrine below)
      "clearMcpConnections": true,            // script-only routines don't need inherited MCP connectors
      "singleton": true,                      // team should run exactly one — affects Step 1 default
      "singletonProbe": "some read-only shell command",  // optional; output shown to inform the default
      "defaultOn": false,                     // Step 1 pre-selection when the runner has no existing trigger
      "vars": { "ENV": ["test", "staging"] }, // extra template placeholders; user picks/notes a value in Step 1
      "localOnly": false,                     // true = never a cloud trigger (crontab only), e.g. GC jobs
      "local": {                              // optional local-crontab form of this routine
        "command": "bun scripts/foo.ts",      // run inside the dedicated checkout; pure-script routines skip `claude -p`
        "lockName": "foo.lock"
      },
      "envPrereqs": ["Network Access: *.example.dev", "env var FOO_BAR (optional)"],
      "note": "one per team; shown in Step 1 option description"
    }
  ]
}

Read the full file on GitHub · 263 lines

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. 5d ago First seen · 263 lines · 164 tokens per session scan B 6f5ba4fbd3be

Subscribe to this mod's changes

setup-routines is a skill published in the GitHub repository ArcBlock/agent-skills (5 stars, last pushed 4d ago), licensed MIT. It adds 164 tokens to every session and 3,815 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.