plugin-creator
它能做什么
这个技能为 Codewhale 应用搭建插件的基本结构,将技能、命令和工具服务器归入一个文件夹。适合想为 Codewhale 打包自己 AI 工具的开发者。
适用场景
- ✓当你想把几项技能打包到一个本地插件中的时候。
- ✓当你想为一组工具添加带版本的插件清单的时候。
- ✓当你想在启用插件的技能和服务器之前进行检查的时候。
技能链接
https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/plugin-creator/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请创建一个名为 meeting-tools 的本地 Codewhale 插件,把我的摘要技能打包进去?”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会选择插件文件夹,创建清单,把每项技能放在其自己的文件夹中,并在信任审查后添加任何工具服务器设置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Plugin Creator
Use this skill when a user wants a local Codewhale plugin bundle. Trusted and
enabled bundles may add declarative Skills, commands, agents, hooks, and MCP
servers (stdio and remote) through the existing engines. LSP, filesystem
roots, and lifecycle mutation are inventory-only. Native extensions (host
code) are inventory-only unless the user has turned on the experimental
[features] extension_host flag.
Workflow
- Pick a Codewhale-owned location:
- User bundle:
~/.codewhale/plugins/<plugin-name>/ - Workspace bundle:
<workspace>/.codewhale/plugins/<plugin-name>/
- User bundle:
- Normalize the bundle name to lowercase hyphen-case.
- Create
plugin.json(Agent Plugins v1.0.0; a legacyplugin.tomlstays readable, but new bundles useplugin.json):
{
"$schema": "https://agent-plugins.org/schemas/plugin.json",
"name": "my-plugin",
"version": "0.1.0",
"description": "What this bundle provides"
}
- Put each Skill under
skills/<skill-name>/SKILL.md; Codewhale findsskills/automatically and exposes each asmy-plugin:<skill-name>, never as an unqualified command. - Add MCP servers in a sibling
mcp.jsononly when the bundle needs an existing MCP engine. Keep stdio commands and paths inside the bundle. Map local environment values only as exact${SOURCE_ENV}references. For remote MCP, use HTTPS (or loopback HTTP), forbid URL user information/query/fragment, use only environment-backed headers or bearer tokens, and declare the exact normalized endpoint host set incapabilities.network_hostsunderextensions["net.codewhale"]. Never place credentials in the manifest. - Commands (
commands/*.md), agents (agents/*.toml), and hooks (hooks/*.toml), declared underextensions["net.codewhale"], activate under the current policy — workspace bundles win same-name collisions over user and built-in bundles. LSP, filesystem roots, and lifecycle mutation are inventory-only: declare them only when inventorying future work. Anativeentry runs only under the experimental extension host; there it must be one.mjs,.jsor.mtsES module file,/plugin validaterejects anything else, and its tools always useRequiredapproval, never a plugin's read-only hint. Full Access, Bypass, or an exact session grant for the reviewed build can satisfy that gate without a prompt. A bundle that declares only unsupported surfaces cannot be enabled. - Validate and review without executing bundle content:
/plugin validate <plugin-name>/plugin show <plugin-name>- stop and present these results; the person runs
/plugin enable <plugin-name>to open the content/capability review, reviews it, runs the exact/plugin trust ...confirmation shown, then enables the bundle
- Verify
/skills inspectreports plugin provenance and/plugin listreports the expected trust and activation state. Trust stages the reviewed content but does not activate it. After enablement, follow the host's reload notice: use/reloador a new session to apply changes to a live session's pinned skills and tools.
Every user and workspace bundle starts untrusted and disabled. Reuse the
existing /plugin marketplace, install, update, review and reload surfaces;
do not add a parallel installer, registry or automatic trust flow. Catalog
membership alone never installs, trusts or enables a plugin.
Experimental host code
Only scaffold host code when the person explicitly uses the experimental
extension-host feature. Start from the tested hello-extension example and
docs/EXTENSIONS.md in the Codewhale repository. A typed .mts entry may use
Node's erasable TypeScript syntax; bundle dependencies locally. Register tools
with a plugin-specific prefix and an object input schema, propagate
exec.signal, and use ctx.effect for bounded asynchronous cleanup. The
current execution context exposes signal, callId and args; it does not
expose the calling workspace path. Do not change the shared process cwd.
Stop after install, validate and show; never automate the trust token. A
person reviews, trusts and enables the bundle. /plugin show <name> reports
owner state, live tools and recent attributed diagnostics. Recovery may create
fresh registrations, but never replays an interrupted tool call. Explain the
shared-process and current platform sandbox limits without claiming isolation.
常见问题
插件保存在哪里?
可以是 Codewhale 文件夹中的用户包,也可以是项目内的工作区包。
技能会自动命名吗?
会。技能说明,每项技能都以插件名称加技能名称的形式对外提供。
插件可以运行原生主机代码吗?
除非你开启实验性标志,否则原生扩展仅作为清单列出。
详情
作者的原始描述
Scaffold a local Codewhale plugin bundle with a versioned manifest, namespaced Skills, and an explicit trust review.
repo: codewhale-hq/Codewhale
热度
- GitHub 星标
- 41k
- 排名
- #6547
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …