async-reasoning

async-reasoning is a skill for Claude Code, Codex from Langerrr/zforge. It costs 121 tokens per session (1,229 once invoked), scanned A, original, MIT.

A coding skill for reasoning about data that is read and changed asynchronously, meaning different operations may finish at different times.

In plain words
What is it for?
Use it when designing or debugging state management, caching, optimistic updates, initialization, or any write-then-read flow across memory, storage, APIs, or databases.
Why use it?
It helps explain and prevent stale data, race conditions, incorrect startup order, and screens that show old values after a save.

Skill for Claude CodeCodex

Part of the zforge plugin — 13 skills, 8 commands, 2 agents shipped together

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/langerrr/zforge/async-reasoning
Any agent
npx skills add Langerrr/zforge --skill async-reasoning
Clone the repo
git clone --depth 1 https://github.com/Langerrr/zforge

Made for: Claude Code, Codex.

Or install zforge, the plugin that ships this one along with the rest of its 13 skills, 8 commands, 2 agents.

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-reasoning

README.md
[![agentmods](https://agentmods.dev/badge/skills/langerrr/zforge/async-reasoning.svg)](https://agentmods.dev/skills/langerrr/zforge/async-reasoning)
Your own site
<a href="https://agentmods.dev/skills/langerrr/zforge/async-reasoning"><img src="https://agentmods.dev/badge/skills/langerrr/zforge/async-reasoning.svg" alt="Measured on agentmods" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,229 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.00121 $0.01229
Opus 5 $0.00060 $0.00615
Sonnet 5 $0.00024 $0.00246
Haiku 4.5 $0.00012 $0.00123

Measured 3d ago against content hash dd20fb7746fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

async-reasoning 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 3d 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.

skills/async-reasoning/SKILL.md · 112 lines

How it starts

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

Async State Reasoning

When analyzing any state-changing operation in an async system, enumerate ALL concurrent timelines — not just the write path. Sequential chain-of-thought naturally traces one execution path at a time and misses the concurrent read paths that may return stale data, the initialization paths that haven't completed yet, and the observer actions triggered by intermediate state.

When to Apply

Apply when any of these conditions exist:

  • A write operation is followed by a read on a different path (API, cache, RPC, database)
  • Multiple data sources initialize at different times
  • State is derived from async sources and must stay consistent
  • An observer (process, human, AI agent) can act on intermediate or stale state
  • Data crosses a persistence boundary (memory ↔ storage ↔ network)

Core Analysis: Timeline Enumeration

After any state-changing operation, enumerate ALL concurrent timelines — not just the write path:

WRITE: Operation X changes state S
  Timeline 1 (write path): X confirms → S is updated at source
  Timeline 2 (cache read path): Query Q is polling/refetching → may return stale S
  Timeline 3 (derived state): Component C derives D from S → D is stale until S propagates
  Timeline 4 (observer): Actor A sees rendered/exposed S → acts on stale value

Enumerate as many timelines as exist — four shown here as common cases.

GAP: Between "write confirmed" and "all read paths return new value"
  → What happens in this gap on each timeline?
  → What can an observer do during this gap?
  → What irreversible action might be taken based on stale state?

If there is no gap on any path (fully synchronous, single-threaded, no cache), async reasoning is not needed. Stop here.

Analysis Steps

1. Data Flow Mapping

For each piece of state involved:

  • Where is the source of truth? (database, blockchain, server, local state)
  • What are all the read paths? (direct query, cache, derived state, rendered UI, agent observation)
  • What is the latency between write-at-source and read-back on each path?
  • Is there an intermediate layer (cache, CDN, replica) that can serve stale data?

Read the full file on GitHub · 112 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. 3d ago First seen · 112 lines · 121 tokens per session scan A dd20fb7746fd

Subscribe to this mod's changes

async-reasoning is a skill published in the GitHub repository Langerrr/zforge (10 stars, last pushed 4d ago), licensed MIT. It adds 121 tokens to every session and 1,229 once invoked, about $0.0006 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

setup-timescaledb-hypertables

Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table. Trigger when user asks to: Create or design SQL schemas/tables AND…

timescale/pg-aiguide · 219 tokens

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens

find-hypertable-candidates

Use this skill to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables. Trigger when user asks to: Analyze database tables for hypertable conversion potential Identify time-series or event tables in an existing schema Evaluate if a table would…

timescale/pg-aiguide · 184 tokens

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…

timescale/pg-aiguide · 162 tokens

ddia-systems

Design data systems by understanding storage engines, replication, partitioning, transactions, and consistency models. Use when the user mentions "database choice", "which database should I use", "SQL or NoSQL", "replication lag", "partitioning strategy", "consistency vs availability", "stream processing", "ACID…

wondelai/skills · 138 tokens

postgres

Use this skill for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations. Trigger when user asks to: Design or modify PostgreSQL tables, schemas, or data models Choose data types, constraints, indexes, or partitioning…

timescale/pg-aiguide · 210 tokens