designing-a-job-queue

designing-a-job-queue is a skill for Claude Code, Codex from New1Direction/korgex. It costs 21 tokens per session (361 once invoked), scanned A, original, MIT.

A design for processing slow or delayed work with a queue and worker processes. A queue stores jobs until a worker can handle them reliably.

In plain words
What is it for?
Use it for background tasks that need retries, duplicate-safe processing, failure handling, time limits, concurrency limits, and monitoring.
Why use it?
It keeps long-running work out of the request path and prevents retries, crashes, or overloaded services from losing or duplicating jobs unnoticed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for background tasks that need retries, duplicate-safe processing, failure handling, time limits, concurrency limits, and monitoring.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/new1direction/korgex/designing-a-job-queue
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 New1Direction/korgex --skill designing-a-job-queue
Clone the repo
git clone --depth 1 https://github.com/New1Direction/korgex

Made for: Claude Code, Codex.

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 designing-a-job-queue

README.md
[![agentmods](https://agentmods.dev/badge/skills/new1direction/korgex/designing-a-job-queue.svg)](https://agentmods.dev/skills/new1direction/korgex/designing-a-job-queue)
Your own site
<a href="https://agentmods.dev/skills/new1direction/korgex/designing-a-job-queue"><img src="https://agentmods.dev/badge/skills/new1direction/korgex/designing-a-job-queue.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 361 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.00021 $0.00361
Opus 5 $0.00010 $0.00180
Sonnet 5 $0.00004 $0.00072
Haiku 4.5 $0.00002 $0.00036

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

Security

Grade A, and why

designing-a-job-queue 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 8d 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.

src/skills_builtin/designing-a-job-queue/SKILL.md · 26 lines

What it actually says

When work is slow, scheduled, or should survive a restart, push it to a queue and process it with workers. The hard part isn't enqueuing — it's reliability.

  1. Make jobs idempotent. A job WILL run more than once (retries, redelivery, crashes). Design so running it twice is safe — key on a stable id, check "already done" before acting.
  2. At-least-once, not exactly-once. Assume duplicates and out-of-order delivery; exactly-once is largely a myth. Idempotency (point 1) is how you cope.
  3. Acknowledge after success. Mark a job done only once the work committed. If a worker dies mid-job, the un-acked job should redeliver, not vanish.
  4. Bound retries + dead-letter. Retry with backoff up to a limit; send permanent failures to a dead-letter queue for inspection — never retry forever.
  5. Visibility/lease timeouts. A claimed job must reappear if the worker stalls; tune the lease so it doesn't double-run a still-healthy job.
  6. Backpressure + concurrency limits. Cap workers so the queue can't overwhelm downstream (the DB, an API). Monitor depth and age — a growing backlog is a signal.
  7. Observe it (see observability-and-logging): job counts, failures, latency, queue depth. A silent queue is a queue you'll discover broken too late.
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. 8d ago First seen · 26 lines · 21 tokens per session scan A d2e38a47abc6

Subscribe to this mod's changes

designing-a-job-queue is a skill published in the GitHub repository New1Direction/korgex (5 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 361 once invoked, about $0.0001 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.

Related

Other skills, from other repositories