Agent skill

Celery Tasks

by cohen-liel in cohen-liel/hivemind

Celery background task patterns for Python apps. An agent skill from cohen-liel/hivemind.

Apache-2.0Auto-check passedBackend & APIs

Install Celery Tasks

skills CLI
$ npx skills add cohen-liel/hivemind --skill celery-tasks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cohen-liel/hivemind celery-tasks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/celery-tasks .claude/skills/celery-tasks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
celery-tasks
GitHub stars
110
Token cost
~1.1k tokens
SKILL.md length
80 words
Files
1
Skills in repo
33
Repo updated
First seen
Licence
Apache-2.0

At a glance

Celery background task patterns for Python apps. An agent skill from cohen-liel/hivemind.

  • Implementing background jobs
  • SKILL.md covers Setup, Task Patterns, Calling Tasks and Scheduled Tasks (Celery Beat), plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Scheduled tasks

What it does

Celery Tasks is an agent skill from cohen-liel/hivemind. Celery background task patterns for Python apps. Use when implementing background jobs, scheduled tasks, email sending, image processing, or any async work that shouldn't block a web request.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Background jobs and Scheduled and recurring tasks. It works with Python. The repository describes itself as: One prompt. A full AI engineering team. Go lie on the couch. 🧠. The licence is Apache-2.0.

When your agent uses it

  • Implementing background jobs
  • Scheduled tasks
  • Image processing
  • Any async work that shouldnt block a web request

Example prompts

  • “/celery-tasks”

Requirements

  • Python 3
  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit 918dd9b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Celery Tasks loads about 1.1k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 80 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cohen-liel/hivemind at commit 918dd9b, republished under its Apache-2.0 licence (© cohen-liel). 80 words, ~1,089 tokens.

Download SKILL.mdSave it as .claude/skills/celery-tasks/SKILL.md (or your agent's skills folder).
name
celery-tasks
description
Celery background task patterns for Python apps. Use when implementing background jobs, scheduled tasks, email sending, image processing, or any async work that shouldn't block a web request.

Celery Background Tasks

Setup

python
# celery_app.py
from celery import Celery
from kombu import Queue

celery = Celery(
    "myapp",
    broker=settings.REDIS_URL,
    backend=settings.REDIS_URL,
    include=["app.tasks.email", "app.tasks.processing"],
)

celery.conf.update(
    task_serializer="json",
    result_serializer="json",
    accept_content=["json"],
    timezone="UTC",
    task_track_started=True,
    task_acks_late=True,          # Re-queue if worker crashes
    worker_prefetch_multiplier=1,  # Fair distribution
    task_queues=[
        Queue("high", routing_key="high"),
        Queue("default", routing_key="default"),
        Queue("low", routing_key="low"),
    ],
    task_default_queue="default",
    # Retry policy
    task_max_retries=3,
    task_soft_time_limit=300,   # 5 min warning
    task_time_limit=600,        # 10 min hard kill
)

Task Patterns

python
# tasks/email.py
from celery import shared_task
from celery.utils.log import get_task_logger

logger = get_task_logger(__name__)

@shared_task(
    bind=True,
    max_retries=3,
    default_retry_delay=60,  # 1 min between retries
    queue="high",
)
def send_welcome_email(self, user_id: int, email: str, name: str):
    try:
        logger.info(f"Sending welcome email to {email}")
        result = email_service.send(
            to=email,
            template="welcome",
            context={"name": name},
        )
        logger.info(f"Email sent: {result.id}")
        return {"status": "sent", "message_id": result.id}
    except EmailServiceError as exc:
        logger.warning(f"Email failed (attempt {self.request.retries + 1}): {exc}")
        raise self.retry(exc=exc, countdown=60 * (2 ** self.request.retries))  # exponential backoff

@shared_task(queue="low", rate_limit="10/m")
def generate_thumbnail(image_path: str, sizes: list[tuple[int, int]]):
    """Rate-limited to 10/min — heavy CPU task."""
    for w, h in sizes:
        img = Image.open(image_path)
        img.thumbnail((w, h))
        img.save(f"{image_path}_{w}x{h}.jpg", optimize=True, quality=85)

Calling Tasks

python
# Fire and forget
send_welcome_email.delay(user.id, user.email, user.name)

# With explicit queue
send_welcome_email.apply_async(
    args=[user.id, user.email, user.name],
    queue="high",
    countdown=5,         # delay 5 seconds
    expires=3600,        # discard if not run within 1h
)

# Chain: run tasks in sequence
from celery import chain
result = chain(
    resize_image.s(image_path),
    upload_to_s3.s(bucket="uploads"),
    notify_user.s(user_id=user.id),
).delay()

# Group: run tasks in parallel
from celery import group
job = group(
    send_welcome_email.s(u.id, u.email, u.name)
    for u in new_users
)
job.apply_async()

Scheduled Tasks (Celery Beat)

python
from celery.schedules import crontab

celery.conf.beat_schedule = {
    "cleanup-expired-sessions": {
        "task": "app.tasks.cleanup.remove_expired_sessions",
        "schedule": crontab(minute=0, hour=3),  # Daily at 3am
    },
    "send-digest-emails": {
        "task": "app.tasks.email.send_weekly_digest",
        "schedule": crontab(day_of_week="monday", hour=9, minute=0),
    },
}

Docker Compose Setup

yaml
worker:
  build: .
  command: celery -A app.celery_app worker --loglevel=info --concurrency=4 -Q high,default,low
  env_file: [.env]
  depends_on: [redis]

beat:
  build: .
  command: celery -A app.celery_app beat --loglevel=info
  env_file: [.env]
  depends_on: [redis]

flower:
  build: .
  command: celery -A app.celery_app flower --port=5555
  ports: ["5555:5555"]

Rules

  • Always use bind=True + self.retry() for retryable tasks (email, API calls)
  • Never put database sessions in tasks — create fresh session inside task
  • Use queues to prioritize: high (user-facing), default, low (batch)
  • task_acks_late=True + worker_prefetch_multiplier=1 for reliability
  • Idempotent tasks: safe to run twice (check if already done before acting)
  • Log task start, success, and failure with task ID for debugging
  • Monitor with Flower (web dashboard) or Datadog/Grafana

© cohen-liel, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/celery-tasks of cohen-liel/hivemind.

Open the folder on GitHubat commit 918dd9b

Compare with similar skills

Celery Tasks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Celery Tasks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Celery Tasks this skillcohen-liel/hivemind110—~1.1kAutomated safety check: PassApache-2.0
Sentry Python SDKgetsentry/sentry-for-ai268—~4.1kAutomated safety check: PassApache-2.0
AI Automation WorkflowsNeverSight/learn-skills.dev2161 repos~2.6kAutomated safety check: PassNone
Trigger.dev Configurationpapermark/papermark9.2k—~1.2kAutomated safety check: PassCustom licence
NubaseOtterMind/Nubase623—~2.2kAutomated safety check: NotesApache-2.0
Trigger.dev Background Taskspapermark/papermark9.2k—~2.1kAutomated safety check: PassCustom licence

Similar skills

  • Sentry Python SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Python. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~4.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • AI Automation Workflows

    NeverSight/learn-skills.dev

    Build automated AI workflows combining multiple models and services.

    216 GitHub starsUsed in 1 repo~2.6k tokens
    Productivity & AutomationAuto-check passed
  • Trigger.dev Configuration

    papermark/papermark

    Configures Trigger.dev projects through trigger.config.ts, with build extensions for Prisma, Playwright, Puppeteer, FFmpeg, Python and system packages.

    9.2k GitHub stars~1.2k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Nubase

    OtterMind/Nubase

    A skill your agent uses when the user mentions Nubase broadly, wants a backend for an AI-generated app, or needs to deploy/publish generated code online — across Database, Auth, Storage, Assets…

    623 GitHub stars~2.2k tokensUpdated 11 days ago
    Backend & APIsAuto-check: notes
  • Trigger.dev Background Tasks

    papermark/papermark

    Guides building durable background tasks, scheduled jobs and queues with Trigger.dev, including retries, waits, idempotency and concurrency limits.

    9.2k GitHub stars~2.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • K8e Sandbox

    xiaods/k8e

    Run a goal end to end inside an isolated K8E sandbox pod (gVisor / Kata / Firecracker) instead of on the host: exec bash / Python / Node / TypeScript, install packages, move files in and out, reuse…

    500 GitHub stars~6k tokensUpdated 11 days ago
    Backend & APIsAuto-check passed

More from cohen-liel/hivemind

All 33 skills in this repo
  • API Design

    cohen-liel/hivemind

    REST API design principles and best practices. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~857 tokensUpdated 5 mo ago
    Auto-check passed
  • Async Python

    cohen-liel/hivemind

    Python asyncio patterns for high-performance async code. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~992 tokensUpdated 5 mo ago
    Auto-check passed
  • Docker Deployment

    cohen-liel/hivemind

    Docker, docker-compose, and deployment configuration best practices.

    110 GitHub stars~674 tokensUpdated 5 mo ago
    Auto-check passed
  • E2E Testing

    cohen-liel/hivemind

    End-to-end testing patterns with Playwright. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~1.2k tokensUpdated 5 mo ago
    Auto-check passed
  • Email Service

    cohen-liel/hivemind

    Email sending patterns for transactional and marketing emails.

    110 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Article Writing

    cohen-liel/hivemind

    Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance.

    110 GitHub starsUsed in 8 repos~786 tokens
    Auto-check passed

Works with

Categories

Questions about Celery Tasks

What does Celery Tasks do?

Celery background task patterns for Python apps. An agent skill from cohen-liel/hivemind. Celery Tasks is an agent skill from cohen-liel/hivemind. Celery background task patterns for Python apps.

When should I use Celery Tasks?

Celery Tasks fits situations like: implementing background jobs; scheduled tasks; image processing; any async work that shouldnt block a web request.

How do I install Celery Tasks in Claude Code?

Run `npx skills add cohen-liel/hivemind --skill celery-tasks -a claude-code`. Or copy the skill folder (.claude/skills/celery-tasks in cohen-liel/hivemind) into .claude/skills/celery-tasks in your project. Claude Code loads it when a task matches its description.

How do I install Celery Tasks in Codex?

Run `npx skills add cohen-liel/hivemind --skill celery-tasks -a codex`. Or copy the skill folder (.claude/skills/celery-tasks in cohen-liel/hivemind) into .agents/skills/celery-tasks in your project. Codex loads it when a task matches its description.

Can I use Celery Tasks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cohen-liel/hivemind --skill celery-tasks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/celery-tasks, .gemini/skills/celery-tasks, .github/skills/celery-tasks and .opencode/skills/celery-tasks in your project.

What does Celery Tasks need to run?

SKILL.md names no scripts, command-line tools or credentials: Celery Tasks is instructions for the agent only. Our summary lists: Python 3; Docker.

Does Celery Tasks access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Celery Tasks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Celery Tasks use?

Celery Tasks is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Celery Tasks use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Celery Tasks?

Skills that share tags, products or a category with Celery Tasks: Sentry Python SDK (getsentry/sentry-for-ai, 268 stars), AI Automation Workflows (NeverSight/learn-skills.dev, 216 stars), Trigger.dev Configuration (papermark/papermark, 9.2k stars) and Nubase (OtterMind/Nubase, 623 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Celery Tasks?

cohen-liel (a GitHub user) maintains it in cohen-liel/hivemind, which has 110 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on April 18, 2026.

Source: cohen-liel/hivemind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.