plugin-creator
GitHub用于创建和初始化 DotCraft 本地插件目录。支持生成 plugin.json、内置技能、MCP 服务器配置及生命周期钩子等,适用于开发插件或构建技能/MCP/钩子插件包。
Trigger Scenarios
Install
npx skills add DotHarness/dotcraft --skill plugin-creator -g -y
SKILL.md
Frontmatter
{
"name": "plugin-creator",
"description": "Create and scaffold DotCraft local plugin directories with `.craft-plugin\/plugin.json`, plugin-contained skills, optional plugin-bundled MCP server config, optional lifecycle hooks, and optional assets. Use when developing DotCraft plugins or creating a skill\/MCP\/hooks plugin bundle for `.craft\/plugins` or `~\/.craft\/plugins`."
}
Plugin Creator
Use this skill when the user wants to create, scaffold, or maintain a DotCraft plugin directory.
Quick Start
Default to a workspace-local plugin under <workspace>/.craft/plugins/<plugin-id>:
python .craft/skills/plugin-creator/scripts/create_basic_plugin.py "My Plugin"
If reading the skill from the source tree instead of a deployed workspace skill, use the source-tree script path from the repo root:
python src/DotCraft.Core/Skills/BuiltIn/plugin-creator/scripts/create_basic_plugin.py "My Plugin"
Use --path when the user asks for another parent directory, such as a user-global plugin container:
python .craft/skills/plugin-creator/scripts/create_basic_plugin.py "My Plugin" --path "$HOME/.craft/plugins"
Defaults
- Normalize plugin ids to lowercase hyphen-case, max 64 characters.
- Create
<parent>/<plugin-id>/.craft-plugin/plugin.json. - Create a skill plugin by default with
skills: "./skills/". - Create
skills/<skill-name>/SKILL.md;--skill-namedefaults to the plugin id. - Add
--with-mcpto create a plugin-bundled.mcp.jsonplaceholder. - Add
--with-hooksto create a plugin-bundledhooks/hooks.jsonplaceholder. - Add
--with-assetsto create plugin-level icon/logo placeholders.
Manifest Rules
DotCraft schema version 1 allows a plugin to contribute skills, MCP servers, lifecycle hooks, interface metadata, or a combination of these.
- Skill-only plugins are valid when
skillspoints to a plugin-contained skills directory. - MCP-only plugins are valid when
mcpServerspoints to a plugin-bundled MCP config or a root.mcp.jsonexists. - Hooks-only plugins are valid when
hookspoints to plugin hook files or a roothooks/hooks.jsonexists. - Interface-only plugins are valid for catalog or UI metadata.
- Manifest fields
tools,functions, andprocessesare unsupported legacy native tool fields and must not be generated for new plugins. - Reusable executable capabilities should be exposed through MCP.
- Thread-scoped AppServer client callbacks should use Runtime Dynamic Tools, not plugin manifest fields.
- Manifest-relative paths must start with
./, stay inside the plugin root, and never contain...
For exact examples, read references/plugin-json-spec.md.
MCP Plugin Template
Use this when creating a plugin that bundles MCP configuration:
python .craft/skills/plugin-creator/scripts/create_basic_plugin.py review-tools --with-mcp
After generation, replace placeholder descriptions and edit .mcp.json to point at the real MCP server command or HTTPS endpoint.
Hooks Plugin Template
Use this when creating a plugin that bundles lifecycle hooks:
python .craft/skills/plugin-creator/scripts/create_basic_plugin.py audit-hooks --without-skill --with-hooks
After generation, replace placeholder descriptions, edit hooks/hooks.json, and update helper scripts under hooks/. Plugin hook commands can use ${DOTCRAFT_PLUGIN_ROOT} and ${DOTCRAFT_PLUGIN_DATA}. First run still requires user trust through Desktop Hooks settings or hooks/setState.
Validation
After scaffolding:
- Inspect
.craft-plugin/plugin.jsonand replace TODO placeholders. - Confirm every manifest-relative path starts with
./. - If the plugin has skills, confirm each child skill has
SKILL.md. - If the plugin has MCP servers, confirm
.mcp.jsonuses the same schema as workspaceMcpServers. - If the plugin has hooks, confirm
hooks/hooks.jsonuses the same shape as.craft/hooks.json. - Run relevant DotCraft tests when changing the runtime, or start DotCraft and confirm
plugin/list,skills/list, andhooks/listshow the plugin contributions.
Version History
- f8e839e Current 2026-07-05 15:31


