companion-v2-api-compliance

Reviews Bitfocus Companion modules for @companion-module/base v2.0 API compliance.

Updated May 19, 2026
One-click install
npx skills add https://github.com/digitaldrummerj/bitfocus-companion-skills --skill companion-v2-api-compliance-digitaldrummerj
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: companion-v2-api-compliance
Source: https://github.com/digitaldrummerj/bitfocus-companion-skills/tree/main/plugins/companion-v2-api-compliance
Command: npx skills add https://github.com/digitaldrummerj/bitfocus-companion-skills --skill companion-v2-api-compliance-digitaldrummerj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Migrating or reviewing Bitfocus Companion modules against the @companion-module/base v2.0 API is error-prone because v2 removes or changes many v1 APIs, and violations can prevent a module from loading or cause data loss. ## Core Features & Use Cases - Critical Compliance Checks: Verifies the class entrypoint, UpgradeScripts export, manifest type and node22 runtime, tsconfig moduleResolution, and InstanceBase generic typing. - Breaking Change Detection: Flags removed or changed APIs such as parseVariablesInString, checkFeedbacks, array-form setVariableDefinitions, and single-argument setPresetDefinitions. - Expression & Upgrade Guidance: Explains v2 expression handling in options and the { isExpression, value } shape that upgrade scripts must handle. - Use Case: While reviewing a pull request for a Companion module on base v2.0, run this checklist to catch a lingering runEntrypoint() call and an outdated node18 runtime before merge. ## Quick Start Ask the agent to review this Companion module for v2 API compliance using the companion-v2-api-compliance checklist.

Frequently Asked Questions about companion-v2-api-compliance

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

FAQPage Schema
How do I check a Companion module for v2 API compliance?▼

Start by reading package.json to confirm @companion-module/base is version 2.x or higher, then apply the v2 checklist. Verify the default-exported InstanceBase class, the UpgradeScripts export, manifest type connection, and the node22 runtime.

What breaking changes exist in @companion-module/base v2.0?▼

Key breaking changes include removal of runEntrypoint and parseVariablesInString, checkFeedbacks replaced by checkAllFeedbacks, object-form setVariableDefinitions, two-argument setPresetDefinitions, and upgrade options shaped as { isExpression, value }.

Does Companion v2 still support v1.x modules?▼

Yes, v1.x modules remain supported and are not deprecated. For modules on @companion-module/base 1.x, the legacy rules apply, including runEntrypoint, array-form setVariableDefinitions, and parseVariablesInString.

How are expressions handled in Companion v2 action options?▼

Companion auto-parses variables in textinput fields with useVariables set to true, and users can toggle expression mode unless disableAutoExpression is set. In expression mode, option values arrive computed and validated against the field type.

Why does a v2 Companion module fail to load after migration?▼

Common causes are a leftover runEntrypoint call, a missing default-exported InstanceBase class, a manifest without type connection, or a node18 runtime instead of node22. The critical checklist in this skill covers each of these cases.