agentleFS
Yesterday-AIYesterday-AI/paperclip-plugin-company-wizard/.claude/skills/routines/SKILL.md

routines

Skill171 starsChanged 8 months agoMITView on GitHub

Set up and manage Paperclip Routines — recurring scheduled tasks that replace expensive always-on heartbeats. Use to create cron-based, webhook-triggered, or API-triggered routines for agents, reducing token spend while keeping agents responsive. Covers routine CRUD, triggers, concurrency policies, and suggested routine patterns for common agent roles.

  • Reads credentials
  • Sends data out

6 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions6 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 6

    1. anthropics/claude-plugins-official★ 47ksame name
    2. google/adk-recipes★ 11ksame name
    3. google/adk-samples★ 11ksame name
    4. ARCASSystems/FounderOS★ 7same name
    5. RumbleJack56/skills★ 2same name
    6. ClarvAI/job-search-hq★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create routine with webhook trigger

    line 202

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Routines — Recurring Agent Tasks

Routines are Paperclip's scheduling primitive. Instead of agents burning tokens on timer heartbeats polling for work, routines fire only when needed — on a cron schedule, webhook, or explicit API call — and create a targeted heartbeat run for the assigned agent.

Why Routines > Always-On Heartbeats

ApproachToken costResponsiveness
Heartbeat every 5 min~288 runs/day, most idleHigh but wasteful
Routines (cron + webhook)Only fires when scheduled or triggeredSame responsiveness, fraction of the cost

The key insight: clean up heartbeats = token reducing = cheaper.

Quick Start

1. Find your IDs

# Company ID
curl -s "$PAPERCLIP_API_URL/api/agents/me" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" | jq '.companyId, .id'

# Agents in company
curl -s "$PAPERCLIP_API_URL/api/companies/{companyId}/agents" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" | jq '.[] | {id, name, role}'

# Projects
curl -s "$PAPERCLIP_API_URL/api/companies/{companyId}/projects" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" | jq '.[] | {id, name}'

2. Create a routine

curl -s -X POST "$PAPERCLIP_API_URL/api/companies/{companyId}/routines" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Daily standup check",
    "description": "CEO reviews all in_progress issues and nudges stalled agents",
    "assigneeAgentId": "{ceo-agent-id}",
    "projectId": "{project-id}",
    "priority": "medium",
    "status": "active",
    "concurrencyPolicy": "skip_if_active",
    "catchUpPolicy": "skip_missed"
  }'

3. Add a cron trigger

curl -s -X POST "$PAPERCLIP_API_URL/api/routines/{routineId}/triggers" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "schedule",
    "cronExpression": "0 9 * * 1-5",
    "timezone": "Europe/Amsterdam"
  }'

4. Or add a webhook trigger (for external events)

curl -s -X POST "$PAPERCLIP_API_URL/api/routines/{routineId}/triggers" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "webhook",
    "signingMode": "bearer"
  }'

The response includes a publicId and signing secret. External systems POST to: POST /api/routine-triggers/public/{publicId}/fire

5. Manual run (testing)

curl -s -X POST "$PAPERCLIP_API_URL/api/routines/{routineId}/run" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source": "manual"}'

Suggested Routine Patterns

CEO Agent

RoutineScheduleWhy
Morning standup0 9 * * 1-5Review stalled issues, nudge idle agents, check backlog health
End-of-day wrap0 17 * * 1-5Summarize progress, update roadmap, plan tomorrow
Weekly retro0 10 * * 1Run retrospective, check velocity trends
Backlog grooming0 14 * * 3Ensure 3+ unassigned issues exist, create from roadmap if needed

Engineer Agent

RoutineScheduleWhy
PR check0 */4 * * 1-5Check for review comments, merge approved PRs
CI/deploy monitorwebhookTrigger on GitHub Actions / Railway deploy events
Dependency audit0 10 * * 1Weekly check for outdated/vulnerable deps

PM Agent

RoutineScheduleWhy
Triage new issues0 9,14 * * 1-5Prioritize and assign incoming issues
Sprint review0 16 * * 5Friday sprint summary
Stakeholder update0 11 * * 3Mid-week status digest

Cross-cutting

RoutineScheduleWhy
GitHub webhook relaywebhookOn push/PR events, wake the engineer
Sentry/error alert relaywebhookOn new error, wake the engineer
Daily backup verification0 3 * * *Verify latest DB backup is fresh

Concurrency Policies

Choose based on routine behavior:

PolicyUse when
coalesce_if_active (default)Idempotent checks — if agent is already running, the new trigger adds nothing
skip_if_activeSame as coalesce but cleaner — just drop it
always_enqueueEvery trigger matters (e.g., each webhook payload is unique work)

Catch-Up Policies

PolicyUse when
skip_missed (default)Agent was down; the missed check isn't worth running late
enqueue_missed_with_capMissed runs should still execute (e.g., missed deploy checks)

Managing Routines

# List all routines
curl -s "$PAPERCLIP_API_URL/api/companies/{companyId}/routines" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" | jq '.[] | {id, title, status, assigneeAgentId}'

# Pause a routine
curl -s -X PATCH "$PAPERCLIP_API_URL/api/routines/{routineId}" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "paused"}'

# Resume
curl -s -X PATCH "$PAPERCLIP_API_URL/api/routines/{routineId}" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "active"}'

# Archive (permanent)
curl -s -X PATCH "$PAPERCLIP_API_URL/api/routines/{routineId}" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "archived"}'

# Check run history
curl -s "$PAPERCLIP_API_URL/api/routines/{routineId}/runs?limit=10" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" | jq '.[] | {id, status, createdAt}'

# Update trigger schedule
curl -s -X PATCH "$PAPERCLIP_API_URL/api/routine-triggers/{triggerId}" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cronExpression": "0 10 * * 1-5"}'

# Disable a trigger without deleting
curl -s -X PATCH "$PAPERCLIP_API_URL/api/routine-triggers/{triggerId}" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'

# Delete a trigger
curl -s -X DELETE "$PAPERCLIP_API_URL/api/routine-triggers/{triggerId}" \
  -H "Authorization: Bearer $PAPERCLIP_API_KEY"

Webhook Integration Examples

GitHub → Engineer wake on push

  1. Create routine with webhook trigger
  2. In GitHub repo settings → Webhooks, add:
    • URL: {PAPERCLIP_PUBLIC_URL}/api/routine-triggers/public/{publicId}/fire
    • Content type: application/json
    • Events: Push, Pull request
    • Secret: the signing secret from trigger creation

Railway → Engineer wake on deploy

Same pattern — Railway supports deploy webhooks that POST to your routine trigger URL.

Agent Access Rules

OperationAgent (own)Agent (other)Board
List / Getyesyes (read-only)yes
Createyes (self-assign only)noyes
Updateyesnoyes
Triggers CRUDyesnoyes
Manual runyesnoyes
Reassignnonoyes

Migration: Heartbeat → Routines

To convert an always-on heartbeat agent to routine-based:

  1. Identify the agent's recurring tasks from their HEARTBEAT.md
  2. Create a routine for each distinct recurring concern (standup, triage, deploy check, etc.)
  3. Add appropriate triggers — cron for time-based, webhook for event-based
  4. Reduce or stop the heartbeat interval — routines handle the scheduling now
  5. Keep one low-frequency fallback heartbeat (e.g., every 2 hours) as a safety net for anything routines don't cover
  6. Monitor run history to verify routines fire correctly before fully removing heartbeats

Full API Reference

See skills/paperclip/references/api-reference.md for the complete endpoint list and the Routines API doc at docs/api/routines.md in the Paperclip source.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.