richgo/auto-reviewer/concurrency-deadlock
Claude Code and agent skill by richgo/auto-reviewer
- community
Checking that the SKILL.md file is still in the repository.
Deadlock. Use this skill whenever diffs may introduce concurrency issues on all, especially in java, python, go, csharp, cpp, rust. Actively look for: Two or more threads each holding a lock while waiting for a lock held by the other, causing... and report findings with high severity expectations and actionable fixes.
Install
npx vskill@latest install richgo/auto-reviewer/concurrency-deadlockSKILL.md
The same SKILL.md was published earlier as richgo/auto-reviewer/concurrency-deadlock.
Deadlock
Task Metadata
- Category:
concurrency - Severity:
high - Platforms:
all - Languages:
java, python, go, csharp, cpp, rust
Purpose
Two or more threads each holding a lock while waiting for a lock held by the other, causing permanent hang. Also includes self-deadlock (re-acquiring non-reentrant lock).
Detection Heuristics
- Multiple locks acquired in different orders across code paths
- Nested
synchronizedblocks orlock.acquire()on different objects - Holding a lock while calling external/callback code that may acquire another lock
- Channel operations in Go that can block indefinitely
- Database transactions that lock rows in inconsistent order
Eval Cases
Case 1: Lock ordering violation
Expected finding: High — Deadlock risk. Thread 1 holds lockA and waits for lockB, while Thread 2 holds lockB and waits for lockA. Enforce consistent lock ordering (always acquire lockA before lockB).
Case 2: Go channel deadlock
Expected finding: High — Deadlock. Unbuffered channel send blocks because receiver hasn't started. Use buffered channel or separate goroutine.
Counter-Examples
Counter 1: Consistent lock ordering
Why it's correct: Consistent ordering prevents circular wait.
Binary Eval Assertions
- [ ] Detects lock ordering violation in eval case 1
- [ ] Detects channel deadlock in eval case 2
- [ ] Does NOT flag counter-example 1
- [ ] Finding identifies the circular wait pattern
- [ ] Finding suggests fix (ordering, buffering)
- [ ] Severity assigned as high
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/concurrency-deadlock/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/richgo/auto-reviewer/concurrency-deadlock)