/plugin-dev:mod-creator [what the mod should do | audit <path to a mod> | path to an existing mod | question about mods]from Plugin Dev
Builds, changes, tests, debugs and audits Claude Code mods: plugins whose hooks/hooks.json lists "modules" (register.ts/.js) that run inside Claude Code to draw panes, a band above the prompt or toasts, restyle the spinner or tool rows, add /commands and tools, guard or rewrite tool calls and prompts, or enforce org policy; answers how mods work. Use when the mod should live in a folder the user owns, be tested or shared, or whenever a register.ts/.js or a hooks.json with "modules" is written or debugged: 'make a mod that…', 'show X above the prompt', 'why does my mod do nothing', 'audit this mod', 'is this mod safe to install', 'zrób moda', 'czemu mój mod nie działa', 'zrób audyt moda'. For a quick mod live in this session only, use plugin-authoring. NOT for settings.json hooks, a 'whenever X, block Y' rule a settings hook can express, or a statusLine command (update-config); other plugins and their skills, agents or MCP servers (plugin-creator), or marketplace manifests (marketplace-creator).
Ships in Plugin Dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A mod is a Claude Code plugin whose hooks/hooks.json lists a hooks module under modules.
The module exports register(on); each on(event, [matcher], async ($, e, next) => …) is a
hook that runs in Claude Code's process before Claude Code acts, so it can observe, rewrite or
answer the event. Everything outside the module's own code goes through the mods API $.
This skill turns a request into a working, validated, tested mod in a directory the user owns,
loaded with claude --plugin-dir. The built-in plugin-authoring skill is the other way in:
it writes into the session's ~/.claude/dev-mods/<session-id>/ folder with hot reload in that
session only. Offer it when the user wants to see the mod live in the current session without
restarting; use this skill when the mod should last, be tested, or be shared.
Write mods in TypeScript (hooks/register.ts) unless the user asks for JavaScript: Claude
Code loads .ts, .mts, .cts and .tsx directly with no build step, and the tests are
TypeScript anyway. create.md → TypeScript has the details.
claude CLI v2.1.287 or later (the Desktop app's bundled Claude Code needs v2.1.286). Check:
claude --version. Update: claude update. The workflow uses claude plugin validate,
claude plugin test, claude -p and claude --plugin-dir.npm install: the hooks module and its tests run inside Claude Code.<mod>/.claude-plugin/types/claude-code/index.d.ts (written when
the mod is loaded with --plugin-dir in an interactive session). They describe the
installed version exactly. When they disagree with anything below, they win.claude plugin validate <dir> output: the hooks: and calls: lines are what Claude Code
actually reads from the code.claude --version
against the version gates in references/reference.md before using a newer feature.Open only what the task needs:
| File | Open it when |
|---|---|
| references/overview.md | Deciding whether a mod is the right tool (vs settings hook, skill, MCP), where mods run, trust, turning mods on/off, built-in and sample mods |
| references/create.md | Scaffolding a mod, TypeScript, the dev loop, generated types, the static-analysis rules validate enforces, sharing |
| references/events.md | Writing hooks: matchers, tool.call, $.ui.ask, tool.check, prompt.submit, turns, settings.read, classic.*, mod order, .catch |
| references/api.md | Using $: commands, tools, model calls and caching, timers, toasts/status/log/notify, prompt.submit, interruptions, session messages, files, processes, HTTP, settings, and where state lives ($.state, $.store) |
| references/interface.md | Drawing: panes, the band, restyling built-in sites, elements and samples, keys and focus, redraws, VS Code differences |
| references/testing.md | Writing *.test.ts files: stubs, kit rules, the stub table, timers, drawings, policy mods |
| references/troubleshooting.md | A mod does nothing, a hook is skipped, a drawing is missing, a value is lost, or any error line from Claude Code |
| references/admin.md | Org-wide mods, managed settings, the built-in guard, policy mods, reviewing a third-party mod |
| references/reference.md | Looking up any event, API method, render site, element prop, limit, setting, command or version gate |
| references/audit.md | Auditing an existing mod, own or third-party: the checklist, severities, verdict and report format |
Your first tool call in this skill creates the task list, before any command below. A mod run writes files and loops through validation and tests, so the user needs to see where it stands. Keep it current to the last step. A one-line announcement in chat does not replace it.
Use the task-list tool the session has: mcp__ccd_turn__update_plan in the Claude desktop app,
otherwise TaskCreate and TaskUpdate, or TodoWrite. Load it with ToolSearch first if it is
only listed as deferred. If the session has none of them, print the items as a Markdown checklist
and reprint it each time a step finishes.
Create it with these items, in the user's language:
Frame the mod and agree on name and directory
Design the hooks and $ calls
Scaffold the plugin files
Write the hooks module
Validate with claude plugin validate
Test with claude plugin test
Hand over to the user
For debugging use Find the error line / Look it up in troubleshooting.md / Fix, then validate and test; for an audit use Inventory the mod / Validate with claude plugin validate --strict / Review the code against the checklist / Run the tests / Report findings and verdict.
Frame the mod and agree on name and directory: waiting for your decision.Test with claude plugin test: 2 failing, stopped. A finished item must not read as if the step succeeded.Scaffold the plugin files: skipped, existing mod), rather than being deleted.claude -p). If a settings hook, a
skill, a permission rule or an MCP server would do, say so and stop (overview.md → Mod vs
settings hook vs skill vs MCP server). Run claude --version; if it is older than
v2.1.287, stop and tell the user to update first. Agree on the plugin name (no claude-
prefix: validate fails names that look like Anthropic's own) and the target directory;
default to ~/mods/<name>, or the repository the user names.event{matcher} → observe / rewrite / answer, every $ call,
where state lives (variable, $.state, $.store), and for every hook that refuses
something whether it must fail closed (.catch). Read the matching references now..claude-plugin/plugin.json, hooks/hooks.json with
"modules": ["./register.ts"] (./register.js only when the user asks for JavaScript; one
module per plugin, so a plugin that already has a mod needs a new plugin for another), the
module, and types/index.d.ts only if the mod uses $.state. Templates: create.md;
types/index.d.ts: api.md → Keeping state.claude plugin validate <dir>, fix every error, and run it again; repeat
until it reports no errors and the hooks: and calls: lines match the design from step 2
(a missing event means that hook never runs). Come back here after any change to the module
in step 6.tests/<name>.test.ts covering each hook's main path and each refusal path
(testing.md), run claude plugin test from the mod directory, fix until green. For a
command, also run claude -p "/<command>" --plugin-dir <dir> < /dev/null.claude --plugin-dir <dir> and what to try. List any API
use you were unsure of, and say that once they have run it interactively,
.claude-plugin/types/claude-code/index.d.ts exists and you can re-check those uses against
it. Report what was verified (validate, tests, -p run) and what only a live session can
show (drawings, focus, hotkeys). Mention sharing options (create.md) only if asked.Debugging follows its own path: start from the exact line the user saw and look it up in
troubleshooting.md; when there is no line, ask for the output of
claude --debug-file ./mod-debug.log --plugin-dir <dir>. After the fix, run steps 5 and 6.
Auditing runs when the argument starts with audit, or the user asks whether a mod is
correct, robust or safe to install. Follow audit.md: inventory, validate --strict, the code
read against checklist A–H, the tests, then one report with ranked findings and a verdict. The
audit changes nothing. For the user's own mod, offer to fix the findings afterwards and do it
through steps 4–6; a third-party mod is never edited and gets no new tests, only an install
recommendation. After creating a mod, an audit is also the self-check before step 7.
A module that violates the static analysis doesn't load, and a hook that fails is skipped without stopping the session, so these matter more than style:
$.namespace.method(...). Never alias, destructure or index
$ (const ui = $.ui fails). Pass $ only to functions declared at the top level of the
same file.on() are string literals; never shadow on inside register; ES-module
import declarations only, relative to the plugin, plus claude-code.setTimeout/setInterval: use $.fs, $.process, $.http, $.clock.e is deeply frozen: rewrite with next({ ...e, field }).session.start hook (one hook per event per matcher).
$.command.register throws on a taken name, which would skip the rest of the hook, so wrap
each call in try/catch and report the clash with $.ui.log.ui.render hook with a matcher and check e.requestId for panes; return
next(e) for anything that isn't yours. Check e.surface before terminal-only elements
(Raster, Image): Desktop and VS Code don't draw them.focus, closeOnEscape, holdToasts, autoFocus accept only true (passing false
throws); omit them otherwise.Input/Select, and every Button without a unique label, gets a unique string key:
tests, focus and other mods' ui.press/ui.input hooks find controls by key, and a missing
or repeated key fails the tree.tool.call, tool.check, prompt.submit, plugin.register or
http.fetch gets a .catch that refuses./clear, /resume and /branch reset
$.state without a new session.start, so reload saved values in classic.SessionStart.{ text } from command.run and deny/result from tool.call are read by Claude: write
them as information Claude can act on. $.ui.log lines are not read by Claude.classic.*, prompt.section, skill.prompt or settings.read in a mod
meant for users at a company with managed settings: the built-in guard skips those hooks in
user-installed mods.How an audit report is laid out: verdict, scorecard, findings table, detail blocks and closing lines. audit.md → Report format applies them to a mod audit.
| Impact | Rule | Applies to |
|---|---|---|
| high | List findings in one numbered table, worst first — Columns #, Sev, Where, Problem, Fix, one line per cell; past fifteen rows, one table per file, numbered on. | any |
| high | Mark every status with the shared five-mark scale — 🔴 broken · 🟡 fix it · 🔵 worth tidying · 🟢 nothing found · ⚪ not checked, in verdict, scorecard and findings alike. | any |
| high | Open an audit report with a verdict line that quotes the tool's own summary — First line is the worst status, the count at each severity, and the checking tool's summary line as evidence. | any |
| medium | Show a scorecard when the audit covers a fixed set of areas — One row per area with its worst mark and counts, in an order the skill fixes, so two runs compare line by line. | any |
| medium | Give a detail block only to findings whose fix will not fit the table, at most five — Evidence and a diff for the few 🔴 and 🟡 findings that need one; the table row settles every other finding. | any |
| medium | Close an audit report with what was not checked and the one next step — A Not checked line names what the run could not see; a Next line says what the user does now. | any |
| medium | Report a clean run as the heading and one line — When nothing was found, skip the scorecard, the table and any list of what passed. | any |
| low | Write reports in GitHub-flavoured Markdown without HTML — Tables, emoji marks, blockquotes, links and fenced code only; no , inline styles or terminal colour. | any |
references/admin.md (opens in a new tab)references/api.md (opens in a new tab)references/audit.md (opens in a new tab)references/create.md (opens in a new tab)references/events.md (opens in a new tab)references/interface.md (opens in a new tab)references/overview.md (opens in a new tab)references/reference.md (opens in a new tab)references/rules.md (opens in a new tab)references/testing.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub janszewczyk/claude-plugins --plugin plugin-dev5 skills in this plugin
/marketplace-creatorCreates, maintains and audits a Claude Code plugin marketplace: the .claude-plugin/marketplace.json catalog, plugin entries and source types, hosting and private access, version policy, renames and removals, channels and org relevance suggestions. Its audit finds drift between marketplace.json, each plugin.json, agent and skill files, CLAUDE.md and every README, plus what the docs warn about: unpinned sources, missing renames, version set twice, reserved names. Use to start a marketplace, add, rename or remove a plugin entry, host or share one, or validate, audit or health-check a marketplace or plugin repo before a release, after adding or renaming a skill or agent, or when plugins show no name in /plugin: 'is this repo consistent', 'did I forget to register something', 'zrób marketplace', 'zrób audyt marketplace'. NOT for one plugin's skills, hooks or MCP servers (plugin-creator), mods (mod-creator), cutting a release (plugin-release) or one SKILL.md's quality (skill-audit)./plugin-creatorCreates, extends, debugs and audits a Claude Code plugin: the .claude-plugin/plugin.json manifest and its components (skills, agents, hooks, MCP and LSP servers, bin/, monitors, output styles, themes, workflows, userConfig), dependencies with version ranges, an evals/ suite, token cost and release readiness; also converts a .claude/ setup into a plugin. Use when the user wants a new plugin, to add a skill, agent, hook or MCP server to one, to know why a plugin or component doesn't load, or to check a plugin before release or install: 'make a plugin that…', 'turn my .claude folder into a plugin', 'add a hook to this plugin', 'is this plugin ready to publish', 'audit this plugin', 'zrób plugin', 'dodaj hooka do pluginu', 'zrób audyt pluginu'. NOT for the marketplace catalog, entries, hosting or renames (marketplace-creator), mods whose hooks.json lists modules (mod-creator), tagging a release (plugin-release), or one SKILL.md's writing quality (skill-audit).Other plugins' skills for the same job