create-plugin-scaffold
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate plugin scaffold
创建插件脚手架
Trigger
触发场景
You need to create a new Cursor plugin from scratch and make it ready for local use or marketplace submission.
当你需要从零开始创建一个新的Cursor插件,并使其可用于本地使用或提交至插件市场时。
Required Inputs
必填输入项
- Plugin name (lowercase kebab-case)
- Plugin purpose and target users
- Component set to include (,
rules,skills,agents,commands,hooks)mcpServers - Repository style (or
single-plugin)multi-plugin marketplace
- 插件名称(小写短横线命名格式,kebab-case)
- 插件用途与目标用户
- 需包含的组件集合(、
rules、skills、agents、commands、hooks)mcpServers - 仓库类型(或
single-plugin)multi-plugin marketplace
Output Location
输出位置
By default, create the plugin inside the user's local plugin directory:
~/.cursor/plugins/local/<plugin-name>/This path makes the plugin immediately available to Cursor without any install step. If the user explicitly asks to create the plugin elsewhere (e.g. inside an existing repo or a specific directory), respect that choice instead.
默认情况下,在用户本地插件目录内创建插件:
~/.cursor/plugins/local/<plugin-name>/该路径无需任何安装步骤即可让Cursor立即识别插件。如果用户明确要求在其他位置创建插件(例如现有仓库内或指定目录),则遵循用户的选择。
Workflow
工作流程
- Validate plugin name format: lowercase kebab-case, starts and ends with an alphanumeric character.
- Determine the target directory:
- Default:
~/.cursor/plugins/local/<plugin-name>/ - Override: use the path the user specifies, if any.
- Create the directory (and parents) if it does not exist.
- Default:
- Create base files inside the target directory:
.cursor-plugin/plugin.jsonREADME.mdLICENSE- optional
CHANGELOG.md
- Populate :
plugin.json- Required:
name - Recommended: ,
version,description,author,licensekeywords - Add explicit component paths only when non-default discovery is needed.
- Required:
- Create component files with valid frontmatter:
- Rules: with
.mdc,description, optionalalwaysApplyglobs - Skills: with
skills/<skill-name>/SKILL.md,namedescription - Agents: with
agents/*.md,namedescription - Commands: with
commands/*.(md|txt),namedescription
- Rules:
- If repository uses , add plugin entry:
.cursor-plugin/marketplace.jsonnamesource- optional metadata (,
description,keywords,category)tags
- Ensure all manifest paths are relative, valid, and do not use absolute paths or parent traversal.
- 验证插件名称格式:小写短横线命名,首尾为字母数字字符。
- 确定目标目录:
- 默认:
~/.cursor/plugins/local/<plugin-name>/ - 自定义:若用户指定路径,则使用该路径。
- 若目录不存在,创建该目录(及父目录)。
- 默认:
- 在目标目录内创建基础文件:
.cursor-plugin/plugin.jsonREADME.mdLICENSE- 可选的
CHANGELOG.md
- 填充内容:
plugin.json- 必填项:
name - 推荐项:、
version、description、author、licensekeywords - 仅当需要非默认发现机制时,添加明确的组件路径。
- 必填项:
- 创建带有有效前置元数据的组件文件:
- Rules:文件,包含
.mdc、description,可选alwaysApplyglobs - Skills:文件,包含
skills/<skill-name>/SKILL.md、namedescription - Agents:文件,包含
agents/*.md、namedescription - Commands:文件,包含
commands/*.(md|txt)、namedescription
- Rules:
- 如果仓库使用,添加插件条目:
.cursor-plugin/marketplace.jsonnamesource- 可选元数据(、
description、keywords、category)tags
- 确保所有清单路径均为相对路径、有效路径,不使用绝对路径或父目录遍历。
Guardrails
约束规则
- Keep the plugin focused on one use case.
- Prefer concise, actionable skill and rule text over long prose.
- Do not reference files that do not exist.
- Use folder discovery defaults unless custom paths are required.
- Always save to unless the user provides a different path.
~/.cursor/plugins/local/<plugin-name>/
- 插件需聚焦单一使用场景。
- 技能和规则文本优先选择简洁、可执行的内容,避免冗长描述。
- 不得引用不存在的文件。
- 除非需要自定义路径,否则优先使用文件夹发现默认设置。
- 除非用户提供其他路径,否则始终保存至。
~/.cursor/plugins/local/<plugin-name>/
Output
输出内容
- Created file tree for the plugin (with full path to the output directory)
- Final
plugin.json - Marketplace entry (if applicable)
- Short validation report of required fields and component metadata
- Confirmation that the plugin is saved under and ready for use
~/.cursor/plugins/local/
- 插件的完整文件树(包含输出目录的完整路径)
- 最终的内容
plugin.json - 插件市场条目(如适用)
- 必填字段和组件元数据的简短验证报告
- 确认插件已保存至并可立即使用
~/.cursor/plugins/local/