bullmq-jobs

bullmq-jobs is a skill for Claude Code from lukasrepublic/agentic-foundry. It costs 0 tokens per session (1,516 once invoked), scanned A, original, MIT.

A guide for building BullMQ background jobs, where work is placed on a queue and processed later by a worker. It covers producers, workers, retries, duplicate-prevention keys, failed-job queues, and queue health checks.

In plain words
What is it for?
Use it when adding queue producers or workers, setting retry behavior, designing idempotency keys that prevent duplicate processing, configuring a dead-letter queue, or monitoring queue counts.
Why use it?
It gives developers a consistent way to handle work that should not block a web request. It also addresses repeated jobs, retries, and failed work that needs inspection.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the foundry plugin — 81 skills, 8 agents, 8 hooks, 1 MCP server shipped together

Good fit Use it when adding queue producers or workers, setting retry behavior, designing idempotency keys that prevent duplicate processing, configuring a dead-letter queue, or monitoring queue counts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lukasrepublic/agentic-foundry/bullmq-jobs
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.

Any agent
npx skills add lukasrepublic/agentic-foundry --skill bullmq-jobs
Clone the repo
git clone --depth 1 https://github.com/lukasrepublic/agentic-foundry

Made for: Claude Code.

Or install foundry, the plugin that ships this one along with the rest of its 81 skills, 8 agents, 8 hooks, 1 MCP server.

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 bullmq-jobs

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/bullmq-jobs/github.svg)](https://agentmods.dev/skills/lukasrepublic/agentic-foundry/bullmq-jobs)
Your own site
<a href="https://agentmods.dev/skills/lukasrepublic/agentic-foundry/bullmq-jobs"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/bullmq-jobs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bullmq-jobs

Your own site · 80×15
<a href="https://agentmods.dev/skills/lukasrepublic/agentic-foundry/bullmq-jobs"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/bullmq-jobs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,516 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.01516
Opus 5 $0.00000 $0.00758
Sonnet 5 $0.00000 $0.00303
Haiku 4.5 $0.00000 $0.00152

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

Security

Grade A, and why

bullmq-jobs 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 11d 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.

packs/stack-profiles/node-web/blueprints/bullmq-jobs/SKILL.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to trigger

  • Authoring producer-side queue.add() calls inside a route handler or service.
  • Authoring a queue worker (Worker) class to process a queue.
  • Designing or modifying retry policy (backoff, max attempts).
  • Idempotency-key design for a job type.
  • Configuring a dead-letter queue (DLQ) for failed jobs.
  • Queue health monitoring (active, waiting, failed counters).

Procedure

  1. Queue definition in src/queues/<name>.ts: export a singleton Queue instance with the queue name as a typed constant. The cache/Redis connection is imported from the shared connection module — never inline a connection string.

  2. Producer call in the route handler or service:

    await queue.add(JOB_NAME, data, {
      jobId: deriveIdempotencyKey(data),
      attempts: 3,
      backoff: { type: 'exponential', delay: 1000 },
    });
    

    Every queue.add() call has a jobId (idempotency key). Add a // dispatched-to: <queue-name> comment so the consumer is traceable from the producer.

  3. Consumer in src/workers/<name>.worker.ts: export a Worker instance wrapping the queue name and a processor function. The processor receives a Job<DataType> and returns a result or throws on unrecoverable failure.

  4. Retry policy — defaults: exponential backoff, 3 attempts. { attempts: 3, backoff: { type: 'exponential', delay: 1000 } } means: first retry after 1 s, second after 2 s, third after 4 s. Override per spec when the job has different SLA requirements.

  5. Idempotency key: derive deterministically from the job payload so that retrying the same logical operation does not produce duplicate side effects. Example: jobId = \-${entityId}-${dateStr}`` for a recurring ingestion job. Document the derivation strategy in a comment.

  6. DLQ pattern: configure removeOnFail: false and a failed event listener that logs the failure and — for critical queues — publishes to an alerting channel. For spec-defined critical queues, a separate DLQ queue (<name>-dlq) receives failed jobs after max attempts via a manual failed event handler.

Read the full file on GitHub · 82 lines

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. 11d ago First seen · 82 lines · 0 tokens per session scan A f437ecf2c929

Subscribe to this mod's changes

bullmq-jobs is a skill published in the GitHub repository lukasrepublic/agentic-foundry (1 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,516 tokens. 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.