CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/deadlock-detection-harness

Build deadlock-detection harnesses - extract lock-acquire-order graph via instrumentation, run cycle detection (DFS) to spot inconsistent ordering, use lock-acquire timeouts to surface rather than hang, JVM `jstack` / `gdb thread apply all bt` for postmortem analysis. Pair with ThreadSanitizer's `detect_deadlocks=1` for runtime detection. Use when a service that holds two or more locks hangs in production with no crash or error, or before release when lock acquisition order across code paths has never been proven consistent.

68

Quality

85%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Quality

Content

75%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-structured, code-dense skill that is easy to follow end to end, with concrete executable examples at every step and an honest Limitations section. The consistent gap is polish rather than substance: a redundant definitional opener, a few missing imports/undefined placeholders in examples, and no explicit feedback loops for what to do when the checks fail.

Suggestions

Delete the two-line opening that defines what a deadlock is (thread A holds X waiting for Y...) — Claude already knows this; start at 'When to use'.

Close the small executability gaps: drop the 'rough sketch' hedge in Step 2, add `import time` to the Step 5 test, and note explicitly that run_workload/run_workload_capture are placeholders for the user's own workload harness.

Add a short feedback loop after Steps 4 and 8 telling the reader what to do on failure — e.g., 'on cycle: identify the offending acquire site from the path output, align it with the Step 1 order, and re-run the workload capture to confirm.'

DimensionReasoningScore

Conciseness

The body is lean: terse step framing ("Any cycle = potential deadlock under the right scheduling.") backed by code that earns its tokens. Minor over-explanation exists, e.g., the opening definition "A deadlock = a cycle in the lock-wait graph: thread A holds X waiting for Y; thread B holds Y waiting for X" re-teaches a concept Claude already knows.

4 / 5

Actionability

Mostly executable guidance: the OrderedLock instrumentation, graph builder, DFS cycle finder, timeout test, and jstack/TSAN_OPTIONS commands are concrete and runnable. Minor gaps: Step 2 self-describes as a "rough sketch", Step 5's test omits the `time` import, and Steps 4/8 rely on undefined placeholders (`run_workload_capture()`, `run_workload()`).

4 / 5

Workflow Clarity

Eight clearly numbered steps proceed logically from prevention (convention, instrumentation) to detection (graph, cycles, timeout, TSan) to response (postmortem, fingerprint), and each test's assert serves as a validation checkpoint. Not a 5 because there are no explicit feedback loops — e.g., what to do when Step 4 reports a cycle or which step to revisit when the fingerprint count exceeds 5 is left implicit rather than stated as a validate-and-retry path.

4 / 5

Progressive Disclosure

No bundle files exist (no references/, scripts/, or assets/), so all content is inline; at ~230 lines it stays navigable via clear `## Step N` headers plus Anti-patterns, Limitations, and References sections. The References section is one level deep (TSan docs URL, sibling skill pointers). Slightly below 5 because the per-language instrumentation and postmortem command details could live in reference files to slim the main body.

4 / 5

Total

16

/

20

Passed

Description

88%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: concrete, tool-specific capabilities paired with two explicit, realistic trigger scenarios. The only gaps are a few missing natural synonyms (mutex, stuck, frozen) and slight overlap risk with data-race detection skills via the shared ThreadSanitizer tooling.

DimensionReasoningScore

Specificity

The description lists multiple specific concrete actions with tools named: "extract lock-acquire-order graph via instrumentation, run cycle detection (DFS)", "use lock-acquire timeouts", "JVM `jstack` / `gdb thread apply all bt` for postmortem analysis", and "Pair with ThreadSanitizer's `detect_deadlocks=1`". Coverage spans static ordering, dynamic graph analysis, runtime detection, and postmortem analysis — comprehensive for the domain.

5 / 5

Completeness

Explicitly answers both questions: what — "Build deadlock-detection harnesses" with five enumerated methods; when — "Use when a service that holds two or more locks hangs in production with no crash or error, or before release when lock acquisition order across code paths has never been proven consistent." The when-clause gives two concrete trigger scenarios.

5 / 5

Trigger Term Quality

Good natural keyword coverage: "deadlock", "locks", "hangs in production with no crash or error", "lock acquisition order", "ThreadSanitizer", "jstack" — "hangs" is exactly what users report. A few natural synonyms are missing (e.g., "mutex", "stuck/frozen", "lockup"), keeping it just below the comprehensive anchor.

4 / 5

Distinctiveness Conflict Risk

The deadlock/hang niche is clear and well-differentiated from general debugging skills. Minor overlap risk: ThreadSanitizer is also the standard tool for data-race detection (a sibling skill's territory), and "hangs in production" could overlap with generic performance-hang diagnosis skills.

4 / 5

Total

18

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Reviewed

Table of Contents