一键导入
add-private-feature-flag
Use when adding a new private (developer experiments) feature flag to Ghost, including the backend registration and settings UI toggle.
菜单
Use when adding a new private (developer experiments) feature flag to Ghost, including the backend registration and settings UI toggle.
Add a new endpoint or endpoints to Ghost's Admin API at `ghost/api/admin/**`.
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.
Commit message formatting and guidelines
| name | add-private-feature-flag |
| description | Use when adding a new private (developer experiments) feature flag to Ghost, including the backend registration and settings UI toggle. |
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.
Add the flag to ghost/core/core/shared/labs.js
PRIVATE_FEATURES array.Add a UI toggle in apps/admin-x-settings/src/components/settings/advanced/labs/private-features.tsx
features array with title, description, and flag (must match the string in labs.js).Run tests and update the config API snapshot
cd ghost/core && pnpm test:single test/unit/shared/labs.test.jscd ghost/core && UPDATE_SNAPSHOTS=1 pnpm test:single test/e2e-api/admin/config.test.jsghost/core/test/e2e-api/admin/__snapshots__/config.test.js.snap to confirm only your new flag was added.labs setting.labs.js, private-features.tsx, and the snapshot.welcomeEmailDesignCustomization).PUBLIC_BETA_FEATURES in labs.js instead and add the toggle to apps/admin-x-settings/src/components/settings/advanced/labs/beta-features.tsx.