Add Admin API Endpoint

A guide for adding one or more endpoints to Ghost's Admin API, the interface that other software uses to manage a Ghost site.

In plain words
What is it for?
Use it when creating an endpoint for a new resource or extending an existing resource in Ghost. It also covers adding routes and running the relevant API tests.
Why use it?
It lays out the files, routes, and end-to-end tests needed for a complete endpoint, reducing the chance that the API works in one place but is missing routing or verification.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tryghost/ghost/add-admin-api-endpoint
Any agent
npx skills add TryGhost/Ghost --skill add-admin-api-endpoint
Clone the repo
git clone --depth 1 https://github.com/TryGhost/Ghost

Made for: Claude Code, Codex.

Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 238 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00023 $0.00238
Opus 5 $0.00012 $0.00119
Sonnet 5 $0.00005 $0.00048
Haiku 4.5 $0.00002 $0.00024

Measured 2d ago against content hash a2ff364468d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Add Admin API Endpoint scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/add-admin-api-endpoint/SKILL.md · 19 lines

What it actually says

Create Admin API Endpoint

Instructions

  1. 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.
  2. The endpoint file should create a controller object using the JSDoc type from (@tryghost/api-framework).Controller, including at minimum a docName and a single endpoint definition, i.e. browse.
  3. Add routes for each endpoint to ghost/core/core/server/web/api/endpoints/admin/routes.js.
  4. Add basic e2e-api tests for the endpoint in ghost/core/test/e2e-api/admin to ensure the new endpoints function as expected.
  5. Run the tests and iterate until they pass: cd ghost/core && pnpm 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.

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 19 lines · 23 tokens per session scan A a2ff364468d2

Subscribe to this mod's changes

Add Admin API Endpoint is a skill published in the GitHub repository TryGhost/Ghost (55,095 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 238 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.