본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)14k · #11247

creating-plugins

하는 일

이 스킬은 플러그인이라고 부르는 EmDash 콘텐츠 관리 시스템의 확장 기능을 만드는 방법을 안내합니다. EmDash 사이트에 맞춤 기능이나 관리자 화면을 추가하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓플러그인으로 EmDash 사이트에 새 기능을 추가하고 싶을 때.
  • ✓자체 관리자 화면이나 API 경로가 있는 플러그인이 필요할 때.
  • ✓다른 사람이 레지스트리에서 설치할 수 있도록 플러그인을 배포하고 싶을 때.

스킬 링크

https://github.com/emdash-cms/emdash/blob/main/skills/creating-plugins/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/emdash-cms/emdash/blob/main/skills/creating-plugins/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“관리자 영역에 맞춤 양식을 추가하는 EmDash 플러그인을 만드는 것을 도와줄 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 샌드박스 플러그인과 신뢰된 네이티브 플러그인 중 하나를 고르고, 프로젝트를 골격으로 만든 뒤, 훅, 경로, 관리자 페이지를 구현합니다. 그다음 플러그인의 테스트를 실행합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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
자주 묻는 질문

샌드박스 플러그인과 네이티브 플러그인은 어떻게 다른가요?

샌드박스 플러그인은 제한된 권한으로 실행되며 레지스트리에서 설치할 수 있습니다. 네이티브 플러그인은 사이트의 전체 권한으로 실행되므로 신뢰할 수 있는 코드에만 적합합니다.

시작용 프로젝트를 제공하나요?

네. 플러그인 명령으로 시작 프로젝트를 만들 수 있습니다.

플러그인에 React 화면을 추가할 수 있나요?

네이티브 플러그인은 관리자 및 사이트 페이지에 React와 Astro 컴포넌트를 사용할 수 있습니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
14k
순위
#11247
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬