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 dkmqflx/nestjs-best-practices-plugin --skill nestjs-caching-queuesgit clone --depth 1 https://github.com/dkmqflx/nestjs-best-practices-pluginWrote 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/dkmqflx/nestjs-best-practices-plugin/nestjs-caching-queues)<a href="https://agentmods.dev/skills/dkmqflx/nestjs-best-practices-plugin/nestjs-caching-queues"><img src="https://agentmods.dev/badge/skills/dkmqflx/nestjs-best-practices-plugin/nestjs-caching-queues/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/dkmqflx/nestjs-best-practices-plugin/nestjs-caching-queues"><img src="https://agentmods.dev/badge/skills/dkmqflx/nestjs-best-practices-plugin/nestjs-caching-queues.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00063 | $0.00776 |
| Opus 5 | $0.00032 | $0.00388 |
| Sonnet 5 | $0.00013 | $0.00155 |
| Haiku 4.5 | $0.00006 | $0.00078 |
Grade A, and why
nestjs-caching-queues 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 12d 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 — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NestJS Caching & Queues
Best practices for two related NestJS performance techniques: caching (@nestjs/cache-manager, backed by Keyv/Redis) and background-job queues (@nestjs/bullmq, backed by Redis). Caching avoids recomputing or re-fetching hot data; queues move slow or unreliable work off the request path so HTTP responses stay fast. Both are Redis-backed in production and share the same core concern: predictable behavior under load and failure.
Verified against the NestJS v10/v11 docs (techniques/caching, techniques/queues). Note the units gotcha: cache TTLs are in milliseconds since @nestjs/cache-manager v2 / cache-manager v5+.
When to Apply
Reference these rules when:
- Registering
CacheModuleor injectingCACHE_MANAGER/ usingCacheInterceptor - Choosing a cache store (in-memory dev vs. Redis prod via
@keyv/redis) - Setting or debugging cache TTLs and cache invalidation
- Deciding whether work belongs inline or in a queue (email, image/video processing, external API calls)
- Wiring
BullModule,@InjectQueue, or a@Processorconsumer - Configuring retries/backoff, or scaling workers as a separate deployment
Rules
| Rule | Impact | Topic |
|---|---|---|
cache-module-setup |
HIGH | Register CacheModule globally; in-memory for dev, Redis for prod |
set-sensible-ttl |
HIGH | Always set a TTL (in ms); never leave caches unbounded |
cache-keys-explicit |
HIGH | Deterministic, namespaced keys; invalidate on writes |
offload-heavy-work-to-queues |
CRITICAL | Move slow/external work off the request path into a queue |
idempotent-processors |
CRITICAL | Processors must tolerate retries and duplicate deliveries |
retries-and-backoff |
HIGH | Configure attempts + exponential backoff for transient failures |
separate-worker-process |
MEDIUM | Run consumers as a separate process/deployment for scaling & isolation |
How to Use
- Caching first. Start with
cache-module-setup, then applyset-sensible-ttlandcache-keys-explicitto every cached value — a cache without a TTL or an invalidation story is a correctness bug, not just a performance one. - Queues for anything slow or flaky. Apply
offload-heavy-work-to-queuesto decide what to enqueue, thenidempotent-processorsandretries-and-backoffto make the consumer safe to re-run. These two are CRITICAL: BullMQ retries and at-least-once delivery mean a non-idempotent processor will double-charge, double-send, or corrupt data. - Scale out. Apply
separate-worker-processwhen CPU-bound jobs threaten the event loop or you need to scale producers and consumers independently.
What ships with it
7 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.
- 12d ago First seen · 46 lines · 63 tokens per session scan A 63c64b41585c
nestjs-caching-queues is a skill published in the GitHub repository dkmqflx/nestjs-best-practices-plugin (1 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 776 once invoked, about $0.0003 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.
Other skills, from other repositories
bullmq-specialist
BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications. Use when: bullmq, bull queue, redis queue, background job, job queue.
ts-db-perf
Optimize TypeScript code that interacts with databases. Use this skill when the user wants to fix N+1 queries, add caching, improve transaction safety, prevent race conditions, simplify async flows, or generally speed up a TypeScript backend. Triggers on phrases like "optimize", "slow query", "N+1", "race condition"…
performance-caching-rate-limits
Use this capability for performance optimization, load tests, k6/JMeter/Locust plans, caching, Redis, CDN, Cache-Control, invalidation, rate limiting, quotas, token bucket, sliding window, 429 behavior, abuse protection, and cost-based throttling.
Cache Strategy Consistency Guard
Detect undefined or inconsistent cache strategies (layers, consistency, invalidation, TTL, failure handling) in design documents.
caching-strategies
Implement effective caching at every layer: in-memory, Redis, CDN, and browser. Activate whenever the user asks about caching, performance optimization for repeated data access, Redis patterns, CDN configuration, cache invalidation, HTTP cache headers, memoization, or stale-while-revalidate strategies.
caching-strategy
Drupal cache API patterns including cache tags, cache contexts, max-age, render caching, and cache invalidation strategies. Use when implementing caching, debugging cache issues, or optimizing Drupal performance.