async-systems

async-systems is a skill for Claude Code, Codex from kreek/consult. It costs 23 tokens per session (900 once invoked), scanned A, original, MIT.

Guidance for designing and reviewing systems that do work in the background or handle many tasks at once. It covers queues, streams, live updates, task cancellation, retries, ordering, and limits on incoming work.

In plain words
What is it for?
Use it when building or reviewing background jobs, message queues, event streams, pub/sub systems, or live updates such as polling, SSE, and WebSockets.
Why use it?
It makes hidden decisions about ownership, task lifetime, overload, and failure handling explicit. This helps diagnose stuck tasks, races, deadlocks, growing memory use, and lost or repeated messages.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/kreek/consult/async-systems
Any agent
npx skills add kreek/consult --skill async-systems
Clone the repo
git clone --depth 1 https://github.com/kreek/consult

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 async-systems

README.md
[![agentmods](https://agentmods.dev/badge/skills/kreek/consult/async-systems.svg)](https://agentmods.dev/skills/kreek/consult/async-systems)
Your own site
<a href="https://agentmods.dev/skills/kreek/consult/async-systems"><img src="https://agentmods.dev/badge/skills/kreek/consult/async-systems.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00023 $0.00900
Opus 5 $0.00012 $0.00450
Sonnet 5 $0.00005 $0.00180
Haiku 4.5 $0.00002 $0.00090

Measured today against content hash 115a81e77585, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

async-systems 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 today.

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.

agents/.agents/skills/async-systems/SKILL.md · 80 lines

How it starts

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

Async Systems

Iron Law

EVERY ASYNC BOUNDARY NAMES OWNERSHIP, LIFETIME, BACKPRESSURE, AND FAILURE SEMANTICS.

When to Use

  • Designing or reviewing async execution, background work, live updates, streams, brokers, ordering, and backpressure.
  • Investigating races, deadlocks, stuck tasks, starvation, retry exhaustion, dead jobs, lag, poison messages, or delivery issues.

When NOT to Use

  • Request/response API design; use api.
  • Remote-call timeout and retry policy; use error-handling.
  • Metrics, alerts, runbooks; use observability.
  • Transaction isolation; use database.

Rules

  1. For user-facing live updates, start with polling, SSE, or WebSockets. Escalate to Kafka, Kinesis, or Redis Streams only after naming the requirement the simpler transport cannot meet: independent replay, long retention, audit history, offline catch-up, multi-service fanout, consumer-group scaling, partitioned throughput, or durable recovery. Record that requirement with the choice.
  2. Immutable data crosses async boundaries; mutable state has one owning scope. Job payloads carry stable identifiers and immutable inputs, never live session, request, or thread-local state.
  3. Every spawned task belongs to a scope that cancels, awaits, or supervises it, with a deterministic shutdown path.
  4. Every queue, channel, pool, stream, and buffer has a bound and an overflow policy. Blocking work cannot starve latency-sensitive work.
  5. Locks are an escape hatch: short, globally ordered, and never held across I/O, awaits, or user callbacks.
  6. Retried jobs and stream consumers are idempotent, deduplicated, or marked non-retryable with a reason. Retry policy itself belongs to error-handling.
  7. Event schemas are contracts: versioned, consumer-compatible, and routed through contract-first when durable. Delivery guarantee, ordering key, retention, replay, ack/offset, DLQ, and poison-message handling are explicit for streams.
  8. Silent async failure is a bug. Exhausted jobs, lag, dropped events, and dead work have visible signals and tests.

Read the full file on GitHub · 80 lines

Files

What ships with it

2 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.

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. today Changed · -62 lines 115a81e77585
  2. 4d ago First seen · 142 lines · 23 tokens per session scan A 2165e803a3f1

Subscribe to this mod's changes

async-systems is a skill published in the GitHub repository kreek/consult (1 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 900 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

migrate

Inventory an existing spec-driven project and apply bounded migrations to jig defaults: report, adopt-layout, rename-decisions, split-slices, slice-to-spec, seed-decisions, and copy-machinery. Use when the user says migrate this project to jig, adopt jig here, this repo already has specs — set up jig, scaffold-init…

ramboz/jig · 151 tokens

bug-fix

Drive the teeth-gated lifecycle for reported defects: diagnose root cause, prove it, and prevent regression through REPORTED → DIAGNOSING → ROOTCAUSED → FIXING → REVIEWED → DONE, with VERIFIED, ESCALATED, and RESOLVEDONMAIN paths where needed. Auto-fires on fix this bug, debug this, root-cause this, this regressed…

ramboz/jig · 208 tokens

adr-workflow

Scaffold, accept, index, and link Architectural Decision Records (ADRs). Use when the user says "write an ADR", "record this decision", "resolve [deferred item] with an ADR", "supersede ADR-NNNN", or otherwise wants to capture a hard-to-reverse decision in docs/decisions/. Also use when a refinement-todo entry needs…

ramboz/jig · 122 tokens

analyze

Cross-artifact consistency report for jig specs — a non-destructive six-category audit at CRITICAL/HIGH/MEDIUM/LOW severity, covering duplication, ambiguity, underspecification, principle violations, coverage gaps, and terminology drift. Auto-triggers when you say analyze this spec, check for inconsistencies, audit…

ramboz/jig · 160 tokens

explain

Explain jig vocabulary and artifacts in plain language. Three modes: term mode defines one lexicon term; artifact mode walks through a spec or ADR and its linked references; passage mode explains pasted jig output. Output is ephemeral (chat-only). Auto-triggers when you say explain this term, walk me through this…

ramboz/jig · 173 tokens

reframe

Re-baseline a jig corpus onto a moved load-bearing reference by drafting a keystone ADR and an affected-artifact disposition manifest. Use when a vendor/API contract moved and specs and decisions must be re-anchored. Auto-triggers when you say reframe onto this, we changed direction, the design moved, or re-baseline…

ramboz/jig · 175 tokens