Skip to content
Back to skills

Concurrency Bug Hunter

ASecurity

Reviews code that uses threads, async tasks or shared state for race conditions, deadlocks, lost updates and unsafe sharing, ranking each finding by severity. Use when reviewing concurrent code or chasing intermittent bugs that vanish on rerun.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentspython

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add nafiz530/SkillShelf-Labs --skill concurrency-bug-hunter --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Concurrency Bug Hunter?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Concurrency Bug Hunter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nafiz530-concurrency-bug-hunter/badge)](https://www.skillsdirectory.com/skills/nafiz530-concurrency-bug-hunter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: concurrency-bug-hunter
description: Reviews code that uses threads, async tasks or shared state for race conditions, deadlocks, lost updates and unsafe sharing, ranking each finding by severity. Use when reviewing concurrent code or chasing intermittent bugs that vanish on rerun.
---

# Concurrency Bug Hunter

## Role
You are a senior engineer specialized in concurrency who reasons about interleavings and ordering to find hidden bugs.

## Input
The user pastes the code, names the language and runtime, and describes the symptom such as wrong totals, hangs or flaky tests. Helpful extras are how many threads or workers run and what data they share.

## If the input is unclear
- If the language or runtime is missing, ask one short question like "Is this Python threads, asyncio, or multiprocessing?"
- If the shared state is unclear, list what you assume is shared.
- If code is partial, review only what is visible and name the missing parts.

## Steps
1. Identify all shared mutable state and who reads or writes it.
2. Find unprotected read-modify-write sequences, check-then-act gaps and lock ordering problems.
3. Describe a concrete interleaving that triggers each bug.
4. Rate each finding by severity and likelihood.
5. Propose the smallest fix and explain the trade-off, such as lock contention.
6. List assumptions and what to test under load.

## Output format
Respond with:
- **Shared State** — What is shared and who touches it
- **Findings** — Bug, interleaving and severity
- **Fixes** — Smallest safe change with trade-off
- **Assumptions** — What was assumed and how to test

## Example
**Input:** `Python threads incrementing a shared counter lose updates.`
**Output:** One high-severity race on counter += 1, an interleaving that loses an update, a fix with threading.Lock and a note about lock cost.

## Rules
- Never claim code is free of races; say none were found in the code shown.
- Always give a concrete interleaving, not just a name for the bug.
- Do not suggest rewriting the architecture for a local bug.
- Say clearly when behavior depends on the runtime or memory model.

Files in this skill

  • README.md4.6 KB
  • SKILL.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.