creating-plugins
यह क्या करती है
यह स्किल EmDash कंटेंट मैनेजमेंट सिस्टम के लिए प्लगइन नाम के एक्सटेंशन बनाने का मार्गदर्शन करती है। यह उन डेवलपर्स के लिए है जो EmDash साइट में कस्टम फ़ीचर या एडमिन स्क्रीन जोड़ना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप प्लगइन के ज़रिए EmDash साइट में कोई नया फ़ीचर जोड़ना चाहते हैं।
- ✓जब आपको अपने एडमिन स्क्रीन या API routes वाला प्लगइन चाहिए।
- ✓जब आप ऐसा प्लगइन प्रकाशित करना चाहते हैं जिसे दूसरे रजिस्ट्री से इंस्टॉल कर सकें।
Skill का लिंक
https://github.com/emdash-cms/emdash/blob/main/skills/creating-plugins/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे लिए एक EmDash प्लगइन बनाने में मदद कर सकते हैं, जो एडमिन एरिया में एक कस्टम फ़ॉर्म जोड़े?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट sandboxed प्लगइन और भरोसेमंद native प्लगइन के बीच चुनता है, प्रोजेक्ट का ढाँचा बनाता है, और hooks, routes व एडमिन पेज लागू करता है। फिर वह प्लगइन के टेस्ट चलाता है।
तकनीकी सामग्री (मूल 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 |
अक्सर पूछे जाने वाले सवाल
sandboxed और native प्लगइन में क्या फ़र्क है?
sandboxed प्लगइन सीमित पहुँच के साथ चलते हैं और रजिस्ट्री से इंस्टॉल हो सकते हैं, जबकि native प्लगइन साइट के पूरे अधिकार के साथ चलते हैं और केवल भरोसेमंद कोड के लिए ठीक हैं।
क्या यह शुरुआती प्रोजेक्ट देती है?
हाँ। प्लगइन कमांड एक शुरुआती प्रोजेक्ट बनाता है।
क्या प्लगइन React स्क्रीन जोड़ सकते हैं?
native प्लगइन एडमिन और साइट पेजों के लिए 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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
adversarial-reviewer
14kयह आपके एजेंट को कोड बदलाव में छिपे बग और असुरक्षित मान्यताएँ खोजने में मदद करती है, जब आप इसे माँगें तो सामान्य समीक्षा से आगे जाकर।
agent-browser
14kयह आपके एजेंट को असली ब्राउज़र में वेब पेज परखने, उपयोगकर्ता को क्या दिखता है जाँचने, क्रियाएँ सत्यापित करने और सबूत के लिए स्क्रीनशॉट लेने देती है।
building-emdash-site
14kयह आपके एजेंट को Astro पर EmDash CMS प्रोजेक्ट का साइट वाला हिस्सा बनाने में मदद करती है, जिसमें कंटेंट, schema, मेन्यू, taxonomies और डिप्लॉयमेंट शामिल हैं।
emdash-cli
14kयह आपके एजेंट को कमांड लाइन से EmDash साइट संभालने देती है, जिसमें कंटेंट, मीडिया, मेन्यू, migrations और पूरी साइट का एक्सपोर्ट या इम्पोर्ट शामिल है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।