bull-mq
You are an expert in BullMQ, the high-performance job queue for Node.js built on Redis. You help developers build reliable background processing systems with delayed jobs, rate limiting, prioritization, repeatable cron jobs, job dependencies, concurrency control, and dead-letter handling — powering email sending, image processing, webhook delivery, report generation, and any async workload.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o bull-mq.zip https://jpskill.com/download/14708.zip && unzip -o bull-mq.zip && rm bull-mq.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14708.zip -OutFile "$d\bull-mq.zip"; Expand-Archive "$d\bull-mq.zip" -DestinationPath $d -Force; ri "$d\bull-mq.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
bull-mq.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
bull-mqフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
BullMQ — Redis-Based Job Queue for Node.js
You are an expert in BullMQ, the high-performance job queue for Node.js built on Redis. You help developers build reliable background processing systems with delayed jobs, rate limiting, prioritization, repeatable cron jobs, job dependencies, concurrency control, and dead-letter handling — powering email sending, image processing, webhook delivery, report generation, and any async workload.
Core Capabilities
Queue and Worker
import { Queue, Worker, QueueScheduler, FlowProducer } from "bullmq";
import IORedis from "ioredis";
const connection = new IORedis({ host: "localhost", port: 6379, maxRetriesPerRequest: null });
// Define queue
const emailQueue = new Queue("email", { connection });
// Add jobs
await emailQueue.add("welcome", {
to: "user@example.com",
template: "welcome",
data: { name: "Alice" },
}, {
priority: 1, // Lower = higher priority
attempts: 3, // Retry up to 3 times
backoff: { type: "exponential", delay: 2000 },
removeOnComplete: { count: 1000 }, // Keep last 1000 completed
removeOnFail: { age: 7 * 24 * 3600 }, // Keep failed for 7 days
});
// Delayed job
await emailQueue.add("reminder", { userId: 42 }, {
delay: 24 * 60 * 60 * 1000, // 24 hours from now
});
// Repeatable (cron)
await emailQueue.add("digest", {}, {
repeat: { pattern: "0 9 * * 1" }, // Every Monday at 9 AM
});
// Worker
const worker = new Worker("email", async (job) => {
switch (job.name) {
case "welcome":
await sendEmail(job.data.to, job.data.template, job.data.data);
break;
case "reminder":
await sendReminderEmail(job.data.userId);
break;
case "digest":
await sendWeeklyDigest();
break;
}
// Progress reporting
await job.updateProgress(100);
return { sent: true, timestamp: Date.now() };
}, {
connection,
concurrency: 5, // Process 5 jobs simultaneously
limiter: { max: 100, duration: 60000 }, // Rate limit: 100 jobs/min
});
worker.on("completed", (job, result) => console.log(`Job ${job.id} completed`));
worker.on("failed", (job, err) => console.error(`Job ${job?.id} failed: ${err.message}`));
Job Flows (Parent-Child Dependencies)
const flow = new FlowProducer({ connection });
await flow.add({
name: "generate-report",
queueName: "reports",
data: { reportId: "monthly-2026-03" },
children: [
{ name: "fetch-sales", queueName: "data", data: { source: "sales" } },
{ name: "fetch-users", queueName: "data", data: { source: "users" } },
{ name: "fetch-metrics", queueName: "data", data: { source: "metrics" } },
],
// Parent job runs only after ALL children complete
});
Installation
npm install bullmq ioredis
Best Practices
- Separate workers — Run workers in separate processes/containers from your API; scale independently
- Idempotent jobs — Design jobs to be safely retried; use unique job IDs to prevent duplicates
- Backoff strategy — Use exponential backoff for retries; prevents thundering herd on downstream failures
- Rate limiting — Use
limiterto respect API rate limits (email providers, webhooks, external APIs) - Progress tracking — Use
job.updateProgress()for long-running jobs; clients can poll progress - Graceful shutdown — Call
worker.close()on SIGTERM; finishes current jobs before exiting - Flows for pipelines — Use FlowProducer for job dependencies; parent waits for all children to complete
- Monitor with Bull Board — Use
@bull-board/expressfor a web UI showing queue status, job data, and failures