plugin-creator
GitHub用于生成 Codewhale 本地插件包,包含版本化清单、命名空间技能及安全信任审查流程。
Trigger Scenarios
Install
npx skills add codewhale-hq/Codewhale --skill plugin-creator -g -y
SKILL.md
Frontmatter
{
"name": "plugin-creator",
"description": "Scaffold a local Codewhale plugin bundle with a versioned manifest, namespaced Skills, and an explicit trust review."
}
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.
Version History
-
6f95551
Current 2026-10-19 04:40
将插件清单格式从 TOML 迁移至 JSON;新增对 .mts/.js/.mts ES 模块原生扩展的支持及验证流程。
-
6e005de
2026-09-22 10:00
新增对 agents、hooks 和 LSP 等组件的声明支持;明确 workspace bundle 优先级;细化 MCP 安全规范。
-
0fe366b
2026-08-16 09:03
从整体捆绑门控改为按组件兼容性激活,支持混合插件中 Skill 和 MCP 的独立启用,引入 v2 能力哈希以绑定激活策略。
- b0e4926 2026-07-24 17:42


