companion-add-preset-to-category-file

Adds new button presets to an existing enum-based Companion preset category file.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Extending a Bitfocus Companion module with new button presets requires correctly updating the preset enum and definition object without breaking typed IDs, category grouping, or aggregator wiring. This Skill provides the exact two-step pattern for adding presets to an existing preset category file. ## Core Features & Use Cases - Enum Extension: Add a globally unique, category-namespaced preset ID to an existing preset enum. - Preset Definition: Add a button preset with style, steps, action references, and optional feedbacks. - Mistake Prevention: Avoid duplicate IDs, string-literal keys, and mismatched category strings that create unintended UI groups. - Use Case: A developer maintaining a Companion module needs to add an "Archive Local Recording" button to the existing preset-recording.ts file without creating a new category or touching the presets aggregator. ## Quick Start Ask the agent to add a new preset to the existing preset category file in src/presets, specifying the preset name, its action, and any feedbacks.

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

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

FAQPage Schema
How do I add a preset to an existing Companion preset category file?▼

Add a new member to the preset enum with a globally unique, category-prefixed string ID, then add a matching button preset definition in the presets object with style, steps, and feedbacks. No aggregator changes are needed.

When should I create a new preset category file instead of extending one?▼

Create a new category file when no src/presets/preset-{category}.ts file exists for your category yet. Use the companion-preset-category-file skill for that case, since it also wires the aggregator.

Why does my new Companion preset appear in a separate UI group?▼

This happens when the preset's category string does not exactly match the category string used by other presets in the file. Copy the exact category string from an existing preset to keep them grouped together.

Can I use string literals for preset IDs and actionIds in Companion presets?▼

No. Use enum members as object keys (e.g. [PresetIdRecording.myPreset]) and action enum values for actionId (e.g. ActionIdFoo.bar). String literals bypass type safety and risk duplicate or mismatched IDs.

Why does Companion report a duplicate preset ID error?▼

Preset enum string values must be globally unique across all preset enums in the module. Namespace each ID with the category prefix, such as recording_archiveLocalRecording, and check other preset files for collisions.