CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/deadlock-detection-harness

Use when a service that takes two or more locks hangs in production with no error, or before a release when lock order across code paths was never checked. Records lock order, finds cycles, uses lock timeouts to fail instead of hang, and reads jstack or gdb thread dumps.

Quality

87%

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-first skill with a clear 8-step progression from static lock-order convention through runtime detection to postmortem analysis, each step backed by runnable tests. The main gaps are small execution details (missing import, unwired fingerprint hook) and the absence of an explicit fix-and-retry feedback loop. Content is appropriately self-contained but would benefit from moving the harness implementations into a bundled script.

Suggestions

Trim the opening definition ('A deadlock = a cycle in the lock-wait graph: thread A holds X waiting for Y...') — Claude already knows what a deadlock is — and tighten trailing rationale lines like 'Fewer acquire sites = easier to reason about lock order'.

Fix the small execution gaps: add `import time` in Step 5, make Step 5's example reflect a passing contract (or explicitly label it as the failure demo), and wire `fingerprint_acquire` into the workload in Step 8.

Add an explicit feedback loop after the cycle-detection and timeout tests (e.g., 'If violations are found: reorder acquisitions per Step 1 and re-run the workload test until cycles == []') to strengthen workflow clarity.

DimensionReasoningScore

Conciseness

The body is dominated by tight code blocks, tables, and one-line directives; only minor known-concept padding exists ("A deadlock = a cycle in the lock-wait graph: thread A holds X waiting for Y; thread B holds Y waiting for X" restates what Claude already knows). Fits anchor 4 (efficient, minor trimmable instances) better than anchor 3, since the padding is a single sentence rather than a section.

4 / 5

Actionability

Mostly executable: OrderedLock, build_lock_graph, find_cycles, TSAN_OPTIONS command, and the jstack/gdb/SIGQUIT table are copy-paste ready. Minor gaps keep it below anchor 5 — Step 5 omits `import time` and its holder-forever example will always fail the assert, Step 8's `fingerprint_acquire` is never actually called by `run_workload()`, and Step 2 is self-labeled a "rough sketch" (an explicit justification, so not penalized as pseudocode).

4 / 5

Workflow Clarity

Steps 1–8 are clearly sequenced with named headers, and validation is embedded via assertion-based tests ("test_no_lock_cycles_in_workload", "test_lock_acquired_within_timeout") plus an anti-patterns table with fixes. It falls short of anchor 5 because there is no explicit validate→fix→re-run feedback loop, and the workflow does not need the destructive/batch cap since its operations are test/diagnostic rather than destructive.

4 / 5

Progressive Disclosure

A single-file skill (no references/, scripts/, or assets/ exist to verify) that is well-organized into clearly headed sections, an anti-patterns table, limitations, and a one-level References section with a real TSan link. It matches anchor 4: good structure, but all eight steps' full implementations are inlined (~230 lines) where the reusable harness code (Steps 2–5) could live in scripts/; not anchor 3 since nothing is buried or misfiled.

4 / 5

Total

16

/

20

Passed

Description

92%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: third-person voice, concrete capability list, and an explicit dual-condition 'Use when' clause covering both incident response and pre-release prevention. The only weakness is that the most natural user term, "deadlock", appears in the name and keywords but not in the description text itself.

DimensionReasoningScore

Specificity

The description lists four concrete, distinct capabilities — "Records lock order, finds cycles, uses lock timeouts to fail instead of hang, and reads jstack or gdb thread dumps" — with no vague filler. Coverage is comprehensive for the deadlock-detection domain, matching the top anchor; it is not score 4 because there are no meaningful gaps in the action list.

5 / 5

Completeness

Both halves are explicit: "Use when a service that takes two or more locks hangs in production with no error, or before a release when lock order across code paths was never checked" answers when with concrete triggers, and the capability sentence answers what. Matches the anchor-5 example structure; not score 4 because the 'when' clause is already fully explicit and specific.

5 / 5

Trigger Term Quality

Natural phrases users would say are present — "hangs in production with no error", "lock order", "thread dumps", "jstack or gdb" — but the description never uses the word "deadlock" itself or common synonyms like "frozen"/"stuck". This is good coverage with a few natural terms missing (anchor 4), clearly above anchor 3 since several genuinely natural trigger phrases are included.

4 / 5

Distinctiveness Conflict Risk

A clear niche — multi-lock services, hang diagnosis, lock-order checking, jstack/gdb dumps — with triggers unlikely to fire for adjacent skills (e.g., data-race detection). Distinct, domain-specific vocabulary gives minimal conflict risk, matching anchor 5 rather than anchor 4's 'minor overlap risk with closely related skills'.

5 / 5

Total

19

/

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

On this page