claude-code-vba-skills: Skill for Claude Code

.claude/skills/vba-error-events/SKILL.md

vba-error-events-team is a skill for Claude Code from RenRMT/claude-code-vba-skills. It costs 18 tokens per session (470 once invoked), scanned A, original, MIT.

A set of guidelines for handling errors, events, debugging, and logging in Microsoft VBA, the programming language used in Office macros and applications.

In plain words
What is it for?
Writing error-handling blocks, logging failures, debugging with the Immediate Window, using assertions, and safely managing events.
Why use it?
It helps VBA programs fail safely and makes problems easier to trace, while reducing errors caused by event handlers triggering themselves repeatedly.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is RenRMT/claude-code-vba-skills's own configuration. It tells Claude Code how to work on claude-code-vba-skills itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-vba-skills configures →

Reuse

Borrowing it

Nothing to install: this file belongs to RenRMT/claude-code-vba-skills. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/RenRMT/claude-code-vba-skills/main/.claude/skills/vba-error-events/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/RenRMT/claude-code-vba-skills

Made for: Claude Code.

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 vba-error-events-team

README.md
[![agentmods](https://agentmods.dev/badge/skills/renrmt/claude-code-vba-skills/vba-error-events/github.svg)](https://agentmods.dev/skills/renrmt/claude-code-vba-skills/vba-error-events)
Your own site
<a href="https://agentmods.dev/skills/renrmt/claude-code-vba-skills/vba-error-events"><img src="https://agentmods.dev/badge/skills/renrmt/claude-code-vba-skills/vba-error-events/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 vba-error-events-team

Your own site · 80×15
<a href="https://agentmods.dev/skills/renrmt/claude-code-vba-skills/vba-error-events"><img src="https://agentmods.dev/badge/skills/renrmt/claude-code-vba-skills/vba-error-events.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 470 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.00018 $0.00470
Opus 5 $0.00009 $0.00235
Sonnet 5 $0.00004 $0.00094
Haiku 4.5 $0.00002 $0.00047

Measured 10d ago against content hash 60695a50d4bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

vba-error-events-team 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 10d 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.

.claude/skills/vba-error-events/SKILL.md · 104 lines

What it actually says

Error Handling, Events & Team Practices — Expanded Edition

Ensure reliability, traceability, and predictable execution across users and environments.

Purpose

Create VBA applications that fail safely, provide diagnostic information, prevent re‑entrant chaos, and support professional deployment workflows.

Structured Error Handling

Standard Template

Public Sub RunTask()
    On Error GoTo CleanFail
    SaveState
    ' Main work
CleanExit:
    RestoreState
    Exit Sub
CleanFail:
    LogError "RunTask", Err
    Resume CleanExit
End Sub

Use Narrow Resume Next

On Error Resume Next
Set ws = wb.Worksheets(name)
If Err.Number <> 0 Then
    Err.Clear
    ' Handle missing sheet
End If
On Error GoTo 0

Debugging & Diagnostics

Use Immediate Window

Debug.Print "Processing row", i

Assertions

Debug.Assert Not ws Is Nothing

Centralized Logging

Public Sub LogError(ByVal proc As String, ByVal er As ErrObject)
    Debug.Print proc, er.Number, er.Description
End Sub

Event Safety

Prevent Re‑Entrancy

If mHandlingEvent Then Exit Sub
mHandlingEvent = True
' ...
mHandlingEvent = False

Keep Events Thin

Private Sub Worksheet_Change(ByVal Target As Range)
    On Error GoTo CleanFail
    If Not Intersect(Target, Me.Range("Data")) Is Nothing Then
        HandleDataChange Target
    End If
CleanExit:
    Exit Sub
CleanFail:
    LogError "Worksheet_Change", Err
    Resume CleanExit
End Sub

Anti‑Patterns

BAD: Silent failure via blanket Resume Next.
BAD: Unlogged runtime errors.
BAD: Event procedures containing business logic.

Acceptance Checklist

  • Error handler in every non-trivial procedure.
  • Event code non-reentrant.
  • Logging and diagnostics in place.
  • Deployment steps documented.
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. 10d ago First seen · 104 lines · 18 tokens per session scan A 60695a50d4bf

Subscribe to this mod's changes

vba-error-events-team is a skill published in the GitHub repository RenRMT/claude-code-vba-skills (2 stars, last pushed 5mo ago), licensed MIT. It adds 18 tokens to every session and 470 once invoked, about $0.0001 per session on Opus 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-08-31.