ruvnet avatar

Loop Worker

This sets up background workers that run on Claude Code's native loop scheduling, keeping your prompt cache warm with carefully timed 270 second intervals. You dispatch workers through MCP hooks for things like security audits, performance optimization, or test coverage analysis, then schedule the next iteration with ScheduleWakeup. The delay formula is tuned to stay under cache TTL so you're not burning tokens on cold starts. Eight preconfigured workers are included, from predictive preloading to auto-documentation. If you're already using Ruflo and want continuous background tasks without manual triggering, this handles the scheduling mechanics for you.

skills.sh installs
745
GitHub stars
81.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add ruvnet/ruflo --skill loop-worker --agent claude-code

Installs into .claude/skills of the current project.

Files

Use /loop for in-session periodic workers. Pick the delay from what you are waiting for:

  • With the 5-minute prompt-cache TTL, min(270, cache_ttl * 0.9) = 270s keeps the cache warm (ruflo-autopilot ADR-0001 owns that heartbeat).
  • If the ScheduleWakeup tool description says this session uses the 1-hour TTL, a 270s wake buys nothing; poll at 1200-1800s unless the worker finishes faster.

Dispatch a worker via MCP: mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch({ trigger: "WORKER_NAME" }). It runs in the background by default (background: true), so check on it with hooks_worker-status instead of waiting inline.

Then schedule the next iteration. ScheduleWakeup needs the loop prompt back so the next firing re-enters the loop: ScheduleWakeup({ delaySeconds: 270, reason: "next WORKER_NAME iteration", prompt: "/loop <the same /loop input>", noop: false })

Stop the loop when the worker reports nothing new twice in a row: ScheduleWakeup({ stop: true }).

Available Workers (12, per ADR-0001 and /ruflo-loop)

Sponsors

Details

Repository
github.com/ruvnet/ruflo
Category
Backend & APIs
First seen
Jun 3, 2026

More from ruvnet/ruflo

All 236
1alirezarezvani avatardatabase-schema-designeralirezarezvani/claude-skillsUse when the user asks to create ERD diagrams, normalize database schemas, design table relationships, or plan schema migrations.722skills.sh installs
2vercel avatarwrite-api-referencevercel/next.jswrite api reference706skills.sh installs
3aaronontheweb avatardatabase-performanceaaronontheweb/dotnet-skillsDatabase access patterns for performance. Separate read/write models, avoid N+1 queries, use AsNoTracking, apply row limits, and never do application-side joins700skills.sh installs
4aaronontheweb avatarapi-designaaronontheweb/dotnet-skillsDesign stable, compatible public APIs using extend-only design principles. Manage API compatibility, wire compatibility, and versioning for NuGet packages and d690skills.sh installs
5mindrally avatarviewcomfy-api-rulesmindrally/skillsExpert guidance for integrating ViewComfy API into web applications using Python and FastAPI686skills.sh installs
6bellopushon avatarwhatsapp-cloud-apibellopushon/whatsapp-cloud-apiwhatsapp cloud api684skills.sh installs