add-private-feature-flag
Installation
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 && pnpm test:single test/unit/shared/labs.test.js - Update snapshot and run e2e:
cd ghost/core && UPDATE_SNAPSHOTS=1 pnpm 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: