Token导航 LogoToken导航

Agent Skill · 开发

creating-plugins(创建插件)

creating-plugins 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

creating-plugins 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 18,732。

总安装 318周安装 13GitHub Stars 10,135下载 103核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:creating-plugins(创建插件)
来源仓库:https://github.com/emdash-cms/emdash
仓库路径:skills/creating-plugins
安装命令:
npx skills add https://github.com/emdash-cms/emdash --skill creating-plugins
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

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

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定仓库安装使用。

安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。creating-plugins 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/creating-plugins

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/emdash-cms/emdash --skill creating-plugins;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

creating-plugins 怎么安装?

在终端执行 npx skills add https://github.com/emdash-cms/emdash --skill creating-plugins。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

creating-plugins 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

creating-plugins 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

creating-plugins 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

creating-plugins 用的人多吗?

公开数据是累计安装 318 次,近一周安装 13 次,下载 103 次,GitHub 10,135 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

creating-plugins 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 10,135 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
creating-plugins

创建插件 · 本页

31810,135操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Creating EmDash Plugins

EmDash plugins extend the CMS with hooks, storage, settings, admin UI, API routes, and custom Portable Text block types. All plugins are TypeScript packages.

Plugin Types

EmDash has two plugin formats:

TypeFormatAdmin UIWhere it runs
StandarddefinePlugin({hooks, routes})Block KitIsolate on Cloudflare, in-process elsewhere
NativecreatePlugin() / definePlugin() with id+versionReact or Block KitAlways in host isolate

Standard is the default. Most plugins should use it. Standard plugins can be published to the marketplace and work in both trusted and sandboxed modes.

Native is an escape hatch for plugins that need React admin components, direct DB access, or custom Astro components. Native plugins can only run in plugins: [] -- they cannot be sandboxed or published to the marketplace.

Plugin Anatomy

Every plugin has two parts that run in different contexts:

  1. Plugin descriptor (PluginDescriptor) — returned by the factory function in index.ts. Declares metadata (id, version, capabilities, storage). Runs at build time in Vite (imported in astro.config.mjs). Must be side-effect-free.
  2. Plugin definition (definePlugin()) — contains the runtime logic (hooks, routes). Runs at request time on the deployed server. Has access to the full plugin context (ctx). Lives in a separate file (typically sandbox-entry.ts).

These must be in separate entrypoints because they execute in completely different environments:

my-plugin/
├── src/
│   ├── index.ts            # Descriptor factory (runs in Vite at build time)
│   ├── sandbox-entry.ts    # Plugin definition with definePlugin() (runs at deploy time)
│   ├── admin.tsx            # Admin UI exports (React) — optional, native only
│   └── astro/               # Site-side rendering components — optional, native only
│       └── index.ts         # Must export `blockComponents`
├── package.json
└── tsconfig.json

Minimal Plugin (Standard Format)

The simplest possible plugin -- just hooks:

// src/index.ts — descriptor factory, runs in Vite at build time
import type { PluginDescriptor } from "emdash";

export function myPlugin(): PluginDescriptor {
	return {
		id: "my-plugin",
		version: "1.0.0",
		format: "standard",
		entrypoint: "@my-org/my-plugin/sandbox",
		options: {},
	};
}
// src/sandbox-entry.ts — plugin definition, runs at request time
import { definePlugin } from "emdash";
import type { PluginContext } from "emdash";

export default definePlugin({
	hooks: {
		"content:afterSave": {
			handler: async (event: any, ctx: PluginContext) => {
				ctx.log.info(`Saved ${event.collection}/${event.content.id}`);
			},
		},
	},
});

The descriptor is what gets imported in astro.config.mjs. The entrypoint field points to the module containing the definePlugin() default export. For standard plugins, this is the ./sandbox export from package.json.

Key differences from native format:

  • No id, version, or capabilities in definePlugin() -- those live in the descriptor
  • definePlugin() is an identity function providing type inference
  • Hook handlers use (event, ctx) two-arg pattern
  • Route handlers use (routeCtx, ctx) two-arg pattern
  • Exported as default (not a factory function)

Plugin ID Rules

  • Lowercase alphanumeric + hyphens only
  • Simple (my-plugin) or scoped (@my-org/my-plugin)
  • Unique across all installed plugins

Registration

The descriptor is imported in astro.config.mjs (Vite context):

import { myPlugin } from "@my-org/my-plugin";

export default defineConfig({
	integrations: [
		emdash({
			plugins: [myPlugin()], // runs in-process
			// OR
			sandboxed: [myPlugin()], // runs in isolate on Cloudflare
		}),
	],
});

Standard plugins work in either array. Native plugins only work in plugins: [].

Trusted vs Sandboxed Plugins

EmDash has two execution modes. Plugin code is identical in both — only the enforcement changes.

TrustedSandboxed
Runs inMain processIsolated V8 isolate (Dynamic Worker Loader)
Install methodastro.config.mjs (code change + deploy)Admin UI (one-click from marketplace)
CapabilitiesAdvisory (not enforced)Enforced at runtime via RPC bridge
Resource limitsNoneCPU 50ms, 10 subrequests, 30s wall-time, ~128MB memory
Network accessUnrestrictedBlocked; only via ctx.http with allowedHosts
Data accessFull database accessScoped to declared capabilities
Node.js APIsFull accessNot available (V8 isolate only)
Available onAll platformsCloudflare Workers only
Best forFirst-party code, reviewed npm packagesThird-party extensions, marketplace plugins

Trusted Mode

Trusted plugins are npm packages or local files added in astro.config.mjs. They run in-process with your Astro site.

  • Capabilities are documentation only. Declaring ["content:read"] documents intent but isn't enforced — the plugin has full process access.
  • Only install from sources you trust. A malicious trusted plugin has the same access as your application code.

Sandboxed Mode

Sandboxed plugins run in isolated V8 isolates on Cloudflare Workers via Dynamic Worker Loader. Each plugin gets its own isolate.

  • Capabilities are enforced. If a plugin declares ["content:read"], it can only call ctx.content.get() and ctx.content.list(). Attempting ctx.content.create() throws a permission error.
  • Network is blocked by default. Direct fetch() calls fail. Plugins must use ctx.http.fetch(), which validates against allowedHosts.
  • Storage is scoped. A plugin can only access its own KV and storage collections.
  • Admin UI uses Block Kit. Sandboxed plugins describe their UI as JSON blocks -- no plugin JavaScript runs in the browser. See Block Kit reference.
  • No Portable Text block types. PT blocks require Astro components for site-side rendering (componentsEntry), which are loaded at build time from npm. Sandboxed plugins are installed at runtime and can't ship components. PT blocks are a native-plugin-only feature.
  • Routes work. Standard plugin routes are available in both trusted and sandboxed modes via the sandbox runner's invokeRoute() RPC.

Sandboxing is not available on Node.js. All plugins run in trusted mode on non-Cloudflare platforms.

Developing for Both Modes

Write the same code. Develop locally in trusted mode (faster iteration, easier debugging). Deploy to sandboxed mode in production without code changes. With the standard format, the same entrypoint serves both modes -- no separate sandbox entry needed.

// src/sandbox-entry.ts -- works in both trusted and sandboxed modes
import { definePlugin } from "emdash";
import type { PluginContext } from "emdash";

export default definePlugin({
	hooks: {
		"content:afterSave": {
			handler: async (event: any, ctx: PluginContext) => {
				// Trusted: ctx.http present because descriptor declares network:request
				// Sandboxed: ctx.http present and enforced via RPC bridge
				if (!ctx.http) return;
				await ctx.http.fetch("https://api.analytics.example.com/track", {
					method: "POST",
					body: JSON.stringify({ contentId: event.content.id }),
				});
			},
		},
	},
});

Key constraint for sandbox compatibility: no Node.js built-ins (fs, path, child_process, etc.) in backend code. Use Web APIs instead.

Capabilities

Capabilities control what APIs are available on ctx. Always declare what your plugin needs — even in trusted mode, they document intent and are required for sandboxed execution.

CapabilityGrantsctx property
content:readctx.content.get(), ctx.content.list()content
content:writectx.content.create(), ctx.content.update(), ctx.content.delete()content
media:readctx.media.get(), ctx.media.list()media
media:writectx.media.getUploadUrl(), ctx.media.delete()media
network:requestctx.http.fetch() (restricted to allowedHosts)http
network:request:unrestrictedctx.http.fetch() (unrestricted — for user-configured URLs)http
users:readctx.users.get(), ctx.users.list(), ctx.users.getByEmail()users
email:sendctx.email.send() — send email through the pipelineemail
hooks.email-transport:registerCan register email:deliver exclusive hook (transport provider)—
hooks.email-events:registerCan register email:beforeSend / email:afterSend hooks—
hooks.page-fragments:registerCan register page:fragments hook (inject scripts/styles into pages)—

Storage (ctx.storage) and KV (ctx.kv) are always available — no capability needed. They're automatically scoped to the plugin.

Email capabilities are distinct:

  • email:send — for plugins that *consume* email (call ctx.email.send())
  • hooks.email-transport:register — for plugins that *deliver* email (implement the transport, e.g. Resend, SMTP)
  • hooks.email-events:register — for plugins that *observe or transform* email (middleware hooks)
// In the descriptor (index.ts)
export function myPlugin(): PluginDescriptor {
	return {
		id: "my-plugin",
		version: "1.0.0",
		format: "standard",
		entrypoint: "@my-org/my-plugin/sandbox",
		options: {},
		capabilities: ["content:read", "network:request"],
		allowedHosts: ["api.example.com", "*.googleapis.com"], // Wildcards supported
	};
}

When a marketplace plugin is installed, the admin sees a capability consent dialog listing what the plugin can access. Users must approve before installation.

Publishing to the Marketplace

Standard plugins can be published to the EmDash Marketplace for one-click installation:

emdash plugin bundle --dir packages/plugins/my-plugin  # creates .tar.gz
emdash plugin login                                      # authenticate via GitHub
emdash plugin publish --tarball dist/my-plugin-1.0.0.tar.gz

See Publishing Reference for bundle format, validation, and security audit details.

Package Exports

Configure package.json exports so EmDash can load each entry point:

{
	"name": "@my-org/my-plugin",
	"type": "module",
	"exports": {
		".": "./src/index.ts",
		"./sandbox": "./src/sandbox-entry.ts",
		"./admin": "./src/admin.tsx"
	},
	"peerDependencies": {
		"emdash": "^0.1.0"
	}
}
ExportContextPurpose
"."Vite (build time)Descriptor factory -- imported in astro.config.mjs
"./sandbox"Server (runtime)definePlugin({hooks, routes}) -- loaded by entrypoint at runtime
"./admin"BrowserReact components for admin pages/widgets (native plugins only)
"./astro"Server (SSR)Astro components for site-side block rendering (native plugins only)

The "." export has the descriptor. The "./sandbox" export has the implementation. The descriptor's entrypoint field points to "./sandbox". Only include ./admin and ./astro exports for native-format plugins.

Plugin Features

Each feature is optional. Add only what your plugin needs:

FeatureWhereStandardNativePurpose
HooksdefinePlugin({hooks})YesYesReact to content/media/lifecycle events
Storagedescriptor storageYesYesDocument collections with indexed queries
KVctx.kv in hooks/routesYesYesKey-value store for internal state
API RoutesdefinePlugin({routes})YesYesREST endpoints at /_emdash/api/plugins/<id>/<route>
Admin PagesBlock Kit admin routeYesYesAdmin pages via Block Kit (JSON blocks)
WidgetsBlock Kit admin routeYesYesDashboard cards via Block Kit
React Adminadmin.entry + React exportNoYesReact-based admin pages and widgets (native only)
PT Blocksadmin.portableTextBlocksNoYesCustom block types in the Portable Text editor
Site ComponentscomponentsEntryNoYesAstro components for rendering blocks on the site

See the reference files for detailed syntax:

Complete Example: Standard Plugin with Hooks, Routes, and Storage

// src/index.ts — descriptor factory, runs in Vite at build time
import type { PluginDescriptor } from "emdash";

export function submissionsPlugin(): PluginDescriptor {
	return {
		id: "submissions",
		version: "1.0.0",
		format: "standard",
		entrypoint: "@my-org/plugin-submissions/sandbox",
		options: {},
		capabilities: ["content:read"],
		storage: {
			submissions: {
				indexes: ["formId", "status", "createdAt"],
			},
		},
		adminPages: [{ path: "/submissions", label: "Submissions", icon: "list" }],
		adminWidgets: [{ id: "recent-submissions", title: "Recent Submissions", size: "half" }],
	};
}
// src/sandbox-entry.ts — plugin definition, runs at request time
import { definePlugin } from "emdash";
import type { PluginContext } from "emdash";

export default definePlugin({
	hooks: {
		"plugin:install": {
			handler: async (_event: any, ctx: PluginContext) => {
				ctx.log.info("Submissions plugin installed");
				await ctx.kv.set("settings:maxSubmissions", 1000);
			},
		},
	},

	routes: {
		submit: {
			public: true, // No auth required
			handler: async (routeCtx: any, ctx: PluginContext) => {
				const { formId, ...data } = routeCtx.input as Record<string, unknown>;

				const count = await ctx.storage.submissions.count({ formId });
				const max = (await ctx.kv.get<number>("settings:maxSubmissions")) ?? 1000;

				if (count >= max) {
					return { success: false, error: "Submission limit reached" };
				}

				const id = `${Date.now()}-${Math.random().toString(36).slice(2)}`;
				await ctx.storage.submissions.put(id, {
					formId,
					data,
					status: "pending",
					createdAt: new Date().toISOString(),
				});

				return { success: true, id };
			},
		},

		list: {
			handler: async (routeCtx: any, ctx: PluginContext) => {
				const url = new URL(routeCtx.request.url);
				const limit = Math.max(
					1,
					Math.min(parseInt(url.searchParams.get("limit") || "50", 10) || 50, 100),
				);
				const cursor = url.searchParams.get("cursor") || undefined;

				const result = await ctx.storage.submissions.query({
					orderBy: { createdAt: "desc" },
					limit,
					cursor,
				});

				return {
					items: result.items.map((item: any) => ({ id: item.id, ...item.data })),
					cursor: result.cursor,
					hasMore: result.hasMore,
				};
			},
		},

		// Block Kit admin handler for pages and widgets
		admin: {
			handler: async (routeCtx: any, ctx: PluginContext) => {
				const interaction = routeCtx.input as { type: string; page?: string };

				if (interaction.type === "page_load" && interaction.page === "/submissions") {
					const result = await ctx.storage.submissions.query({
						orderBy: { createdAt: "desc" },
						limit: 50,
					});
					return {
						blocks: [
							{ type: "header", text: "Submissions" },
							{
								type: "table",
								blockId: "submissions-table",
								columns: [
									{ key: "formId", label: "Form", format: "text" },
									{ key: "status", label: "Status", format: "badge" },
									{ key: "createdAt", label: "Date", format: "relative_time" },
								],
								rows: result.items.map((item: any) => item.data),
							},
						],
					};
				}

				return { blocks: [] };
			},
		},
	},
});

Plugin Context

All hooks and routes receive ctx (PluginContext):

interface PluginContext {
	plugin: { id: string; version: string };
	storage: Record<string, StorageCollection>; // Declared collections
	kv: KVAccess; // Key-value store
	log: LogAccess; // Structured logger
	content?: ContentAccess; // If "content:read" capability
	media?: MediaAccess; // If "media:read" capability
	http?: HttpAccess; // If "network:request" capability
	users?: UserAccess; // If "users:read" capability
	cron?: CronAccess; // Always available — scoped to plugin
	email?: EmailAccess; // If "email:send" capability AND a provider is configured
}

Capabilities are declared in the descriptor (not in definePlugin() for standard format):

// In the descriptor
export function myPlugin(): PluginDescriptor {
	return {
		id: "my-plugin",
		version: "1.0.0",
		format: "standard",
		entrypoint: "@my-org/my-plugin/sandbox",
		options: {},
		capabilities: ["content:read", "network:request"],
		allowedHosts: ["api.example.com"],
		storage: { events: { indexes: ["timestamp"] } },
	};
}

Output Checklist

When creating a standard-format plugin, provide:

  1. src/index.ts -- Descriptor factory (runs in Vite at build time)
  2. src/sandbox-entry.ts -- definePlugin({hooks, routes}) as default export (runs at request time)
  3. package.json -- With exports "." (descriptor) and "./sandbox" (implementation)
  4. tsconfig.json -- Standard TypeScript config

For native-format plugins (React admin, PT blocks, Astro components), also provide:

  1. src/admin.tsx -- Admin entry point with React components
  2. src/astro/index.ts -- Block components export (if PT blocks)

平台分布

Codex

33.02%
按下载量换算34

Claude

30.27%
按下载量换算31

Cursor

19.09%
按下载量换算20

Gemini CLI

9.46%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills