VSTO-review

Audit VSTO add-in code for COM lifecycle, event hygiene, and thread safety.

Updated May 12, 2026
One-click install
npx skills add https://github.com/RorySullivan1/claudeBrain --skill vsto-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: VSTO-review
Source: https://github.com/RorySullivan1/claudeBrain/tree/main/example-project/.claude/skills/VSTO-review
Command: npx skills add https://github.com/RorySullivan1/claudeBrain --skill vsto-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Expert VSTO code reviewer for Office add-ins written in C# or VB.NET. Use this skill whenever the user pastes VSTO code and asks for a review, audit, feedback, or help improving it. Also trigger when the user reports a bug, memory leak, crash, performance problem, or unexpected Office behavior and shares code as context — even if they don't explicitly say "review". Trigger on phrases like "what's wrong with this", "can you check this", "is this correct", "why does this crash", "review my add-in", or any paste of VSTO/Office interop code followed by a question. Prioritize correctness over style. Always check COM release, event hygiene, and thread safety before anything else.

Core Features & Use Cases

  • COM lifecycle and resource management checks (two-dot rule, Release/FinalRelease usage)
  • Event handler hygiene and lifecycle management
  • Thread-safety validation for Office interop calls
  • Robust exception handling with proper logging and recovery notes
  • Office API correctness and version considerations
  • Architecture and testability recommendations

Quick Start

Paste your VSTO add-in code or a reproducible snippet to receive an automated VSTO review highlighting lifecycle, threading, and API correctness.

Frequently Asked Questions about VSTO-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review VSTO add-in code for COM object lifecycle and memory leaks?

To review VSTO add-in code for COM object lifecycle issues, audit COM release patterns like the two-dot rule and Release/FinalRelease usage, check event handler hygiene, and validate thread safety for Office interop calls to prevent memory leaks.

Why does my VSTO Excel add-in crash or hang during Office interop calls?

VSTO Excel add-ins often crash or hang due to thread-safety violations during Office interop calls or unmanaged COM resource leaks. Reviewing your code for proper event handler cleanup and correct COM object release usage identifies these root causes.

What is the two-dot rule in VSTO development and how does it prevent bugs?

The two-dot rule in VSTO development is a COM lifecycle management guideline preventing memory leaks. It advises against chaining multiple property accesses, which creates hidden COM objects that cannot be explicitly released, leading to resource leaks and stability bugs.

Can I use static analysis to check event hygiene and thread safety in VB.NET Office add-ins?

Yes, static analysis can check event hygiene and thread safety in VB.NET Office add-ins by evaluating pasted interop code. It validates event handler detachment, verifies COM release patterns, and identifies unsafe cross-thread Office API calls.

What context do I need to provide for a thorough VSTO code audit?

A thorough VSTO code audit requires contextual details including the target Office version, .NET framework target, add-in type, and a reproduction snippet or minimal project. This context ensures accurate evaluation of API correctness and version compatibility.

How do I handle exceptions and logging correctly in an Outlook VSTO add-in?

To handle exceptions in an Outlook VSTO add-in, implement robust exception handling with proper logging and recovery notes. A code review evaluates your catch blocks to ensure safe COM object cleanup during errors without leaving dangling event handlers.