windbg-user-heap-corruption-investigation

windbg-user-heap-corruption-investigation is a skill for Claude Code from microsoft/win-dev-skills. It costs 46 tokens per session (1,133 once invoked), scanned A, original, MIT.

A WinDbg workflow for investigating damaged heap data in a native user-mode process. Heap corruption means memory-management data or an allocated block was changed incorrectly, sometimes before the crash that detects it.

In plain words
What is it for?
Use it for heap corruption stops, Application Verifier failures, and related allocation or free errors in applications, services, and user-mode driver hosts.
Why use it?
The allocator may only discover an earlier bad write, and missing allocation history cannot prove a leak or use-after-free. This workflow separates corruption from ordinary allocation failure and records those limits.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the windbg plugin — 11 skills, 2 agents shipped together

Good fit Use it for heap corruption stops, Application Verifier failures, and related allocation or free errors in applications, services, and user-mode driver hosts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/win-dev-skills/windbg-user-heap-corruption-investigation
About the project

microsoft/win-dev-skills is a collection of AI-agent instructions and tools for creating native Windows applications with WinUI 3 and the Windows App SDK. Windows developers use it to guide agents through app development tasks from scaffolding and design to testing, packaging, and release. The catalogue entries are its agents, skills, and plugin components.

microsoft/win-dev-skills · 521 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add microsoft/win-dev-skills --skill windbg-user-heap-corruption-investigation
Clone the repo
git clone --depth 1 https://github.com/microsoft/win-dev-skills

Made for: Claude Code.

Or install windbg, the plugin that ships this one along with the rest of its 11 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for windbg-user-heap-corruption-investigation

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/win-dev-skills/windbg-user-heap-corruption-investigation/github.svg)](https://agentmods.dev/skills/microsoft/win-dev-skills/windbg-user-heap-corruption-investigation)
Your own site
<a href="https://agentmods.dev/skills/microsoft/win-dev-skills/windbg-user-heap-corruption-investigation"><img src="https://agentmods.dev/badge/skills/microsoft/win-dev-skills/windbg-user-heap-corruption-investigation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for windbg-user-heap-corruption-investigation

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/win-dev-skills/windbg-user-heap-corruption-investigation"><img src="https://agentmods.dev/badge/skills/microsoft/win-dev-skills/windbg-user-heap-corruption-investigation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,133 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01133
Opus 5.5 $0.00018 $0.00453
Sonnet 5.5 $0.00009 $0.00227
Haiku 4.5 $0.00005 $0.00113

Measured 1mo ago against content hash 074409848cd4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

windbg-user-heap-corruption-investigation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/windbg/skills/windbg-user-heap-corruption-investigation/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Heap Corruption Investigation

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 and limits

Look for STATUS_HEAP_CORRUPTION (0xC0000374), Application Verifier stops, or failures in heap allocate/free/reallocate paths in an application, service, or user-mode driver host such as an UMDF host process. A crash inside the allocator may be the first detection of an earlier bad write, not the faulty operation. Distinguish corruption from allocation failure; for the latter use windbg-user-virtual-memory-exhaustion.

Allocation/free history depends on how the process was instrumented and which pages were captured. A missing history is a limitation, not proof of a leak or use-after-free.

Workflow

1. Decode the stop

.exr -1
.ecxr
!analyze -v
k

Record the stop reason, corrupted block, corruption address, and the operation that detected the damage. If a verifier stop frame has parameter/local symbols, select it with .frame /r <frame> and inspect dv; otherwise use the captured stop output and the documented stop definition. Do not assume one fixed parameter layout or a stop code shared by all verifier versions.

2. Recover available block history

!heap -p -a <address>
!avrf -hp -a <address>

The first command inspects a Page Heap allocation; the second searches available Application Verifier heap-operation history. Use !heap -? and !avrf -? to confirm support in the installed extension. On an uninstrumented dump these commands may not recover the history needed to identify the writer.

Capture allocation and free stacks when present. Check the address is inside the user allocation rather than a header or neighboring block.

3. Test competing explanations

Hypothesis Evidence to seek
Use-after-free Confirmed free before a later access through a retained reference
Double-free Two ownership/completion paths freeing the same allocation
Overrun/underrun A write outside the allocated user bounds
Wild write Corrupted header or payload and a writer with an invalid target
Allocation/free contract mismatch Different allocator/deallocator or incorrect owning heap

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 125 lines · 46 tokens per session scan A 074409848cd4

Subscribe to this mod's changes

windbg-user-heap-corruption-investigation is a skill published in the GitHub repository microsoft/win-dev-skills (521 stars, last pushed 13d ago), licensed MIT. It adds 46 tokens to every session and 1,133 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-08.

Related

windbg-user-heap-corruption-investigation compared with skills from other repositories

windbg-user-heap-corruption-investigation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
windbg-user-heap-corruption-investigationmicrosoft/win-dev-skillsSkill52113d agoMITA46Claude Code
component-flattening-analysistech-leads-club/agent-skillsSkill7.2k2d agononeA86Claude Code, Codex
codenavitech-leads-club/agent-skillsSkill7.2k2d agononeA139Claude Code, Codex
chrome-devtoolstech-leads-club/agent-skillsSkill7.2k2d agononeA74Claude Code, Codex
sentrytech-leads-club/agent-skillsSkill7.2k2d agononeA84Claude Code, Codex
blazing-fast-dotnetmanagedcode/dotnet-skillsSkill52716d agoMITA72Claude Code, Codex
code-explorerclacky-ai/openclackySkill1.2k3d agoMITA40Claude Code, Codex