creating-plugins
What it does
This skill guides building extensions, called plugins, for the EmDash content management system. It is for developers who want to add custom features or admin screens to an EmDash site.
When to use it
- ✓When you want to add a new feature to an EmDash site through a plugin.
- ✓When you need a plugin with its own admin screen or API routes.
- ✓When you want to publish a plugin that others can install from the registry.
Skill link
https://github.com/emdash-cms/emdash/blob/main/skills/creating-plugins/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you help me create an EmDash plugin that adds a custom form to the admin area?”
5 new skills a week. 1 minute to read.
How it works
The agent chooses between a sandboxed plugin and a trusted native plugin, scaffolds the project, and implements the hooks, routes and admin pages. It then runs the plugin's tests.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Creating EmDash plugins
Build against the API that reaches the intended execution mode. Source types and production-boundary tests take precedence over examples in this skill when they disagree.
Choose a format
| Format | Runtime source | Admin UI | Distribution |
|---|---|---|---|
| Sandboxed | src/plugin.ts default-exports a SandboxedPlugin |
Block Kit pages, widgets, saved-entry panels, and actions | Plugin CLI and registry |
| Native | definePlugin() / createPlugin() |
React, Block Kit, and Astro components | Trusted site dependency only |
Use a sandboxed plugin unless the feature needs host-process access, React admin code, Astro rendering components, raw page fragments, or custom Portable Text block definitions. Native plugins run with the site's authority and cannot be installed from the registry.
Scaffold a sandboxed plugin
pnpm dlx @emdash-cms/plugin-cli init my-plugin
cd my-plugin
pnpm install
pnpm run test
The manifest is the identity and trust contract. Runtime hooks and routes live in src/plugin.ts; the CLI generates descriptors, manifests, and bundles. Do not create a separate descriptor factory or sandbox-entry.ts.
import type { SandboxedPlugin } from "emdash/plugin";
const plugin: SandboxedPlugin = {
hooks: {
"content:afterSave": async (event, ctx) => {
ctx.log.info("Content saved", { id: event.content.id });
},
},
};
export default plugin;
Import authoring types from emdash/plugin with import type. The CLI bundles value imports such as pluginRoute() and pluginResponse() from emdash/plugin and portableTextToMarkdown() from emdash/client. Sandboxed runtime code can use Web APIs but not Node.js built-ins.
Declare access
Declare every host API in emdash-plugin.jsonc. Adding authority, exposing a route publicly, or adding MCP tools requires renewed administrator approval.
| Capability | Grants |
|---|---|
schema:read |
Public collection and field definitions |
admin.editor-draft:read |
Selected unsaved field values after an explicit editor interaction |
admin.editor-draft:patch |
Host-validated unsaved field changes proposed for editor review |
content:read |
Content identity, translations, and published public URLs |
content:revisions:read |
Retained revision data; implies content read |
content:write |
Create, update, delete, and translation creation; implies read |
content:publish |
Revision-fenced publish, unpublish, schedule, and unschedule; implies read |
content:restore |
Revision-fenced reads and restoration of trashed content |
hooks.content-policy:register |
Pre-publish, pre-schedule, and pre-unpublish policy hooks |
taxonomies:read |
Taxonomy definitions, terms, and entry assignments |
taxonomies:write |
Term creation and assignment deltas; implies read |
bylines:read |
Public byline profiles and single or batched entry credits |
redirects:read |
Versioned redirect inspection |
redirects:write |
Versioned redirect creation, update, and deletion; implies read |
comments:read |
Stored non-trashed comments and their personal data |
comments:moderate |
Expected-status moderation; implies read |
media:read |
Ready-media metadata and authenticated asset URLs |
media:bytes:read |
Bounded media bytes and content hashes |
| `m |
FAQ
What is the difference between sandboxed and native plugins?
Sandboxed plugins run with limited access and can be installed from the registry, while native plugins run with the site's full authority and only suit trusted code.
Does it provide a starter project?
Yes. A plugin command creates a starting project.
Can plugins add React screens?
Native plugins can use React and Astro components for admin and site pages.
Details
Original description by the author
Create EmDash CMS plugins with sandboxed hooks, routes, storage, content and media APIs, MCP tools, and declarative admin UI, or native React and Astro extensions. Use when scaffolding or implementing an EmDash plugin.
repo: emdash-cms/emdash
Popularity
- GitHub stars
- 14k
- Ranking position
- #11247
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
adversarial-reviewer
14kHelps your agent hunt for hidden bugs and unsafe assumptions in a code change, going beyond an ordinary review when you ask for it.
agent-browser
14kLets your agent test a web page in a real browser, check what users see, verify actions and capture screenshots as evidence.
building-emdash-site
14kHelps your agent build the site side of an EmDash CMS project on Astro, covering content, schema, menus, taxonomies and deployment.
emdash-cli
14kLets your agent manage an EmDash site from the command line, including content, media, menus, migrations and full site export or import.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.