Plugin for Claude · Excel VBA · Windows desktop

Find what makes VBA slow.
Measure the gain.

VBA-PERFORMANCE is a plugin for Claude with one skill, vba-performance. Give it exported VBA or a macro that is slow: it scans the code, ranks the findings by how often each line runs, proposes fixes that keep the results identical, and times the old and the new version in Excel.

The scanner is a plain Python script you can also run on its own. No add-in, no dependency.

Release 1.0.0 · Plugin for claude.ai and Claude Code · Costs timed on Excel 365, 64-bit

Hot-path triageFix recipes with their trapsEvery figure timed in ExcelBehavior preservingStandard-library PythonMIT License
01 / From a slow macro to a measured fix

Scan. Triage. Fix. Measure.

Advice about VBA speed is easy to find and hard to trust. The skill follows four steps and keeps only what pays off on your code.

  1. 01

    Scan

    The checker lists every line that matches a known cost, with its rule, severity and the fix behind it.

  2. 02

    Triage

    A finding in a loop that runs 100,000 times matters; the same finding in a macro that runs once does not. The skill keeps what is hot and says why it drops the rest.

  3. 03

    Fix

    Each rule has a recipe and the traps that would change the result. A fix that would change behavior is proposed, never applied.

  4. 04

    Measure

    The old and the new macro run in Excel, one after the other, and the medians say whether the change paid off.

02 / Measured, not guessed

Every rule rests on a timing.

Each cost was timed in Excel 365 (64-bit), median of five runs, with every variant checked to return the same result. A selection from the running record; ratios hold better than absolute times.

PatternRuleCostAgainst the fix
Large array passed ByVal ... As Variant (10,000 x 20)PERF0253.4 ms per call26,000x ByRef
Debug.Print on every loop passPERF0200.45-1.8 ms per line10,700-24,000x
ws.UsedRange.Rows.Count in a loop conditionPERF0240.21 ms per pass7,200-10,600x
DoEvents on every loop passPERF00946 us per pass1,700x
A row deleted per loop pass (2,500 of 5,000 rows)PERF0050.86 ms per delete152x an array rebuild
.Select then ActiveCell per cell, ScreenUpdating onPERF0011.6 ms per cell55x a direct write
Cells(r, c).Value read and write per rowPERF00231 us per row42-46x one block read and write

The figures, the machines and the raw output are in docs/RECOMMENDATIONS.md; the benchmark modules in docs/benchmarks reproduce them. The project wiki explains each cost and the traps that change results while optimizing.

03 / Install

Install one way only.

The claude.ai plugin already syncs to a signed-in local Claude Code, so two copies would show up as two skills. Pick one path.

On claude.ai (recommended)

Customize > Plugins > Add > Add marketplace, enter this repository, turn on Sync automatically, then open the plugin and press Add.

danielep71/SKILL-VBA-PERFORMANCE

From a ZIP

Build the plugin ZIP, or take it from a release with its checksum and signature, then upload it under Plugins > Add > Upload plugin.

python tools\build_plugin.py

Local only

Without claude.ai, copy the skill folder into your user skills. The README has the PowerShell commands.

.claude\skills\vba-performance

Then ask: “This macro takes four minutes on 80,000 rows. Find out why and speed it up without changing the results.”

04 / Start with the source

Read. Run. Reproduce.

The checker needs only Python 3. Start with the README, then the wiki. Questions, defects and ideas go to the issue tracker; vulnerabilities go through the private route in the security policy.

What should I know before relying on a finding?

The checker reads text, not a compiled project: it does not know types or data sizes, and it does not follow calls into helpers. Every finding is a lead to confirm, and the skill confirms it against how often the code runs. Silence a confirmed false positive with a trailing 'perf-ignore. Costs were timed on Windows desktop Excel 365, 64-bit; absolute times differ on other machines, so rely on the ratios.