← ClaudeAtlas

vb6-utilitieslisted

Catalog of common utility functions that VB6 codebases typically maintain in a shared module (often named modUtils, modFuncoes, modCommon, or similar). Activates when writing or editing VB6 code that handles NULL coalescing, SQL value formatting, string sanitization for SQL literals, accent/diacritic removal for searching, padding (left/right), substring extraction between markers, CNPJ/CPF (Brazilian tax ID) validation, MsgBox dialog wrappers, IDE-vs-compiled detection, regex via VBScript.RegExp, ADO Command parameter helpers, ListView and grid serialization, and common helpers prefixed with fg_ (function global). The goal is to recognize these patterns and reuse existing project utilities instead of reinventing them. Triggers on tasks involving string manipulation, validation, NULL handling, formatting, or any common helper that likely already exists in the project's utility module.
alexcassol/claude-vb6-skills · ★ 0 · Code & Development · score 70
Install: claude install-skill alexcassol/claude-vb6-skills
# VB6 Utilities Catalog VB6 codebases typically maintain a shared utility module (commonly named `modUtils`, `modFuncoes`, `modCommon`, or similar) that accumulates helpers over years of development. Before writing a utility function from scratch, check whether one already exists. This catalog describes the functions you are most likely to find. **Names and exact signatures vary per project**; the names below are representative of the patterns to look for. ## Conventions ### `fg_` prefix — "function global" Many codebases use the `fg_` prefix for stateless utility functions exposed project-wide. Examples: `fg_isNull`, `fg_Coalesce`, `fg_InIDE`. When you see this prefix, treat the function as part of the utility layer — reusable, side-effect-free, safe to call from anywhere. ### Dialog wrappers — `MsgBoxXxx` Most projects wrap `MsgBox` to integrate with logging, theming, and consistent button layouts. Typical names: `MsgBoxCritical`, `MsgBoxInfo`, `MsgBoxWarning`, `MsgBoxQuestion`, `MsgBoxOption`. **Use the wrapper, not raw `MsgBox`**. ## 1. NULL handling ### `fg_isNull(value, defaultValue) As Variant` Returns `defaultValue` when `value` is `Null`, otherwise returns `value`. Equivalent to SQL's `ISNULL` or `COALESCE` with one fallback. ```vb strName = fg_isNull(rs("custName").Value, "") lngCount = fg_isNull(rs("total").Value, 0) ``` ### `fg_Coalesce(value1, value2, ...) As Variant` Returns the first non-`Null` value in the list, or `Null` if all are `Null`. ```vb