richgo/auto-reviewer/concurrency-deadlock

Claude Code and agent skill by richgo/auto-reviewer

Trust tier 3
  • community
Source check pending

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

SKILL.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 synchronized blocks or lock.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
java
// Thread 1 path
synchronized (lockA) {
synchronized (lockB) {
transferFunds(a, b);
}
}
// Thread 2 path
synchronized (lockB) {
synchronized (lockA) {
transferFunds(b, a);
}
}

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
go
func process() {
ch := make(chan int)
ch <- 42 // blocks forever — no receiver yet
val := <-ch
fmt.Println(val)
}

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
java
// Both paths acquire locks in same order
synchronized (lockA) {
synchronized (lockB) {
transferFunds(a, b);
}
}

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/richgo/auto-reviewer/concurrency-deadlock/badge)](https://verified-skill.com/skills/richgo/auto-reviewer/concurrency-deadlock)

Something wrong with this skill or its page? Tell us.