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.
npx skills add zhe-qi/clhoria-template --skill bullmqgit clone --depth 1 https://github.com/zhe-qi/clhoria-templateWrote 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.
[](https://agentmods.dev/skills/zhe-qi/clhoria-template/bullmq)<a href="https://agentmods.dev/skills/zhe-qi/clhoria-template/bullmq"><img src="https://agentmods.dev/badge/skills/zhe-qi/clhoria-template/bullmq/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.
<a href="https://agentmods.dev/skills/zhe-qi/clhoria-template/bullmq"><img src="https://agentmods.dev/badge/skills/zhe-qi/clhoria-template/bullmq.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.02389 |
| Opus 5 | $0.00023 | $0.01195 |
| Sonnet 5 | $0.00009 | $0.00478 |
| Haiku 4.5 | $0.00005 | $0.00239 |
Grade A, and why
bullmq 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 13d 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.
How it starts
The opening of the file, as written. The whole thing — 321 lines — stays where its author put it; the contents beside it link to each section on GitHub.
BullMQ 队列任务开发指南
技术栈
- 队列系统: BullMQ v5.16.0+
- 类型安全: TypeScript + Zod 运行时验证
- Effect 集成: Effect 系统封装(Promise → Effect)
- Redis: ioredis (
maxRetriesPerRequest: null) - UI 监控: Bull Board (Hono adapter)
文件结构
src/lib/
├── enums/bullmq.ts # 队列和任务名称枚举
├── infrastructure/
│ ├── bullmq/
│ │ └── job-registry.ts # 类型映射和 Zod 验证
│ ├── bullmq-adapter.ts # QueueManager 核心类
│ └── effect/services/bullmq.ts # Effect Layer
│ └── bootstrap.ts # Worker 注册位置
src/routes/admin/
└── queue-board.index.ts # Bull Board UI 路由
核心规则(MANDATORY)
三层类型安全架构
- 编译时约束:
QueueJobsMapping确保队列只能使用特定 job name - 类型推断:
JobDefinitionRegistry自动推断 job data 类型 - 运行时验证:
JobSchemaRegistry使用 Zod 验证数据
命名约定
- 队列名称:小写字母(
email、cleanup,不用EMAIL_QUEUE) - 任务名称:kebab-case(
send-welcome、daily-cleanup) - 常量枚举:对象字面量 +
as const(不用enum) - 索引签名:
[JobName.XXX]: Schema形式
数据验证规则
- 所有 job data 必须有对应的 Zod schema
- Schema 必须包含中文错误消息
- 日期格式:ISO 8601 字符串(
2024-01-01T00:00:00Z) - 日期字符串:YYYY-MM-DD 格式
- UUID:使用
z.uuid()验证
Effect 使用规范
- 所有异步操作使用 Effect 封装(
Effect.tryPromise) - 同步操作使用
Effect.sync - 错误统一返回
Error类型 - Worker 注册使用
Effect.sync(立即返回 Worker 实例)
开发步骤
1. 添加新队列
- 在
src/lib/enums/bullmq.ts添加队列名称 - 在
job-registry.ts创建QueueJobsMapping映射(初始为never) - 注册 Worker(见步骤 3)
2. 添加新任务类型
- 在
src/lib/enums/bullmq.ts添加任务名称 - 在
job-registry.ts创建 Zod schema - 更新
JobDefinitionRegistry类型映射 - 更新
JobSchemaRegistry验证映射 - 更新
QueueJobsMapping关联队列
3. 注册 Worker
- 在应用启动时调用
queueManager.registerWorker - 实现 processor 函数(接收
Job<T>类型) - 可选配置:并发数、限流、重试策略
- Worker 自动验证 job data(无需手动验证)
4. 添加任务到队列
在业务代码中使用(无需创建文件):
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 13d ago First seen · 321 lines · 45 tokens per session scan A affb6c59df3f
bullmq is a skill published in the GitHub repository zhe-qi/clhoria-template (190 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 2,389 once invoked, about $0.0002 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-30.
Other skills, from other repositories
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…
spring-boot-cache
Provides patterns for implementing Spring Boot caching: configures Redis/Caffeine/EhCache providers with TTL and eviction policies, applies @Cacheable/@CacheEvict/@CachePut annotations, validates cache hit/miss behavior, and exposes metrics via Actuator. Use when adding caching to Spring Boot services, configuring…
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…
spring-data-redis
Use when implementing caching, session storage, rate limiting, or any Redis integration. Covers cache-aside pattern, key naming, TTL strategy, and serialization config.
background-job-orchestrator
Expert in background job processing with Bull/BullMQ (Redis), Celery, and cloud queues. Implements retries, scheduling, priority queues, and worker management. Use for async task processing, email campaigns, report generation, batch operations. Activate on "background job", "async task", "queue", "worker", "BullMQ"…
nw-sd-patterns
Core distributed systems patterns - load balancing, caching, sharding, consistent hashing, message queues, rate limiting, CDN, Bloom filters, ID generation, replication, conflict resolution, CAP theorem.