weishijun1998

Excel Vba Devkit — Testing skill for Claude Code

Testing community

Run Excel VBA macros unattended: guarded dev-test runner, assertions, structured reports, static diagnostics — CLI tools plus an agent skill for any AI host (Copilot, Claude Code, Codex, MCP).

How to install Excel Vba Devkit

This entry records only its repository, not the path inside it, so there is no exact command to give. Open weishijun1998/excel-vba-devkit and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Excel Vba Devkit does

Run Excel VBA macros unattended: guarded dev-test runner, assertions, structured reports, static diagnostics — CLI tools plus an agent skill for any AI host (Copilot, Claude Code, Codex, MCP).

Alternatives in Testing

  • Test Runner — Run Python tests with pytest, unittest, or other testing frameworks 23.4k ★
  • Crlf — Test for CRLF / HTTP response-splitting and host-header injection — Set-Cookie injection, cache poisoning, res 4.5k ★
  • Spectra App — Spec-driven development for coding agents — a desktop app, a CLI, and skills for Codex, Claude Code, Cursor, C 735 ★

README

Excel VBA Devkit

[![ci](https://github.com/weishijun1998/excel-vba-devkit/actions/workflows/ci.yml/badge.svg)](https://github.com/weishijun1998/excel-vba-devkit/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

**English** | [中文说明](README.zh-CN.md)

Excel VBA Devkit is a set of Python tools plus an agent skill for developing Excel VBA macros on Windows. The tools run a macro in a real Excel instance, dismiss error dialogs, stop hangs, and print a report: verdict, real error text, and the result of every assertion.

With that report, an AI can iterate by itself: write, run, read, fix, run again. The skill uses the standard `SKILL.md` format and loads into VS Code + GitHub Copilot, Claude Code, Codex, Hermes, or any other host that reads skills or connects over MCP. The tools are plain Python and run from a terminal; no AI required.

Requirements: Windows, desktop Excel, and Python with `pywin32` and `psutil` installed.

A six-module demo project (5,000 rows, PivotTable, 2 charts) ends like this:

Excel: 新建实例 | pid=42552 | 工作簿=demo.xlsm
注入模块: ModDemo_Util
…
=== 判定 ===
结论: ✅ 正常运行完成
耗时: 2.09s | 宏返回: ok

=== 断言 ===
  ✅ cell:明细数据!A1=月份
  ✅ cell:校验!B4=0
  ✅ pivot:汇总=1
  ✅ chart:汇总=2
…
=== 总结: 全部通过 ✅ ===

When something fails, the report says which kind of failure it was and includes the dialog text; once a dialog is dismissed, that text is the only record left:

结论: ❌ VBA 报错(弹窗已自动点掉,Excel 存活)
耗时: 0.197s
宏名: 已自动限定为 loader.xlsm!Fault_BadRef(窗口隐藏态,属设计,未改文件)
错因: 运行时错误 '1004': 方法 'Sheets' 作用于对象 '_Global' 时失败
守卫: 弹窗已点掉(Excel 存活=True)

结论: ❌ 卡死(无弹窗、零 CPU)→ 已杀进程
耗时: 6.507s
守卫: ['VERDICT IDLE_HUNG elapsed=6.5s cpu_delta=1.0s -> KILLED pid=4112']

Console output is Chinese by default. For terminals that cannot display it, `--ascii` forces plain-ASCII output.

Install

  1. Copy tools/ and .github/ into your repo root. If you use VS Code, copy .vscode/ too.
  2. Install the two dependencies: `pip i