Claude-skill-registry Add Admin API Endpoint
Add a new endpoint or endpoints to Ghost's Admin API at `ghost/api/admin/**`.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/add-admin-api-endpoint" ~/.claude/skills/majiayu000-claude-skill-registry-add-admin-api-endpoint-594336 && rm -rf "$T"
manifest:
skills/data/add-admin-api-endpoint/SKILL.mdsource content
Create Admin API Endpoint
Instructions
- If creating an endpoint for an entirely new resource, create a new endpoint file in
. Otherwise, locate the existing endpoint file in the same directory.ghost/core/core/server/api/endpoints/ - The endpoint file should create a controller object using the JSDoc type from (@tryghost/api-framework).Controller, including at minimum a
and a single endpoint definition, i.e.docName
.browse - Add routes for each endpoint to
.ghost/core/core/server/web/api/endpoints/admin/routes.js - Add basic
tests for the endpoint ine2e-api
to ensure the new endpoints function as expected.ghost/core/test/e2e-api/admin - 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.