Agent skill
Add Admin API Endpoint
Add a new endpoint or endpoints to Ghost's Admin API at `ghost/api/admin/**`.
Install this agent skill to your Project
npx add-skill https://github.com/TryGhost/Ghost/tree/main/.claude/skills/add-admin-api-endpoint
SKILL.md
Create Admin API Endpoint
Instructions
- If creating an endpoint for an entirely new resource, create a new endpoint file in
ghost/core/core/server/api/endpoints/. Otherwise, locate the existing endpoint file in the same directory. - The endpoint file should create a controller object using the JSDoc type from (@tryghost/api-framework).Controller, including at minimum a
docNameand a single endpoint definition, i.e.browse. - Add routes for each endpoint to
ghost/core/core/server/web/api/endpoints/admin/routes.js. - Add basic
e2e-apitests for the endpoint inghost/core/test/e2e-api/adminto ensure the new endpoints function as expected. - Run the tests and iterate until they pass:
cd ghost/core && yarn test:single test/e2e-api/admin/{test-file-name}.
Reference
For a detailed reference on Ghost's API framework and how to create API controllers, see reference.md.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
add-private-feature-flag
Use when adding a new private (developer experiments) feature flag to Ghost, including the backend registration and settings UI toggle.
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.
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?