This walks you through writing concurrent Python and Rust code that won't bite you with race conditions or resource leaks. It's structured around TDD with pytest-asyncio, starting each feature with a test that catches the concurrent bug before you write the implementation. The patterns section covers the usual suspects: asyncio.gather for parallelism, semaphores for rate limiting, proper lock usage around shared state, and keeping blocking calls off the event loop. The decision framework is helpful for quickly choosing between locks, queues, or atomic operations. It's marked medium risk because async bugs like TOCTOU or double-spending are subtle and security-sensitive, even if they're not direct attack vectors. Good reference if you keep forgetting the right way to handle cancellation or deadlock prevention.

skills.sh installs
258
GitHub stars
48
last updated
Aug 21, 2026

Install

$ npx -y skills add martinholovsky/claude-skills-generator --skill async-programming --agent claude-code

Installs into .claude/skills of the current project.

Files

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

Sponsors

Details

Repository
github.com/martinholovsky/claude-skills-generator
Categories
Debugging, Automation & Workflows, Rust
First seen
Jun 3, 2026

More from martinholovsky/claude-skills-generator

All 50

Recommended

More Debugging
1pproenca avatarreact-native-elementspproenca/dot-skillsReact Native Elements UI component library best practices for performance, theming, and proper component usage. Use when building React Native apps with RNE, co258skills.sh installs
2luoling8192 avatarsoftware-design-philosophyluoling8192/software-design-philosophy-skillSoftware design philosophy guide based on John Ousterhout's "A Philosophy of Software Design." Use this skill during: code reviews, architecture discussions, AP256skills.sh installs
3salesforceairesearch avatarobserving-agentforcesalesforceairesearch/agentforce-adlcAnalyze production Agentforce agent behavior using session traces and Data Cloud. TRIGGER when: user queries STDM session data or Data Cloud trace records; inve255skills.sh installs
4hookdeck avatarsendgrid-webhookshookdeck/webhook-skillsReceive and verify SendGrid webhooks. Use when setting up SendGrid webhook handlers, debugging signature verification, or handling email delivery events.253skills.sh installs
5rysweet avatarengineer-analystrysweet/amplihackAnalyzes technical systems and problems through engineering lens using first principles, systems thinking, design methodologies, and optimization frameworks. Pr249skills.sh installs
6jwilger avatarmemory-protocoljwilger/agent-skillsPersistent cross-session memory using Memento MCP knowledge graph (mcp__memento__* tools). Recall-before-acting: search memory before starting tasks, on errors,248skills.sh installs