ag-vba-auditor

Audit Excel VBA code for security, performance, and compliance issues.

1|Updated Jun 12, 2026
One-click install
npx skills add https://github.com/Sampi314/Sam-Plugin-Marketplace --skill ag-vba-auditor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ag-vba-auditor
Source: https://github.com/Sampi314/Sam-Plugin-Marketplace/tree/main/Audit%20General/skills/ag-vba-auditor
Command: npx skills add https://github.com/Sampi314/Sam-Plugin-Marketplace --skill ag-vba-auditor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pywin32, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Manually reviewing Excel VBA code for hidden security risks, performance bottlenecks, error handling gaps, and coding standard violations is time-consuming and error-prone, especially for large or complex workbooks shared across teams.

Core Features & Use Cases

  • Comprehensive Rule-Based Audits: Detects critical security risks like Shell execution, SendKeys, and registry access, plus performance issues such as cell-by-cell loops and unnecessary Select/Activate calls.
  • Structured Reporting: Outputs findings in standardized markdown and JSON formats with clear severity levels, locations, and remediation recommendations.
  • Use Case: A finance team can audit a shared quarterly reporting workbook to confirm no malicious macros are present, ensure it runs efficiently on user machines, and complies with internal coding standards.

Quick Start

Use the ag-vba-auditor skill to review the VBA code in the attached Excel workbook 'Q3_Report.xlsm' for security and performance issues.

Frequently Asked Questions about ag-vba-auditor

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

FAQPage Schema
How do I audit Excel VBA macros for security vulnerabilities?

Auditing Excel VBA macros for security vulnerabilities involves scanning the code for critical risks like Shell execution, SendKeys, and registry access. This process detects hidden threats and outputs structured findings with severity levels and remediation recommendations.

What is the best way to optimize Excel macro performance for large workbooks?

Optimizing Excel macro performance requires identifying inefficiencies like cell-by-cell loops and unnecessary Select or Activate calls. A code audit pinpoints these bottlenecks, providing actionable recommendations to ensure the automation runs efficiently on user machines.

Can I review exported VBA module files without having Excel installed?

Yes, you can review exported VBA module files offline. The auditor analyzes standalone .bas, .cls, and .frm module files to find coding standard violations and error handling gaps without needing a local Excel installation.

Do I need pywin32 to extract and review VBA code from Excel workbooks?

Yes, you need the pywin32 library on a Windows system to perform COM-based VBA extraction directly from Excel workbooks. This setup allows the auditor to automatically read and analyze macro code embedded in .xlsm files.

How does a VBA code audit check for error handling gaps in macros?

A VBA code audit checks for error handling gaps by scanning the macro logic for missing or incomplete error management structures. It identifies where runtime errors could crash the workbook and outputs structured reports detailing the exact locations and fixes needed.

What are common coding standard violations found in shared corporate Excel workbooks?

Common coding standard violations in shared corporate Excel workbooks include unsafe execution calls and inefficient object references. An audit reviews the VBA code against defined standards to ensure compliance and outputs structured findings in markdown and JSON formats.