create-mod
What it does
This skill sets up a new Claude Code mod from a standard template, with the naming and status rules already in place. It is for developers who want to extend how Claude Code behaves in a safe, consistent way.
When to use it
- ✓When you want a new mod that adds a panel, command or hook to Claude Code.
- ✓When you want a function hook added to Claude Code's behaviour.
- ✓When you want a mod that follows the same rules as the reviewed Ruflo template.
Skill link
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-plugin-creator/skills/create-mod/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Create a new mod called focus-timer from the template and check that it is valid.”
5 new skills a week. 1 minute to read.
How it works
The skill chooses a kebab-case name, copies the template folder to a target location and replaces the placeholder names with yours. It then keeps the status file in the expected format and runs the checks.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Create Mod
Scaffold a mod the governed way, instead of an ad-hoc one: the template already follows the rules ruflo's own mod (ADR-404) was reviewed against.
Steps
- Name it. kebab-case
<name>. Commands it registers are namespaced<name>-<verb>; never register a built-in's name (/diff,/help) or another plugin's (/ruos*,ruflo-*). - Scaffold from the template with
node plugins/ruflo-plugin-creator/scripts/scaffold-mod.mjs <name> <target-dir>. It copiestemplates/mod/, turns the manifest templateplugin.json.tmplinto.claude-plugin/plugin.json(the template keeps it under a non-manifest name so plugin validators do not mistaketemplates/modfor a second plugin), and replacesmy-modeverywhere (plugin.jsonname, the command,MY_MOD_ACTIVE→<NAME>_ACTIVEin bothhooks/register.tsandhooks/classic.cjs, the status folder). Doing it by hand: copy the folder, moveplugin.json.tmplto.claude-plugin/plugin.json, and make the same replacements. - Keep the status contract.
hooks/status.tswrites.claude-flow/<name>-mod/status.json, the file the console's Mods section reads. The folder must be<name>-mod(lowercase, digits, hyphens, at most 41 characters): the scaffold script already setsSTATUS_PATHto<name>-mod. Fields:version: 1(required, anything else is ignored),summary(one line),modVersion,guard(boolean),calls(a number, not a per-tool object),blocked(number),lastDenied(a short reason, only once the mod has refused something), plusupdatedMs/startedMs. Other fields are not shown.tests/status.test.tsasserts the shape. - Write the behaviour in pure functions taking the
Host(seehooks/host.ts). Inregister.ts, build the host from literal$.noun.method(...)calls only — the engine reads a module's$uses off its source, andclaude plugin validaterefuses$passed around, computed ($[noun]), or deeper than$.noun.method(input). - Keep the rules:
- Observe with
const r = await next(e); …; return r; rewrite withnext({ ...e, … }); answer ({ deny }) only when you mean to stop the chain. - On
tool.check, only ever tighten (the stricter ofawait next(e)and yours); never answerallowof your own. - Wrap every
$call so a refusal degrades instead of failing the turn (admins can withhold any$affordance). - No
$.process.run/$.http.fetchbuilt from event input. Nothing slow on the hot path (about 10 s per dispatch). - Anything that must survive a hot reload goes in
$.store/$.state, not module variables. - Options come from
userConfigin plugin.json, not environment variables.
- Observe with
- Keep the fallback honest.
hooks.jsonis hybrid: the classic command hook runs everywhere, the module only where function hooks are on (Claude Code >= 2.1.287; 2.1.277+ withCLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1). The module sets<NAME>_ACTIVEatsession.start; the classic script exits early when it sees it, so nothing fires twice. - Validate and test:
claude plugin validate <dir> # lists hooked events, $ calls, env reads/writes claude plugin test <dir> # tests/*.test.ts on the engine kit claude -p --plugin-dir <dir> "/<name>-status" # writes .claude-plugin/types/ and proves a live load npx tsc -p <dir> # against those generated types - Ship it in a plugin marketplace (
marketplace.jsonentry), installed with/plugin install <name>@<marketplace>and picked up with/reload-plugins. If ruflo-mods is installed withmodTrust: refuse-risky, a mod usingprocess.run/process.spawn,http.fetch,mcp.call/mcp.connect,session.send,config.set,env.set,fs.write,agent.spawn/agent.register,prompt.submit,session.append,tool.callorcommand.run, or hooking any event in itsRISKY_EVENTS(tool.check,tool.call,prompt.*,agent.spawn,tool.describe,session.append,session.receive,turn.step,skill.prompt,session.compact,prompt.edit,fs.read/fs.stat/fs.exists/fs.list,settings.read,env.get, a hook on any of the calls above (it can rewrite another mod's call),plugin.register,classic.*,*; a glob or a!negation is judged by what it selects), is refused unless its plugin id (<name>@<marketplace>) is inmodTrustAllow— the template setsenv.set(the fallback handshake), so allow-list it by id.
FAQ
What names must I avoid?
Do not reuse a built-in command name such as diff or help, or a name used by another plugin.
Where is the status file written?
The skill sets it to a folder named after your mod, which the console reads.
Does the template run unreviewed code?
The skill says the template follows rules that were reviewed, but you should still test the mod before using it.
Details
Original description by the author
Scaffold a Claude Code mod (a plugin with a function-hooks module) from ruflo's governed template, then validate and test it. Use when the user asks for a mod, a function hook, or wants Claude Code to modify itself.
repo: ruvnet/ruflo
Popularity
- GitHub stars
- 81k
- Ranking position
- #1678
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
agent-adaptive-coordinator
81kHelps your agent split and rebalance a group of AI agents as the workload changes, choosing a layout that fits the task.
agent-agent
81kTeaches your agent to turn a big goal into an ordered plan of actions, and to replan when conditions change.
agent-agentic-payments
81kHelps your agent manage spending mandates for AI shopping, with spend caps, time windows, merchant rules and signed approvals.
agent-analyze-code-quality
81kHelps your agent review code for quality, finding code smells, technical debt and refactoring ideas without changing the files.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.