Command Palette

Search for a command to run...

Назад к скиллам
скилл № 72857

backend-background-jobs

Use when the user asks about background jobs, processing uploads in a background worker with retries, task queues, BullMQ, Sidekiq, Celery, dead letter queues…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить backend-background-jobs в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Backend Background Jobs

Purpose

Design reliable background job processing with queue topology, retry, concurrency, and monitoring. Every job must be idempotent, retryable, observable, and gracefully handled on failure.

Agent Protocol

Trigger

Exact user phrases: "background job", "task queue", "worker", "job processing", "cron job", "scheduled task", "async task", "job retry", "queue worker", "Sidekiq", "Celery", "Bull", "delayed job", "job priority", "job scheduling".

Input Context

  • Job types (fire-and-forget, delayed, scheduled, chained).
  • Queue backend (Redis, SQS, database table, RabbitMQ).
  • Job duration (affects concurrency and timeout).
  • Retry requirements (max retries, retry interval, irrecoverable failure definition).

Output Artifact

Job and worker design as formatted text.

Response Format

// Job contract (interface/type)
// Worker implementation outline
# Queue topology config
# Retry policy
# Concurrency rules

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output.

Completion Criteria

  • Job defined with idempotency key and full payload schema
  • Retry strategy with exponential backoff and jitter configured
  • Queue topology defined (default, priority, dead letter, scheduling queues)
  • Worker concurrency and graceful shutdown configured
  • Monitoring hooks for success/failure/metrics
  • Scheduled/cron jobs defined with timezone and error notification

Architecture Decision Trees

Queue Backend Selection

What infrastructure do you already have?
├── Redis already in stack?
│   ├── Jobs < 100KB, sub-minute duration?
│   │   ├── Yes → Bull/BullMQ (built-in priority, delay, DLQ)
│   │   └── No → Consider RabbitMQ for complex routing
│   └── Need persistence and high throughput?
│       └── Bull with Redis Cluster or SQS
├── AWS-native?
│   ├── Jobs fit in 256KB? → SQS (fully managed, unlimited throughput)
│   ├── Need FIFO ordering? → SQS FIFO (exactly-once, 300 TPS)
│   └── Need long-running jobs? → SQS + Step Functions
├── Need transactional consistency with DB?
│   └── Database-backed queue (simplest setup, no infra)
└── Need complex routing (topic exchanges, headers)?
    └── RabbitMQ

Job Type Decision Tree

Does the job need a response or callback?
├── Yes → Is it a multi-step workflow?
│   ├── Yes → Chained jobs with compensation/rollback
│   └── No → Fire-and-forget with monitoring
└── No → Should it run at a specific time?
    ├── Yes → Delayed job (scheduled execution)
    └── No → Should it run on a fixed schedule?
        ├── Yes → Scheduled (cron) job
        └── No → Fire-and-forget job

Retry Strategy Decision Tree

What happens when the job fails?
├── Is the error transient (timeout, network, 503)?
│   ├── Yes → Retry with exponential backoff (5-10 attempts)
│   └── No → Is the error a dependent service failure?
│       ├── Yes → Retry with longer backoff (10-25 attempts)
│       └── No → Non-recoverable → DLQ immediately
├── Does the job have side effects?
│   ├── Yes → Ensure idempotency before retrying
│   └── No → Safe to retry as-is
└── Is the job part of a chain?
    └── Rollback/compensate on failure, retry individual steps

Workflow

Step 1: Job Classification

Type Delivery Guarantee Max Delay Persistence Use Case
Fire-and-forget At-most-once None Optional Email notification, audit log
Delayed At-least-once Arbitrary Required Payment reminder in 24h
Scheduled (cron) At-least-once N/A Required Daily report generation
Recurring (interval) At-least-once N/A Required Health check every 5 min
Chained workflow Exactly-once Varies Required Order → payment → shipping

Fire-and-forget: no callback, best-effort delivery, highest throughput. Delayed: execute after N seconds/minutes using Redis sorted sets or SQS delay queues. Scheduled: cron expression, timezone-aware, prevents overlapping execution. Recurring: fixed interval, always runs regardless of previous success/failure. Chained: next job enqueued after previous completes, with compensation/rollback on failure.

Step 2: Queue Backend Selection

Feature Redis (Bull/BullMQ) SQS RabbitMQ Database (PG) Hangfire (.NET)
Throughput 10,000+/s Unlimited 10,000+/s Limited by DB 1,000+/s
Persistence Configurable Durable (multi-AZ) Durable Durable (ACID) Durable (ACID)
Delay support Built-in Via visibility timeout Via TTL+DLX Via scheduled_at col Built-in
Priority Built-in Via separate queues Per-queue Via ORDER BY Via queues
DLQ Built-in Built-in Via DLX status='failed' Built-in
Job dashboard Bull Board AWS Console Management UI Custom admin Hangfire Dashboard
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/background-jobs-advanced.md
  • references/background-jobs-chaining.md
  • references/background-jobs-fundamentals.md
  • references/job-monitoring.md
  • references/job-patterns.md
  • references/job-scheduling.md
  • references/job-testing.md
  • references/job-types.md
  • references/queue-setup.md

FAQ

Что делает скилл backend-background-jobs?

Use when the user asks about background jobs, processing uploads in a background worker with retries, task queues, BullMQ, Sidekiq, Celery, dead letter queues or worker concurrency. Produces idempotent job workers with retry policy. Not for cron schedules (use backend-scheduling-cron) or broker design (use backend-message-queue).

Как установить скилл backend-background-jobs?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл backend-background-jobs запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить backend-background-jobs с