create-plugin
Turn a plugin the user describes into a draft Ru plugin folder (ru-plugin.json, instructions, skills, hooks, MCP servers) in the workspace, ready for Customize → Plugins → Add plugin → Add from folder.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- create-plugin
- description
- Turn a plugin the user describes into a draft Ru plugin folder (ru-plugin.json, instructions, skills, hooks, MCP servers) in the workspace, ready for Customize → Plugins → Add plugin → Add from folder.
03 SKILL.md 正文
Create a Ru plugin
A Ru plugin is a folder with ru-plugin.json and any of AGENTS.md, skills/, hooks.json
and mcp.json. Installed plugins live in ~\.ru\plugins, which your tools cannot write. You
write a draft in the workspace; the user imports it, turns it on and approves any commands.
Steps
-
Ask only what you need: what the plugin should do, and whether it needs to run programs (hooks or MCP servers). Prefer instructions and skills; add commands only when asked.
-
Pick an id: lowercase letters, digits and dashes, starting with a letter, at most 24 characters, no trailing dash (for example
team-rules). -
Create the draft folder
ru-plugin-drafts\<id>at the workspace root. Never use a folder whose name starts with a dot, and never write under~\.ru. -
Write
ru-plugin.json. Only these fields are allowed, andidmust equal the folder name:{ "id": "team-rules", "name": "Team rules", "description": "Our review checklist and commit style", "version": "0.1.0" } -
Add the parts the user asked for:
AGENTS.md: instructions Ru reads in every run while the plugin is on. Keep it short and specific.skills\<skill-id>\SKILL.md: a reusable workflow, loaded on demand. Start with front matter holdingname(the skill id) and a one-linedescriptionthat says when to use it. Prefix skill ids with the plugin id so they do not collide.hooks.json: commands run before or after tool calls, same format as~\.ru\hooks.json:{"hooks":{"PreToolUse":[{"matcher":"bash","command":"%RU_PLUGIN_ROOT%\\scripts\\check.cmd","timeout_seconds":10}]}}. Events arePreToolUse,PostToolUse,UserPromptSubmitandStop.RU_PLUGIN_ROOTis the installed plugin folder, so put scripts in the plugin and refer to them through it.mcp.json: MCP servers, same format as~\.ru\mcp.json:{"servers":{"docs":{"command":"node","args":["server.js"],"description":"Team docs"}}}. Servers start in the plugin folder and appear as<id>-<server>. Never put a secret in the file; reference a stored credential with{"credential":"<name>"}inenv.
-
Keep the draft small: no
.git, no dependencies or build output, at most 256 files. -
Tell the user the draft path and what each part does, listing every command a hook or server would run. Then tell them to open Customize → Plugins → Add plugin → Add from folder…, paste the draft folder's full path, and turn the plugin on. Ru shows the commands and asks before any of them run.
Rules
- Never enable, install or approve a plugin yourself, and never claim it is installed.
- Do not write secrets, tokens or personal data into any plugin file.
- If the user later wants a change, edit the draft and ask them to remove the installed copy
and add the folder again, or edit
~\.ru\plugins\<id>themselves.
04 同仓库更多 Skills
Ledger summary
Summarize records by normalized business region.
CSV audit
Validate tabular financial exports.
CSV audit
Clean and validate financial CSV rows.
Calendar slots
Find available time slots around busy events.
Currency rounding
Compute exact invoice totals with explicit rounding.
verify
Select verification by change impact and run repository checks serially