Agent skill
add-private-feature-flag
Use when adding a new private (developer experiments) feature flag to Ghost, including the backend registration and settings UI toggle.
Install this agent skill to your Project
npx add-skill https://github.com/TryGhost/Ghost/tree/main/.claude/skills/add-private-feature-flag
SKILL.md
Add Private Feature Flag
Overview
Adds a new private feature flag to Ghost. Private flags appear in Labs settings under the "Private features" tab, visible only when developer experiments are enabled.
Steps
-
Add the flag to
ghost/core/core/shared/labs.js- Add the flag name (camelCase string) to the
PRIVATE_FEATURESarray.
- Add the flag name (camelCase string) to the
-
Add a UI toggle in
apps/admin-x-settings/src/components/settings/advanced/labs/private-features.tsx- Add a new entry to the
featuresarray withtitle,description, andflag(must match the string inlabs.js).
- Add a new entry to the
-
Run tests and update the config API snapshot
- Unit:
cd ghost/core && yarn test:single test/unit/shared/labs.test.js - Update snapshot and run e2e:
cd ghost/core && UPDATE_SNAPSHOTS=1 yarn test:single test/e2e-api/admin/config.test.js - Review the diff of
ghost/core/test/e2e-api/admin/__snapshots__/config.test.js.snapto confirm only your new flag was added.
- Unit:
Notes
- No database migration is needed. Labs flags are stored in a single JSON
labssetting. - The flag name must be identical in
labs.js,private-features.tsx, and the snapshot. - Flags are camelCase strings (e.g.
welcomeEmailDesignCustomization). - For public beta flags (visible to all users), add to
PUBLIC_BETA_FEATURESinlabs.jsinstead and add the toggle toapps/admin-x-settings/src/components/settings/advanced/labs/beta-features.tsx.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
Create database migration
Create a database migration to add a table, add columns to an existing table, add a setting, or otherwise change the schema of Ghost's MySQL database. Use this skill whenever the task involves modifying Ghost's database schema — including adding, removing, or renaming columns or tables, adding new settings, creating indexes, updating data, or any change that requires a migration file in ghost/core. Also use when the user references schema.js, knex-migrator, the migrations directory, or asks to "add a field" or "add a column" to any Ghost model/table. Even if the user frames it as a feature or Linear issue, if the implementation requires a schema change, this skill applies.
Add Admin API Endpoint
Add a new endpoint or endpoints to Ghost's Admin API at `ghost/api/admin/**`.
Format numbers
Format numbers using the formatNumber function from Shade whenever someone edits a TSX file.
remotion-best-practices
Best practices for Remotion - Video creation in React
docs-demo
Add an interactive demo to the Remotion documentation. Use when creating a new <Demo> component for docs pages.
add-sfx
Add a new sound effect to @remotion/sfx
Didn't find tool you were looking for?