MCPInstall

creating-plugins

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.

Installs
128
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/emdash-cms/emdash --skill creating-plugins
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads creating-plugins automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

FormatRuntime sourceAdmin UIDistribution
Sandboxedsrc/plugin.ts default-exports a SandboxedPluginBlock Kit pages, widgets, saved-entry panels, and actionsPlugin CLI and registry
NativedefinePlugin() / createPlugin()React, Block Kit, and Astro componentsTrusted 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.

CapabilityGrants
schema:readPublic collection and field definitions
admin.editor-draft:readSelected unsaved field values after an explicit editor interaction
admin.editor-draft:patchHost-validated unsaved field changes proposed for editor review
content:readContent identity, translations, and published public URLs
content:revisions:readRetained revision data; implies content read
content:writeCreate, update, delete, and translation creation; implies read
content:publishRevision-fenced publish, unpublish, schedule, and unschedule; implies read
content:restoreRevision-fenced reads and restoration of trashed content
hooks.content-policy:registerPre-publish, pre-schedule, and pre-unpublish policy hooks
taxonomies:readTaxonomy definitions, terms, and entry assignments
taxonomies:writeTerm creation and assignment deltas; implies read
bylines:readPublic byline profiles and single or batched entry credits
redirects:readVersioned redirect inspection
redirects:writeVersioned redirect creation, update, and deletion; implies read
comments:readStored non-trashed comments and their personal data
comments:moderateExpected-status moderation; implies read
media:readReady-media metadata and authenticated asset URLs
media:bytes:readBounded media bytes and content hashes
media:metadata:writeAlt text, caption, and focal-point updates
media:writeUpload and delete; implies media read
network:requestctx.http.fetch() restricted to allowedHosts
network:request:unrestrictedctx.http.fetch() without a host list
users:readUser directory lookup; also required by comment hooks
email:sendEmail delivery when a transport is configured
hooks.email-transport:registerExclusive email:deliver hook
hooks.email-events:registerEmail before/after hooks
hooks.page-fragments:registerTrusted-only page fragments; excluded from sandbox registration

Settings, KV, declared storage, logging, and cron scheduling are plugin-scoped and need no capability. Use ctx.settings for user configuration, ctx.kv for internal key-value state, and declared ctx.storage.<collection> for queryable records.

Read the focused reference for the API being used:

  • Content, schema, translations, and publication
  • Taxonomies and redirects
  • Comments
  • Media
  • Storage, KV, and encrypted settings

Routes, HTTP, and MCP

Routes are private by default and require authentication, their declared RBAC permission, token scope or CSRF as appropriate. Public routes are internet-facing and require explicit install consent.

Undeclared routes keep the legacy JSON/query envelope. Declare methods and body modes for host-enforced parsing. Use pluginResponse() only on a route that declares a raw response. Outbound ctx.http.fetch() responses and declared route bodies are buffered and bounded.

MCP tools reference private JSON routes with explicit permissions and Zod input schemas. Mark difficult-to-reverse operations destructive: true. Read API routes and MCP tools.

Hooks

Sandboxed hooks enter the same priority, dependency, timeout, error-policy, enablement, exclusive-provider, and capability pipeline as trusted hooks. Publication policy hooks identify action origin and actor without granting publication authority. Comment moderation invoked through ctx.comments reports plugin origin and runs the normal after-hook once. Read Hooks.

Declarative admin UI

Sandboxed pages and widgets return validated Block Kit. Structured links use host-resolved targets; routeCtx.ui carries host-attested locale, direction, and surface. External images require matching network authority.

Saved-entry panels and actions point to private routes. Ordinary panel load receives only host-reloaded saved identity and version. Add admin.editor-draft:read or admin.editor-draft:patch plus extension-level collection and field selectors when an explicit interaction must receive selected unsaved fields or propose an atomic whole-field patch. Patch does not imply read. The host previews accepted patches, marks the form dirty, and never saves them automatically. Read saved content through capability-gated ctx.content.

Declarative field widgets currently compose supported Block Kit elements into a JSON value. Custom Portable Text blocks and Astro render components remain native-only. Read Admin UI, Block Kit, and Portable Text blocks.

Runner parity

Cloudflare Worker Loader and Node/workerd execute the same bundle behind a plugin-scoped bridge. Both return buffered WHATWG responses from ctx.http.fetch() with binary bytes preserved and decoded request/response bodies limited to 8 MiB. Write against exported types, not extra methods found in one wrapper.

Read Sandbox boundaries before designing around an API not listed here.

Test the production boundary

Use createPluginTestHost() for fast hook, route, manifest, capability, KV, settings, and storage transport tests. Use createPluginRuntimeTestHost() when the test must exercise real content actions, plugin activation, media, comments, redirects, scheduling, restart, authorization, CSRF, caching, Block Kit validation, or saved-entry extensions.

Runtime fixtures establish state without firing hooks. Runtime actions call production boundaries; inspectors read observable state. Queue outbound HTTP responses with host.http.respond() and inspect requests with host.http.requests(). Dispose every host after use. Add Node/workerd parity only for runner-sensitive behavior.

References

  • Content, schema, translations, and publication
  • Taxonomies and redirects
  • Comments
  • Media
  • Hooks
  • Storage, KV, and encrypted settings
  • Admin UI and field widgets
  • API routes and MCP tools
  • Block Kit
  • Portable Text blocks
  • Sandbox boundaries
  • Publishing

FAQ

What does the creating-plugins skill do?

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.

How do I install creating-plugins?

Run npx skills add https://github.com/emdash-cms/emdash --skill creating-plugins in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/creating-plugins/ (personal) or .claude/skills/creating-plugins/ (project).

Which AI agents can use creating-plugins?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is creating-plugins safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains creating-plugins?

It is published by emdash-cms in emdash-cms/emdash. It has 128 recorded installs.

More from emdash-cms/emdash

View all →

building-emdash-site

emdash-cms/emdash

Open the skill to read its SKILL.md instructions.

161 installs

emdash-cli

emdash-cms/emdash

Use the EmDash CLI to inspect and manage an EmDash instance from the command line, including content, schema, media, taxonomies, menus, search, authentication, seeds, migrations, generated types, and whole-site export and import.

142 installs

adversarial-reviewer

emdash-cms/emdash

Open the skill to read its SKILL.md instructions.

118 installs

Open the skill to read its SKILL.md instructions.

68 installs

wordpress-theme-to-emdash

emdash-cms/emdash

Open the skill to read its SKILL.md instructions.

agent-browser

emdash-cms/emdash

Open the skill to read its SKILL.md instructions.

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs