Concurrency Debugging

Race conditions, deadlocks, thread analysis, happens-before relationships.

48 stars 10 forksSoftware Development Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sethdford/claude-skills --skill concurrency-debugging
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/debugging/skills/concurrency-debugging ~/.claude/skills/concurrency-debugging

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Concurrency Debugging

Identifying bugs caused by concurrent access and timing issues.

## Context

You are debugging concurrency issues. These are the hardest bugs to find and reproduce.

## Domain Context

- **Race Condition**: Two threads access shared data; order matters; result is non-deterministic
- **Deadlock**: Threads waiting for each other; system hangs
- **Happens-Before**: Guarantee that one event completes before another
- **Memory Visibility**: When one thread sees writes from another thread

## Instructions

1. **Reproduce Consistently**: Add logging, delays, thread barriers
2. **Check Synchronization**: Are shared variables protected?
3. **Verify Lock Ordering**: Do all threads acquire locks in same order?
4. **Analyze Thread Dumps**: What is each thread waiting for?
5. **Look for Wait-Free Patterns**: Are threads spinning, not blocking?
6. **Use Tools**: ThreadSanitizer, Helgrind (Valgrind), or language-specific tools
7. **Add Happens-Before**: Use happens-before semantics (memory barriers, atomic ops)

## Anti-Patterns

- Single-threaded debugging then assuming it works threaded; concurrency bugs are different
- Using sleep() for synchronization; racey and slow
- Assuming x++ is atomic; it's not, use atomic operations
- Multiple locks protecting same data; hard to reason about
- Not testing under load; concurrency bugs often need high contention to appear

## Further Reading

- Brian Gorelick, _Concurrency in Practice_
Read the full skill on GitHub

Details

Skill name
concurrency-debugging
Path
engineer/debugging/skills/concurrency-debugging/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the Concurrency Debugging skill do?

Race conditions, deadlocks, thread analysis, happens-before relationships.

How do I install the Concurrency Debugging skill?

Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Concurrency Debugging popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.