Official agent skill

Windbg User Mutex Held Across Co Await

by microsoft in microsoft/win-dev-skills

A skill your agent uses when app, service, or user-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs or fails.

OfficialMITAuto-check passed

Install Windbg User Mutex Held Across Co Await

skills CLI
$ npx skills add microsoft/win-dev-skills --skill windbg-user-mutex-held-across-co-await -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/win-dev-skills windbg-user-mutex-held-across-co-await --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/win-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/windbg/skills/windbg-user-mutex-held-across-co-await .claude/skills/windbg-user-mutex-held-across-co-await && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
windbg-user-mutex-held-across-co-await
GitHub stars
466
Token cost
~1.1k tokens
SKILL.md length
438 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when app, service, or user-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs or fails.

  • Works in 5 steps: Identify the exact lock primitive and… → Establish the acquire and resume threads… → Verify the awaiter's resumption… → …
  • User-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs
  • SKILL.md covers Detection, Workflow, Fix pattern and Validation, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Windbg User Mutex Held Across Co Await is an agent skill from microsoft/win-dev-skills, published by the product's own GitHub organization. Use when app, service, or user-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs or fails. Not for all coroutine crashes or choosing lock performance.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with C++. The repository describes itself as: Agent plugins for building Windows apps with GitHub Copilot, Claude Code, OpenAI Codex, and more. The licence is MIT.

When your agent uses it

  • User-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs

Example prompts

  • “/windbg-user-mutex-held-across-co-await”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Identify the exact lock primitive and acquisition/release scope in source.
  2. Establish the acquire and resume threads using trace/source evidence.
  3. Verify the awaiter's resumption contract. C++/WinRT can preserve apartment
  4. Distinguish wrong-thread release, a dependency cycle, state changed during
  5. Move the thread-affine lock into synchronous scopes. Revalidate relevant

What it can do on your machine

Read from SKILL.md and the folder at commit 5ce74fa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com
    • devblogs.microsoft.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Windbg User Mutex Held Across Co Await loads about 1.1k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 438 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/win-dev-skills at commit 5ce74fa, republished under its MIT licence (© microsoft). 438 words, ~1,062 tokens.

Download SKILL.mdSave it as .claude/skills/windbg-user-mutex-held-across-co-await/SKILL.md (or your agent's skills folder).
name
windbg-user-mutex-held-across-co-await
description
Use when app, service, or user-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs or fails. Not for all coroutine crashes or choosing lock performance.

Mutex Held Across co_await

Load windbg-diagnostic-method first if it is not already loaded in this conversation, and apply it throughout for evidence ranking, hypothesis testing, confidence calibration, independent review, and report validation. This skill adds the bug-family-specific commands and evidence requirements.

Detection

This pattern can occur in native application, service, or user-mode driver code, including UMDF components that use C++ coroutines. Look for a lock acquired before co_await and released after resumption or coroutine destruction. Mutex ownership belongs to the acquiring thread, not the coroutine frame. A resumption on another thread can violate that contract. Even same-thread resumption can create reentrancy or progress problems when the awaited operation needs a lock the coroutine still holds.

Workflow

  1. Identify the exact lock primitive and acquisition/release scope in source. Audit every suspension point while the RAII guard or ownership is alive.
  2. Establish the acquire and resume threads using trace/source evidence. Standard mutexes and SRW locks do not provide a universally queryable owner field; do not fabricate an owning TID from undocumented layouts.
  3. Verify the awaiter's resumption contract. C++/WinRT can preserve apartment context for particular awaitables; resume_background intentionally switches. Do not assume every WinRT awaitable always resumes on a worker or always on the originating thread.
  4. Distinguish wrong-thread release, a dependency cycle, state changed during suspension, lifetime failure, and unrelated memory corruption.
  5. Move the thread-affine lock into synchronous scopes. Revalidate relevant state after the await rather than treating the pre-await snapshot as current.

If the symptom is general blocking use windbg-user-wait-chain-analysis. For damaged heap objects use windbg-user-heap-corruption-investigation. If a recording is available, windbg-user-ttd-reverse-debugging-triage can help establish the ownership timeline.

Show full SKILL.md (168 more words)Show less

Fix pattern

Conceptual sequence, not a promise about any particular scheduler:

text
under lock:
    take a snapshot and its generation
release lock
await work using that snapshot
under lock on the resumed thread:
    revalidate generation, lifetime, and assumptions
    apply result or explicitly handle a stale/cancelled operation
release lock

Use RAII for each synchronous scope. If invariants cannot tolerate unlocking, redesign the operation or use a specifically designed asynchronous coordination primitive with cancellation/lifetime rules. Switching to a recursive mutex or shared_mutex does not make a thread-affine lock coroutine-safe.

Do not recommend a blanket mutex-type replacement. Shared locking is a separate design decision; changing the primitive does not repair suspension ownership. Keep the object and any captured interfaces alive across asynchronous work.

Validation

  • No thread-affine lock ownership survives a suspension in the corrected path.
  • Each awaiter's thread/apartment contract is understood.
  • State invariants are revalidated after suspension.
  • Cancellation, concurrent mutation, shutdown, and failed awaited work are tested.
  • The remedy removes the demonstrated cause, not just an observed exception.

References

Feedback

Follow FEEDBACK.md and report reviewed, sanitized feedback to WinDbg-Feedback. Include windbg-user-mutex-held-across-co-await and the package version from plugin.json; no automatic source, dump, or transcript upload.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/windbg/skills/windbg-user-mutex-held-across-co-await of microsoft/win-dev-skills.

Open the folder on GitHubat commit 5ce74fa

Compare with similar skills

Windbg User Mutex Held Across Co Await next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Windbg User Mutex Held Across Co Await compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Windbg User Mutex Held Across Co Await this skillmicrosoft/win-dev-skills466—~1.1kAutomated safety check: PassMIT
Paddle BuildPaddlePaddle/Paddle24k—~1kAutomated safety check: PassApache-2.0
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
ONNX Runtime Shape Inference Safety Auditmicrosoft/onnxruntime22k—~3.3kAutomated safety check: PassMIT
Code Audit3stoneBrother/code-audit8921 repos~2.7kAutomated safety check: PassNone
Leetcuda Tex To Readthedocsxlite-dev/LeetCUDA12k—~902Automated safety check: PassGPL-3.0

Similar skills

  • Paddle Build

    PaddlePaddle/Paddle

    A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.

    24k GitHub stars~1k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Official

    Finds and fixes out-of-range output writes in ONNX Runtime operator shape-inference functions where a getNumOutputs guard admits too few outputs.

    22k GitHub stars~3.3k tokensUpdated today
    SecurityAuto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    892 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • Leetcuda Tex To Readthedocs

    xlite-dev/LeetCUDA

    LeetCUDA 书稿 LaTeX 到 Read the Docs 站点的转换管线维护 skill(站点目录 LeetCUDA/docs/readthedocs/)。当任务涉及:改完书稿后让站点同步、改转换器 convert/、本地构建与预览 build.sh、内容核对 convert.verify、浏览器验收…

    12k GitHub stars~902 tokensUpdated today
    Documents & OfficeAuto-check passed
  • Qt C++ Code Review

    x-tools-author/x-tools

    Read-only review of Qt6 C++ code that combines a deterministic lint script with six parallel analysis agents and reports only high-confidence issues.

    1.1k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed

More from microsoft/win-dev-skills

All 11 skills in this repo
  • Windbg Diagnostic Method

    microsoft/win-dev-skills

    Official

    Use with every WinDbg plugin investigation to apply evidence-first reasoning, confidence calibration, contrarian review, structured reporting, and deterministic validation.

    466 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check passed
  • Windbg Kernel Bugcheck Triage

    microsoft/win-dev-skills

    Official

    A skill your agent uses when a kernel dump reports a Windows bugcheck; decode parameters and recover exception or trap context before investigating your driver.

    466 GitHub stars~1.3k tokensUpdated 3 days ago
    Auto-check passed
  • Windbg Kernel Irp Lifecycle Triage

    microsoft/win-dev-skills

    Official

    A skill your agent uses when kernel evidence shows stalled I/O, a power IRP, or completion/cancellation misuse; inspect request state and driver ownership.

    466 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • Windbg Kernel Lock Deadlock Triage

    microsoft/win-dev-skills

    Official

    A skill your agent uses when kernel threads block on driver synchronization or Verifier reports a lock-order violation; build an owner/waiter graph.

    466 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • Windbg Kernel Verifier Triage

    microsoft/win-dev-skills

    Official

    A skill your agent uses when a kernel dump contains Driver Verifier violations; inspect flags, bugcheck subcodes, and available I/O shadow state.

    466 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • Windbg User Exception Triage

    microsoft/win-dev-skills

    Official

    A skill your agent uses when a native C/C++ app, service, or user-mode driver host (including UMDF) crashes with a structured exception in a dump or WinDbg session, including native faults inside…

    466 GitHub stars~1.3k tokensUpdated 3 days ago
    Auto-check passed

Works with

Questions about Windbg User Mutex Held Across Co Await

What does Windbg User Mutex Held Across Co Await do?

A skill your agent uses when app, service, or user-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs or fails. Windbg User Mutex Held Across Co Await is an agent skill from microsoft/win-dev-skills, published by the product's own GitHub organization. Use when app, service, or user-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs or fails.

When should I use Windbg User Mutex Held Across Co Await?

Windbg User Mutex Held Across Co Await fits situations like: user-mode driver C++ coroutine code holds a thread-affine lock across suspension and later hangs.

How do I install Windbg User Mutex Held Across Co Await in Claude Code?

Run `npx skills add microsoft/win-dev-skills --skill windbg-user-mutex-held-across-co-await -a claude-code`. Or copy the skill folder (plugins/windbg/skills/windbg-user-mutex-held-across-co-await in microsoft/win-dev-skills) into .claude/skills/windbg-user-mutex-held-across-co-await in your project. Claude Code loads it when a task matches its description.

How do I install Windbg User Mutex Held Across Co Await in Codex?

Run `npx skills add microsoft/win-dev-skills --skill windbg-user-mutex-held-across-co-await -a codex`. Or copy the skill folder (plugins/windbg/skills/windbg-user-mutex-held-across-co-await in microsoft/win-dev-skills) into .agents/skills/windbg-user-mutex-held-across-co-await in your project. Codex loads it when a task matches its description.

Can I use Windbg User Mutex Held Across Co Await in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/win-dev-skills --skill windbg-user-mutex-held-across-co-await -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/windbg-user-mutex-held-across-co-await, .gemini/skills/windbg-user-mutex-held-across-co-await, .github/skills/windbg-user-mutex-held-across-co-await and .opencode/skills/windbg-user-mutex-held-across-co-await in your project.

What does Windbg User Mutex Held Across Co Await need to run?

SKILL.md names no scripts, command-line tools or credentials: Windbg User Mutex Held Across Co Await is instructions for the agent only.

Does Windbg User Mutex Held Across Co Await access the network?

SKILL.md names 3 domains. As links in the text: learn.microsoft.com, devblogs.microsoft.com and github.com. This is read from the text; nothing was executed.

Is Windbg User Mutex Held Across Co Await safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Windbg User Mutex Held Across Co Await use?

Windbg User Mutex Held Across Co Await is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Windbg User Mutex Held Across Co Await use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Windbg User Mutex Held Across Co Await?

Skills that share tags, products or a category with Windbg User Mutex Held Across Co Await: Paddle Build (PaddlePaddle/Paddle, 24k stars), Fory Release (apache/fory, 4.6k stars), ONNX Runtime Shape Inference Safety Audit (microsoft/onnxruntime, 22k stars) and Code Audit (3stoneBrother/code-audit, 892 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Windbg User Mutex Held Across Co Await?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/win-dev-skills, which has 466 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 7, 2026.

Source: microsoft/win-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.