companion-add-action-to-category-file

Adds new actions to an existing Bitfocus Companion action category file.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Extending a Bitfocus Companion module with new actions often risks breaking the existing structure or duplicating IDs. This Skill guides you through safely adding actions to an existing action category file without touching the aggregator or creating new files. ## Core Features & Use Cases - Enum Extension: Add a new enum member with a globally unique action ID to an existing src/actions/action-{category}.ts file. - Action Definition Patterns: Append matching action definitions with either sync callbacks or async callbacks that parse Companion variables. - Mistake Prevention: Avoid duplicate IDs, missing async keywords, uncast option values, and mismatched enum keys. - Use Case: You maintain a Zoom Companion module and need to add an "Archive Local Recording" action to the existing global recording category file without restructuring the module. ## Quick Start Ask the agent to add a new action to the existing action category file in your Companion module, specifying the action name and target category.

Frequently Asked Questions about companion-add-action-to-category-file

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

FAQPage Schema
How do I add an action to an existing Companion module category file?▼

Open the existing src/actions/action-{category}.ts file, add a new member to the action enum with a globally unique string ID, then append a matching entry in the actions object inside the GetActions function. The aggregator file does not need any changes.

When should I use a sync versus async action callback in Companion?▼

Use a sync callback with signature (): void when the action performs no awaits and parses no options. Use an async callback returning Promise<void> when you need await, such as calling instance.parseVariablesInString on user-provided option values.

What is the difference between this skill and companion-action-file-pattern?▼

This skill extends an existing action category file only. Use companion-action-file-pattern when no src/actions/action-{category}.ts file exists yet, since it creates the new file and wires it into the actions.ts aggregator.

Why does my new Companion action fail with a duplicate ID error?▼

The enum string value is the action ID registered with Companion and must be globally unique across all category enums in the module. Check the other action enums and rename the conflicting string value.

Why is action.options undefined or untyped in my callback?▼

Option values from the action event are loosely typed, so you must cast them explicitly, for example action.options.userName as string. Also ensure the option id in the definition matches the property you access.