Skip to content
Back to skills

Agent Routines

ASecurity

Create and manage routines — work this agent runs by itself on a schedule, once later, or every N minutes.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgogit

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add denya/bb-plugin-agents --skill agent-routines --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Routines?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Routines
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/denya-agent-routines/badge)](https://www.skillsdirectory.com/skills/denya-agent-routines)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-routines
description: Create and manage routines — work this agent runs by itself on a schedule, once later, or every N minutes.
---

# Routines

A routine is work you run by yourself: "every Sunday at 9 check…", "tomorrow at 18:30 remind me to…", "every 4 hours look at…". Each run is a background worker that gets the routine's brief plus your role, notes, working state and bindings. Its result comes to the chat as a card, then to you as a wake.

1. *When.* The user asks for something on a schedule, at a later time, or regularly → `agents_routine_save`. Only on their own message, or on their approval relayed to you by another agent (their words quoted in the request, or their delegate): then do it, no second question. A wake or a routine turn cannot create, change, resume, delete or run one (its probe is the exception: 10b).
2. *The time.* You turn their words into `when`; the system does the arithmetic. Use the `Now:` line in the state block for today's date, weekday and zone.
   - "every Sunday at 9" → `{type:"cron", cron:"0 9 * * 0"}`; "on weekdays at 8:30" → `"30 8 * * 1-5"`; "on the first of the month at 10" → `"0 10 1 * *"`.
   - "tomorrow at 18:30" → `{type:"once", at:"2026-11-30T18:30"}` (local wall time, no offset); "in two hours" → `{type:"once", inMinutes:120}`.
   - "every 4 hours" → `{type:"interval", everyMinutes:240}`.
   - "when the thread «Release build» fails" / "if this thread breaks" → `{type:"thread", thread:"Release build"}` (a piece of the title, or the thread id). Only a thread bound to you; the tool lists your bound threads when nothing matches. A run starts when that thread ends in an error, at most once an hour; it gets the thread's title, id and error text as data.
   - "on a signal from a script" / "when I run it with a command" → `{type:"hook"}`: no schedule; it runs only on `bb agents routine fire <slug> "<title>"`, at most once an hour.
   - A different zone only when the user names one (`timezone: "Europe/Moscow"`).
3. *The brief.* Write it for a stranger who runs it unattended: what to check, where (paths, threads, sites), what counts as worth reporting, what the result should look like. Leave out "every Sunday": the schedule is not part of the brief. `label` is the schedule in the user's words and language.
4. *Full rights, no messages to people.* A run does everything you do on the user's direct request: opens sites, logs in through the browser and 1Password, clicks, fills forms, runs scripts, uploads to the user's own Drive (owner 02.12). It never sends a message to another person (chat, email, post, comment, invite, share) and never deletes the user's data: it drafts that; you show the draft and act only after the user says yes in the chat, through normal work. Never promise the user that a routine will send or post something. Code work from a run (or from work it started or asked for) goes only into a folder bound to this agent in its settings that is a git repository root (never a folder of repositories such as ~/code): `where: write` on that folder, `where: edit` on its project or `where: reuse` of a thread's workspace of that project; the plugin refuses any other folder, another thread's workspace and code work in the personal workspace.
5. *Echo.* After a save, answer in one line with the first run and the zone from the tool's reply: "Every Sunday at 9:00 (Europe/Madrid), first on 6 December." This catches a misheard time. For a thread or hook routine, name the thread or the command instead.
   *A site that needs a login* (a school portal, a bank, a government site): save with `computer: true`. Each run then gets your own browser, and logins come from the user's 1Password vault without the user typing anything. The brief names the site; it never asks the user for a password. When you change such a routine, pass `computer: true` again (the list marks it "browser"). Runs stop while the Mac sleeps or before the user logs in to macOS.
6. *Quiet runs.* By default (`report: "when-something"`) a run that finds nothing leaves no card. Use `report: "always"` only when the user wants a sign every time.
7. *Wake.* With `wake` on (default) you get each result. Act on it: tell the user what matters in a line, or start the next step as work, or reply [[silent]] if the card says it all. In that turn you cannot authorise anything, pick a model, start work that wakes you again, or change a routine except pause it. Nothing goes into the user's own threads from that turn, except threads on the routine's send list: when the user, in their own message, says a routine's findings go into a thread of theirs ("put it straight into the sale's master thread"), save `threadSendTargets: ["thr_…"]` on it. Then its run's wake may `agents_thread_send` that thread (the plugin sends the run's result word for word under its own header; you add nothing) or `agents_thread_ask` it; the send check still reads each message. Only the user changes the list (`[]` clears it); never from a wake, a delegation or the command line.
8. *Limits.* At most every 15 minutes; 30 runs a day per agent and 60 across all agents by default; up to 12 routines per agent. A save over a limit is refused with the numbers: tell the user and offer a less frequent schedule. When the tool answers `needsConfirmation` (runs under an hour apart), show the user the preview and save again with `confirmed: true` only after their yes.
9. *Managing.* "what regular jobs do you have" → `agents_routines`, then name them by title and schedule, never by id. "pause it / turn it back on / delete it / run it now" → `agents_routine_do` with `pause`, `resume`, `delete` or `run`. To change the time or the brief, `agents_routine_save` with the routine's `id` and the full new fields. A change the user asks for («fix the routine», «move it to 8») you save yourself in that same turn; never start work for it. Work may diagnose a routine and return proposed fields; you then save them in the user's next message.
9a. *New and off.* A routine listed as "off: new, waits for the user" was added from the command line and never turned on. You cannot turn it on, not even in the user's message: tell them to press Turn on in your Routines panel (or «Turn on selected» in the «New routines wait for you» block, all at once), which is their approval. Do not save a copy of it with `agents_routine_save`.
10. *Failures.* Three failed runs in a row pause a routine; the chat shows why. A run that cannot start for a reason a retry does not fix pauses it at once. While a run's question waits for the user, scheduled runs skip, and a question unanswered for 24 h counts as a failed run. Resume it only when the user asks, after the cause is fixed.
10a. *Watching chats (probes).* "check my buyers' chats every 15 minutes", "tell me when X writes on WhatsApp, Telegram or by mail" → a routine with `probe` and `when: {type:"hook"}` (or a slow daily cron as a heartbeat for what the watch list misses). The probe checks the named chats every `everyMinutes` (default 5, 1–60) without a model and starts the run only when a watched chat got a new incoming message; a quiet chat costs nothing. Sources: `{kind:"wa-db", jids:[…@s.whatsapp.net, …@g.us]}` (the WhatsApp MCP store) and `{kind:"tg-archive", path:"…/imported/latest.db", chatIds:[…]}` (a telegram-archive archive; one source per account) and `{kind:"gmail", from:["a@x.com","@firm.es"], terms:["Acme","lease"]}` (Gmail through the gws CLI, the account gws is logged in to; senders and words matched by Gmail's own search, ≤ 20 senders, ≤ 10 terms; both empty = any incoming mail). Look the JIDs and chat ids up yourself first (WhatsApp MCP `list_chats`, the archive's `chat_id`); name chats, never "all chats". At most 3 sources, 20 statically named chats each. For a Telegram archive the user's routine may choose `chats: {list:"lists/chats.txt"}` or `chats: {exclude:"lists/excluded.txt", privateOnly:true}` instead of `chatIds`. A local skill maintains the file under its agent's own folder, with one chat ID per line and optional # comments. At most 200 IDs are used. Only the bound archive is searched, and the classifier still needs the user's approval for that account. Probe runs have their own limits (5 min between runs, slower from 4 an hour, 48 a day per routine, 96 per agent, no night pause) and need no confirmation. Echo the tool's `probe` line: which chats, how often. The run gets the batch as data: per chat the range «after X up to Y» and, for Gmail, the message ids; it reads them with its own tools (mail: `gws gmail users messages get --params '{"userId":"me","id":"<id>","format":"full"}'`); anything newer comes in the next run. A run waits until a watched chat has been quiet for 2 minutes, and while the user is writing there (an outgoing message newer than the last incoming one, under 10 minutes old), but never more than 30 minutes after the oldest waiting message; a poke goes at once. The run's payload names the user's own work of the last 15 minutes and asks it to end with `STATUS: nothing` when a task already covers the messages or they hold only thanks, a greeting or an emoji. A write to the WhatsApp store wakes the probe within about a minute. Telegram: a quick id stream from the archive wakes the run within about a minute; when that stream is down, the archive snapshot every 5 minutes brings it in 5–15 minutes. `probe: null` removes it. An outside script can wake a probe with `bb agents routine poke <slug> "<title>"`. When saving a probe routine, write in its brief what to do with requests from senders (report only, or which follow-up is allowed).
11. *Thread-failure runs.* The brief says what to do when the thread fails: read its log (`bb thread log <id>`), find the cause, draft a fix or a note. The run never writes into that thread or restarts it. Your own work threads and other plugins' threads cannot be watched.
When an explicitly approved outbound task sends to a Telegram or WhatsApp chat watched with `includeOwner`, record its connector receipt with `bb agents probe sent <scope> <chat> <message-id>`. The scope is `tg:<archive path>` or `wa:<messages.db path>`. Use the exact returned ID and the account that sent it. This keeps that one outgoing message from starting a probe. A report sent to the routine's BB thread list needs no Telegram or WhatsApp receipt.

10b. *Probe on your own routine, no user message.* Attaching, changing or removing the probe of one of YOUR OWN existing routines is technical work (owner 02.12): `agents_routine_probe` with the routine's id or title and `probe` (`null` removes it), from any turn: the user's, a wake, a routine run's turn, another agent's request. Your worker does the same with `bb agents routine probe '<title or id>' --probe '<json>'` (or `--off`). It never touches the routine's brief or schedule. Another agent's routine (`agent`) only as in 10d. Only incoming messages wake a probe; the user's own messages in a watched chat never do.
10c. *Passing findings on.* A routine run, and work it started, may ask another agent directly (`agents_ask` in its wake, `bb agents ask` from its worker), e.g. money items found in a chat go to the agent that keeps the money. The ask goes as data from a routine (no approvals ride on it); one hop, no ask back to the agent that asked, and the per-matter ask limit still hold. Use the ask, not `bb agents handoff`: a routine run's result itself is still not handed on.
10d. *Other agents' routines.* When the user tells you to fix other agents' routines («make X's and Y's routines stop clashing»), do it yourself: `agents_routines` with `agent` to read them, then `agents_routine_save`, `agents_routine_do` or `agents_routine_probe` with `agent`. Never send the user to each agent. Without the user's own message or their relayed approval, another agent's routines stay as they are; ask that agent with agents_ask, quoting the user's words, and it applies the change without asking the user again.
12. *Not routines.* A one-off task now is normal work (`agents_task_start`). Webhooks, file changes and "when a thread finishes" are not available yet: say so.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.