async-check

async-check is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 6 tokens per session (3,470 once invoked), scanned A, original, MIT.

A Python code checker for asynchronous code that uses async and await. It looks for blocking calls, incorrect event-loop use, and concurrency problems.

In plain words
What is it for?
Use it to review Python asyncio modules, locate async functions and await calls, and identify common mistakes such as blocking network requests or future.result() calls.
Why use it?
It helps find code that silently blocks other tasks or behaves incorrectly when several operations run at once.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is python scripts/async_analyzer.py app/.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add TheBeardedBearSAS/claude-craft
Claude Code
/plugin install claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/async-check.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/async-check)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/async-check"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/async-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.1 $0.00006 $0.03470
Opus 5 $0.00003 $0.01735
Sonnet 5 $0.00001 $0.00694
Haiku 4.5 $0.00001 $0.00347

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

Security

Grade A, and why

async-check scanned grade A with 2 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 2d 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.

response = requests.get("https://api.example.com") # BLOCKING!

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

'subprocess.run',
.claude/commands/python/async-check.md · 558 lines

How it starts

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

Vérification Patterns Async Python

Tu es un expert Python asyncio. Tu dois vérifier l'utilisation correcte des patterns async/await, identifier les anti-patterns et les problèmes de concurrence.

Arguments

$ARGUMENTS

Arguments :

  • (Optionnel) Chemin vers un module spécifique

Exemple : /python:async-check app/services/

MISSION

Étape 1 : Analyser le Code Async

# Rechercher les fonctions async
grep -rn "async def" app/ --include="*.py"

# Rechercher les await
grep -rn "await " app/ --include="*.py"

# Rechercher asyncio.run (potentiel problème)
grep -rn "asyncio.run" app/ --include="*.py"

# Rechercher les .result() sur futures (blocking)
grep -rn "\.result()" app/ --include="*.py"

Étape 2 : Anti-Patterns Courants

1. Blocking dans Async
# ❌ MAUVAIS - Bloque l'event loop
async def get_data():
    response = requests.get("https://api.example.com")  # BLOCKING!
    return response.json()

# ✅ BON - Non-bloquant
async def get_data():
    async with httpx.AsyncClient() as client:
        response = await client.get("https://api.example.com")
        return response.json()
2. Sync Sleep dans Async
# ❌ MAUVAIS - Bloque l'event loop
async def slow_task():
    time.sleep(5)  # BLOCKING!
    return "done"

# ✅ BON - Non-bloquant
async def slow_task():
    await asyncio.sleep(5)
    return "done"
3. Await dans une Boucle (N+1)
# ❌ MAUVAIS - Séquentiel, lent
async def fetch_all_users(user_ids: list[int]) -> list[User]:
    users = []
    for user_id in user_ids:
        user = await fetch_user(user_id)  # N requêtes séquentielles
        users.append(user)
    return users

# ✅ BON - Concurrent
async def fetch_all_users(user_ids: list[int]) -> list[User]:
    tasks = [fetch_user(user_id) for user_id in user_ids]
    users = await asyncio.gather(*tasks)
    return list(users)

# ✅ ENCORE MIEUX - Avec limite de concurrence
async def fetch_all_users(user_ids: list[int], max_concurrent: int = 10) -> list[User]:
    semaphore = asyncio.Semaphore(max_concurrent)

    async def fetch_with_limit(user_id: int) -> User:
        async with semaphore:
            return await fetch_user(user_id)

    tasks = [fetch_with_limit(user_id) for user_id in user_ids]
    users = await asyncio.gather(*tasks)
    return list(users)

Read the full file on GitHub · 558 lines

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. 2d ago First seen · 558 lines · 6 tokens per session scan A 74e6b921dcb5

Subscribe to this mod's changes

async-check is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 3d ago), licensed MIT. It adds 6 tokens to every session and 3,470 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.