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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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.
댓글
- …
이 저장소의 다른 스킬
adversarial-reviewer
14k에이전트가 코드 변경에서 숨은 버그와 안전하지 않은 가정을 찾도록 돕습니다. 요청하면 일반 리뷰를 넘어서는 심층 탐색을 합니다.
agent-browser
14k에이전트가 실제 브라우저에서 웹 페이지를 열어 동작을 확인하고, 증거로 스크린샷을 남기도록 돕습니다.
building-emdash-site
14k에이전트가 Astro 기반 EmDash CMS 프로젝트의 사이트 부분을 만들도록 돕습니다. 콘텐츠, 스키마, 메뉴, 분류, 배포를 다룹니다.
emdash-cli
14k에이전트가 명령줄에서 EmDash 사이트를 관리하도록 돕습니다. 콘텐츠, 미디어, 메뉴, 마이그레이션, 전체 사이트 내보내기와 가져오기를 포함합니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.