api-design
This skill should be used when the user needs to "design the API", do "endpoint design", pin down a "request/response shape",โฆ
This skill should be used when the user designs a "task scheduler", "job scheduler", "job queue", "cron at scale", "distributed cron", "delayed / scheduled / recurring tasks", a "worker pool", reaches for "Celery / Sidekiq / Airflow", or wrestles with "task leasing", visibility
Claude Code
$ npx -y skills add proyecto26/system-design-skills --skill task-scheduling --agent claude-code
Codex
$ npx skills add proyecto26/system-design-skills --skill task-scheduling -a codex -y
Cursor
$ npx skills add proyecto26/system-design-skills --skill task-scheduling -a cursor -y
Gemini CLI
$ npx skills add proyecto26/system-design-skills --skill task-scheduling -a gemini-cli -y
GitHub Copilot
$ npx skills add proyecto26/system-design-skills --skill task-scheduling -a github-copilot -y
OpenCode
$ npx skills add proyecto26/system-design-skills --skill task-scheduling -a opencode -y
Windsurf
$ npx skills add proyecto26/system-design-skills --skill task-scheduling -a windsurf -y
name: task-scheduling description: This skill should be used when the user designs a "task scheduler", "job scheduler", "job queue", "cron at scale", "distributed cron", "delayed / scheduled / recurring tasks", a "worker pool", reaches for "Celery / Sidekiq / Airflow", or wrestles with "task leasing", visibility timeouts, job priorities, fairness, or duplicate task execution. Use it whenever work must run later, on a schedule, or be reliably leased to a pool of workers, even if the user doesn't say "scheduler". (For plain queue transport and delivery guarantees, that is `messaging-streaming`.)
Decide *when* work runs and *which worker* runs it: fire jobs on a schedule (cron/delayed/recurring), hand each job to exactly one worker via a lease, and make sure it completes once despite crashes and retries. This sits *on top of* `messaging-streaming` queues โ the queue is the transport; this skill adds the scheduling, leasing, priorities, and task-level idempotency. Getting it wrong shows up as jobs that never run, run twice (double charge, double email), or pile up until a worker fleet falls permanently behind.
Work must run **later** (send a reminder in 24h), **on a schedule** (nightly rollups, hourly cron), or **repeatedly** (poll every 5 min); a slow operation is already off the request path (โ `messaging-streaming`) and now needs reliable allocation to a pool of workers; jobs need **priorities** (paid before free) or **fairness** (no single tenant starves others); or a job must complete **exactly once** even though the worker holding it can crash mid-flight.
The caller needs the result inline โ that's a synchronous call, not a scheduled job. A single fire-and-forget async step with no schedule, priority, or exactly-once need โ a plain queue + idempotent consumer (`messaging-streaming`) is simpler; don't add a scheduler on top. One periodic job on one box โ OS `cron` is fine until you have multiple schedulers or need history and retries. A long-running multi-step saga with rollback โ reach for a durable workflow engine instead of hand-rolling state across jobs. Don't stand up Airflow/Celery "because we'll have batch jobs eventually" (YAGNI): it's a stateful control plane to operate and monitor.
recurring (every N), or event-driven (a queue message arrives)? This decides whether a scheduler is even in scope.
or harmless (idempotent recompute)? Drives the leasing + dedup design.
its time, or is "within a few minutes" fine? Tight timing is more expensive.
job class be prevented from starving the rest? (โ `back-of-the-envelope` for arrival vs. service rate.)
lease length and whether long jobs need heartbeats.
(The key contract is owned by `api-design`.)
**Scheduling trigger**
when* one node, a handful of jobs, no HA requirement.
jobs into a queue; followers stand by. *Use when* the schedule must survive a node loss and must not double-fire.
until due (delivery delay, sorted-set scoring, or a timer wheel). *Use when* per-job delays vary and you don't want a cron tick.
history (Airflow-style). *Use when* batch pipelines have dependencies and you need a run history and reruns.
**Worker allocation**
**visibility timeout**, and ack/delete on success. *Use when* you want back-pressure for free and elastic, self-balancing workers. The default.
*Use when* affinity/locality matters (a job must run where its data is).
**Priority & fairness**
some classes must run first.
queues. *Use when* one tenant's burst must not starve others.
| Option | What it solves | What it worsens | Change it when | |---|---|---|---| | OS cron / single scheduler | Trivial; zero infra | SPOF โ node dies, schedule stops; no retry/history | You need HA or missed-run recovery โ distributed scheduler | | Distributed scheduler (HA cron) | Survives node loss; no double-fire (leader-elected) | Needs leader election (โ `consistency-coordination`); more moving parts | One box and one job is enough โ OS cron | | Delay queue / timer | Per-job delays without a cron tick; precise-ish timing | Far-future jobs sit in the queue; timer accuracy bounded by poll interval | Delays are uniform/periodic โ cron; dependencies exist โ DAG | | Workflow DAG (Airflow-style) | Dependencies, backfill, run history, reruns | Heavy control plane; scheduler latency; overkill for single jobs | Jobs are independent one-shots โ plain queue + scheduler | | Pull (worker leasing) | Self-balancing, elastic, natural back-pressure | At-least-once: lease expiry on a slow job re-runs it (need idempotency) | A job must run on a specific node (data locality) โ push | | Push (dispatcher) | Affinity/locality; central control | Dispatcher is a bottleneck/SPOF; must track worker health | No locality need โ pull is simpler | | Priority
Made in code with Remotion โ the same scenes power the site's hero (site/src/motion/). Design scalable systems the way strong engineers actually do โ by reasoning, not by memorizing diagrams.
This skill should be used when the user needs to "design the API", do "endpoint design", pin down a "request/response shape",โฆ
This skill should be used when a system design needs a diagram โ "draw the architecture", "diagram this system", "show theโฆ
This skill should be used when the user needs to "estimate QPS", "back-of-the-envelope" (BOTEC) numbers, "how much storage /โฆ
This skill should be used when the user wants a "blob store" or "object storage", names "S3" or an S3-compatible store, needs toโฆ
This skill should be used when the user asks about a "caching strategy", "cache invalidation", "what to cache", "read-through vsโฆ
This skill should be used when the user asks about the "CAP theorem", "PACELC", a "consistency model", "eventual vs strongโฆ
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, orโฆ
Ask which skill or flow fits your situation. A router over the skills in this repo.