跳到正文
Skillpedia
通用编程41k · #6547

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/plugin-creator/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Pick a Codewhale-owned location:
    • User bundle: ~/.codewhale/plugins/<plugin-name>/
    • Workspace bundle: <workspace>/.codewhale/plugins/<plugin-name>/
  2. Normalize the bundle name to lowercase hyphen-case.
  3. Create plugin.json (Agent Plugins v1.0.0; a legacy plugin.toml stays readable, but new bundles use plugin.json):
{
  "$schema": "https://agent-plugins.org/schemas/plugin.json",
  "name": "my-plugin",
  "version": "0.1.0",
  "description": "What this bundle provides"
}
  1. Put each Skill under skills/<skill-name>/SKILL.md; Codewhale finds skills/ automatically and exposes each as my-plugin:<skill-name>, never as an unqualified command.
  2. Add MCP servers in a sibling mcp.json only 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 in capabilities.network_hosts under extensions["net.codewhale"]. Never place credentials in the manifest.
  3. Commands (commands/*.md), agents (agents/*.toml), and hooks (hooks/*.toml), declared under extensions["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. A native entry runs only under the experimental extension host; there it must be one .mjs, .js or .mts ES module file, /plugin validate rejects anything else, and its tools always use Required approval, 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.
  4. 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
  5. Verify /skills inspect reports plugin provenance and /plugin list reports 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 /reload or 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能