setup-celery

setup-celery is a skill for Claude Code, Codex from arunanksharan/claude-forge. It costs 75 tokens per session (632 once invoked), scanned A, original, Unlicense.

A setup guide for Celery, a Python system that runs background jobs outside a web request, with Redis used to pass jobs to workers. It covers FastAPI, Django and Flask applications.

In plain words
What is it for?
Use it to configure workers, queues, retries, scheduled tasks, monitoring with Flower and system services, and to connect background tasks to application routes or services.
Why use it?
It prevents slow or heavy work such as email delivery and CPU-intensive processing from blocking web requests, while adding retries and scheduled jobs.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/arunanksharan/claude-forge/setup-celery
Any agent
npx skills add arunanksharan/claude-forge --skill setup-celery
Clone the repo
git clone --depth 1 https://github.com/arunanksharan/claude-forge

Made for: Claude Code, Codex.

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 setup-celery

README.md
[![agentmods](https://agentmods.dev/badge/skills/arunanksharan/claude-forge/setup-celery.svg)](https://agentmods.dev/skills/arunanksharan/claude-forge/setup-celery)
Your own site
<a href="https://agentmods.dev/skills/arunanksharan/claude-forge/setup-celery"><img src="https://agentmods.dev/badge/skills/arunanksharan/claude-forge/setup-celery.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 632 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00075 $0.00632
Opus 5 $0.00037 $0.00316
Sonnet 5 $0.00015 $0.00126
Haiku 4.5 $0.00007 $0.00063

Measured 5d ago against content hash d03449937730, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

setup-celery 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 5d 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.

.claude/skills/setup-celery/SKILL.md · 40 lines

What it actually says

Set Up Celery for Background Jobs (claudeforge)

Follow async-and-queues/celery.md (deeper) and backend/fastapi/05-async-and-celery.md. Steps:

  1. Confirm with user:
    • Existing app (FastAPI / Django / Flask)?
    • Use cases: emails, scheduled jobs, heavy CPU work?
    • Already have Redis? If not, set up via Docker compose first.
  2. Install + configure:
    • Add celery[redis]>=5.4 and redis>=5.2 to pyproject.toml
    • Create workers/celery_app.py with the locked config (acks_late, prefetch=1, max_tasks_per_child, queue routing, beat schedule)
    • Update env to include REDIS_URL
  3. Define tasks:
    • Create workers/{feature}_tasks.py per feature
    • Each task: @celery_app.task(bind=True, autoretry_for=..., retry_backoff=True, max_retries=5)
    • Idempotency: every task either checks a DB flag, uses an idempotency key, or is naturally idempotent. Do not skip this.
    • For async DB operations: wrap in asyncio.run(...) inside the task
  4. Wire into the app:
    • Add task.delay(args) calls from routes/services
    • Don't put heavy work directly in route handlers
  5. Run workers:
    • Dev: celery -A {{project-slug}}.workers.celery_app worker -Q emails -c 4 -n emails@%h
    • Plus separate worker per queue, plus exactly one beat
  6. Production setup:
    • systemd template ({{project-slug}}[email protected]) so you can systemctl enable {{project-slug}}-worker@emails
    • Or Docker Compose with separate worker services per queue
    • Configure beat with persisted schedule file
  7. Monitoring:
    • Install Flower: flower --basic-auth=admin:CHANGEME --port=5555 (lock down with auth + IP filter)
    • Add OpenTelemetry: CeleryInstrumentor().instrument()
    • Add Sentry: CeleryIntegration() in sentry_sdk.init
  8. Verify: enqueue a test task from a route, observe it process, confirm metric/trace appears.

Always make tasks idempotent. Always run exactly one beat. Always split queues by SLA.

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. 5d ago First seen · 40 lines · 75 tokens per session scan A d03449937730

Subscribe to this mod's changes

setup-celery is a skill published in the GitHub repository arunanksharan/claude-forge (2 stars, last pushed 4mo ago), licensed Unlicense. It adds 75 tokens to every session and 632 once invoked, about $0.0004 per session on Opus 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-31.

Related

Other skills, from other repositories

pinecone

Managed vector DB for production RAG and search.

NousResearch/hermes-agent · 13 tokens

redis-inspect

Inspect Redis cache keys, values, and TTLs for debugging. Supports both main cache and system cache. Use for debugging cache issues, checking cached values, and monitoring cache state. Read-only by default.

civitai/civitai · 45 tokens

redis-js

Work with the Upstash Redis JavaScript/TypeScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text search (querying, filtering, aggregating with @upstash/redis search extension), and all Redis data structures. Supports automatic serialization/deserialization…

upstash/redis-js · 93 tokens

using-redis-token-buckets

Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…

PostHog/posthog-foss · 148 tokens

byted-milvus

Manages Milvus on Volcano Engine (Volcengine): provision/inspect/scale/delete clusters and run collection + CRUD/search operations via bundled CLIs. Use when the user mentions Milvus + Volcengine/Volcano Engine or asks to operate Milvus there.

bytedance/agentkit-samples · 60 tokens

vector-db

Vector database expert for embeddings, similarity search, RAG patterns, and indexing strategies.

RightNow-AI/openfang · 19 tokens