scheduled-task-resilience

scheduled-task-resilience is a skill for Claude Code from desplega-ai/agent-swarm. It costs 48 tokens per session (1,796 once invoked), scanned A, original, MIT.

Rules for safely polling scheduled jobs and waiting for long-running work such as CI, builds, deployments, or browser tasks.

In plain words
What is it for?
Use them when checking asynchronous APIs or waiting for scheduled tasks, especially when the operation may take several minutes.
Why use it?
They reduce the risk of lost work, duplicate results, heartbeat failures, and sessions ending while an external job is still running.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agent-swarm plugin — 31 skills, 11 commands, 5 agents, 6 hooks, 1 MCP server shipped together

Good fit Use them when checking asynchronous APIs or waiting for scheduled tasks, especially when the operation may take several minutes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/desplega-ai/agent-swarm/scheduled-task-resilience
About the project

Agent Swarm is a self-hosted operating system for coordinating AI agents as a company-wide workforce. A lead agent assigns work to workers running in isolated containers, while shared memory, tools, schedules, workflows, and review gates preserve and manage that work. The catalogue entries provide agents, commands, skills, hooks, and other extensions for operating the system.

desplega-ai/agent-swarm · 1,024 stars · on GitHub · agent-swarm.dev

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 desplega-ai/agent-swarm --skill scheduled-task-resilience
Clone the repo
git clone --depth 1 https://github.com/desplega-ai/agent-swarm

Made for: Claude Code.

Or install agent-swarm, the plugin that ships this one along with the rest of its 31 skills, 11 commands, 5 agents, 6 hooks, 1 MCP server.

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-resilience

README.md
[![agentmods](https://agentmods.dev/badge/skills/desplega-ai/agent-swarm/scheduled-task-resilience/github.svg)](https://agentmods.dev/skills/desplega-ai/agent-swarm/scheduled-task-resilience)
Your own site
<a href="https://agentmods.dev/skills/desplega-ai/agent-swarm/scheduled-task-resilience"><img src="https://agentmods.dev/badge/skills/desplega-ai/agent-swarm/scheduled-task-resilience/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scheduled-task-resilience

Your own site · 80×15
<a href="https://agentmods.dev/skills/desplega-ai/agent-swarm/scheduled-task-resilience"><img src="https://agentmods.dev/badge/skills/desplega-ai/agent-swarm/scheduled-task-resilience.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,796 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00048 $0.01796
Opus 5.5 $0.00019 $0.00718
Sonnet 5.5 $0.00010 $0.00359
Haiku 4.5 $0.00005 $0.00180

Measured 2mo ago against content hash f57f5f4157c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

scheduled-task-resilience 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 2mo 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.

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.

templates/skills/scheduled-task-resilience/SKILL.md · 103 lines

How it starts

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

Scheduled Task Resilience

Use these rules whenever a scheduled or regular task polls or waits on a long-running operation. They prevent heartbeat collisions, lost work, duplicate delivery, and sessions that fail after holding an external job open too long.

Rule 1 — Never use ScheduleWakeup with delaySeconds >= 300

The runtime heartbeat staleness threshold may sit near the same window as the model prompt-cache TTL. Sleeping for five minutes or longer can therefore look like a dead worker and cause the heartbeat sweep to fail the task mid-poll.

Instead:

  • For waits under four minutes, run one bounded sleep of at most 240 seconds followed by a single status check, as one shell call, then return control to the agent turn.
  • Never batch sleeps into a single shell invocation. A loop of five 240-second sleeps blocks the session for twenty minutes with no opportunity to record progress — the same staleness failure ScheduleWakeup causes, just spelled differently.
  • Between cycles, record progress as described in Rule 3, then start the next cycle in the next turn.
  • For genuinely long waits such as CI builds, releases, or deploys, prefer a durable workflow or a follow-up task over ScheduleWakeup.

Aggregate every check run before you decide the poll is over. Reading a single row such as .[0].state reports one check and can look terminal while another required check is still pending or failing.

# ONE cycle per agent turn. Resolve PR_NUMBER from the current task or repository context.
sleep 240
if out=$(gh pr checks "$PR_NUMBER" --json name,state,bucket \
      --jq 'if   any(.[]; .bucket == "pending") then "PENDING"
            elif any(.[]; .bucket == "fail" or .bucket == "cancel") then "FAILING"
            else "PASSED" end' 2>&1); then
  echo "$out"
else
  case "$out" in
    *"no checks reported"*) echo "PENDING" ;;  # no check contexts yet — not a failure
    *) echo "$out" >&2; exit 1 ;;              # real gh error: auth, network, bad PR
  esac
fi

Read the full file on GitHub · 103 lines

Files

What ships with it

2 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. 2mo ago First seen · 103 lines · 48 tokens per session scan A f57f5f4157c0

Subscribe to this mod's changes

scheduled-task-resilience is a skill published in the GitHub repository desplega-ai/agent-swarm (1,024 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 1,796 once invoked, about $0.0002 per session on Opus 5.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-30.

Related

scheduled-task-resilience compared with skills from other repositories

scheduled-task-resilience next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
scheduled-task-resiliencedesplega-ai/agent-swarmSkill1.0ktodayMITA48Claude Code
security-observabilityalibaba/anolisaSkill6031mo agoApache-2.0A145Claude Code, Codex
add-backendalibaba/anolisaSkill6031mo agoApache-2.0A46Claude Code
skill-ledgeralibaba/anolisaSkill6031mo agoApache-2.0A67Claude Code, Codex
pr-bodyalibaba/anolisaSkill6031mo agoApache-2.0A68Claude Code, Codex
regex-masteryalibaba/anolisaSkill6031mo agoApache-2.0A60Claude Code, Codex
prompt-scanneralibaba/anolisaSkill6031mo agoApache-2.0A103Claude Code, Codex