orderly-plugin-gen
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOrderly Plugin Generator
Orderly 插件生成器
Quickly generate plugin project scaffolding in the Orderly SDK monorepo.
快速在Orderly SDK monorepo中生成插件项目脚手架。
Trigger
触发条件
When the user's message contains the following keywords, proactively ask whether to use this Skill to generate a plugin template:
- create a plugin / generate a plugin / develop a plugin / register a plugin
Example prompt: "Detected that you want to create an Orderly plugin. Would you like to use the orderly-plugin-gen scaffold to generate a template?"
当用户消息包含以下关键词时,主动询问是否使用此Skill生成插件模板:
- create a plugin / generate a plugin / develop a plugin / register a plugin
示例提示语:"检测到您想要创建Orderly插件。是否要使用orderly-plugin-gen脚手架生成模板?"
Workflow
工作流程
Step 1: Gather information
步骤1:收集信息
Ask the user for the following (using the AskQuestion tool):
- Plugin name (required): e.g. ,
orderbook-flash. Only lowercase letters, numbers, and hyphens are allowed.pnl-card - Plugin type (required): /
widget/pagelayout - Output path (optional): Parent path for the plugin directory. Defaults to the current project's directory.
packages/
向用户询问以下信息(使用AskQuestion工具):
- 插件名称(必填):例如 、
orderbook-flash。仅允许小写字母、数字和连字符。pnl-card - 插件类型(必填):/
widget/pagelayout - 输出路径(可选):插件目录的父路径。默认为当前项目的目录。
packages/
Step 2: Run the script
步骤2:运行脚本
Run the generation script with the Shell tool (Node.js >=20.19.0 required):
bash
node ~/.cursor/skills/orderly-plugin-gen/scripts/create-plugin.mjs \
--name <plugin-name> \
--type <widget|page|layout> \
--path <absolute-parent-path>使用Shell工具运行生成脚本(需要Node.js >=20.19.0):
bash
node ~/.cursor/skills/orderly-plugin-gen/scripts/create-plugin.mjs \
--name <plugin-name> \
--type <widget|page|layout> \
--path <absolute-parent-path>Step 3: Report results
步骤3:报告结果
After the script runs, report to the user:
- The generated plugin ID
- The list of created files
- Follow-up steps:
- Run to install dependencies
pnpm install - Edit to add business logic
src/index.tsx - Register the plugin in the host app via the prop of
pluginsOrderlyProvider
- Run
脚本运行完成后,向用户报告:
- 生成的插件ID
- 创建的文件列表
- 后续步骤:
- 运行安装依赖
pnpm install - 编辑添加业务逻辑
src/index.tsx - 通过的
OrderlyProvider属性在宿主应用中注册插件plugins
- 运行
Generated Structure
生成的结构
plugin-<name>/
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── src/
├── index.tsx
└── components/
└── .gitkeepplugin-<name>/
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── src/
├── index.tsx
└── components/
└── .gitkeepAdditional Resources
附加资源
- For plugin system API reference, see reference.md
- 插件系统API参考,请查看reference.md