async-programming

async-programming is a skill for Claude Code, Codex from martinholovsky/claude-skills-generator. It costs 22 tokens per session (3,299 once invoked), scanned A, original, Unlicense.

A guide to asynchronous programming with Python’s asyncio and Rust’s Tokio, where tasks can make progress while waiting for other work to finish. It focuses on race conditions, resource handling, and safe concurrent operations.

In plain words
What is it for?
Use it when designing or reviewing concurrent code, managing shared resources, preventing race conditions, or optimizing asyncio and Tokio programs.
Why use it?
It helps prevent timing-related bugs such as data corruption, deadlocks, resource leaks, and two operations incorrectly changing the same data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: model in frontmatter.

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/martinholovsky/claude-skills-generator/async-programming
Any agent
npx skills add martinholovsky/claude-skills-generator --skill async-programming
Clone the repo
git clone --depth 1 https://github.com/martinholovsky/claude-skills-generator

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/martinholovsky/claude-skills-generator/async-programming.svg)](https://agentmods.dev/skills/martinholovsky/claude-skills-generator/async-programming)
Your own site
<a href="https://agentmods.dev/skills/martinholovsky/claude-skills-generator/async-programming"><img src="https://agentmods.dev/badge/skills/martinholovsky/claude-skills-generator/async-programming.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,299 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.1 $0.00022 $0.03299
Opus 5 $0.00011 $0.01649
Sonnet 5 $0.00004 $0.00660
Haiku 4.5 $0.00002 $0.00330

Measured 6d ago against content hash 178618a7cc87, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

async-programming scanned grade A with 1 finding 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 6d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

result = await fetch(url) # Waits for each
skills/async-programming/SKILL.md · 504 lines

How it starts

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

Async Programming Skill

File Organization

  • SKILL.md: Core principles, patterns, essential security (this file)
  • references/security-examples.md: Race condition and resource safety examples
  • references/advanced-patterns.md: Advanced async patterns and optimization

Validation Gates

Gate 0.1: Domain Expertise Validation

  • Status: PASSED
  • Expertise Areas: asyncio, Tokio, race conditions, resource management, concurrent safety

Gate 0.2: Vulnerability Research

  • Status: PASSED (3+ issues for MEDIUM-RISK)
  • Research Date: 2025-11-20
  • Issues: CVE-2024-12254 (asyncio memory), Redis race condition (CVE-2023-28858/9)

Gate 0.11: File Organization Decision

  • Decision: Split structure (MEDIUM-RISK, ~400 lines main + references)

1. Overview

Risk Level: MEDIUM

Justification: Async programming introduces race conditions, resource leaks, and timing-based vulnerabilities. While not directly exposed to external attacks, improper async code can cause data corruption, deadlocks, and security-sensitive race conditions like double-spending or TOCTOU (time-of-check-time-of-use).

You are an expert in asynchronous programming patterns for Python (asyncio) and Rust (Tokio). You write concurrent code that is free from race conditions, properly manages resources, and handles errors gracefully.

Core Expertise Areas

  • Race condition identification and prevention
  • Async resource management (connections, locks, files)
  • Error handling in concurrent contexts
  • Performance optimization for async workloads
  • Graceful shutdown and cancellation

2. Core Principles

  1. TDD First: Write async tests before implementation using pytest-asyncio
  2. Performance Aware: Use asyncio.gather, semaphores, and avoid blocking calls
  3. Identify Race Conditions: Recognize shared state accessed across await points
  4. Protect Shared State: Use locks, atomic operations, or message passing
  5. Manage Resources: Ensure cleanup happens even on cancellation
  6. Handle Errors: Don't let one task's failure corrupt others
  7. Avoid Deadlocks: Consistent lock ordering, timeouts on locks

Read the full file on GitHub · 504 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. 6d ago First seen · 504 lines · 22 tokens per session scan A 178618a7cc87

Subscribe to this mod's changes

async-programming is a skill published in the GitHub repository martinholovsky/claude-skills-generator (45 stars, last pushed 9mo ago), licensed Unlicense. It adds 22 tokens to every session and 3,299 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories