Two lines first
- A mod is a small add-on for Claude Code: a band above your prompt, a button, a pause before a risky command, a command of your own. Mods are on by default from Claude Code v2.1.287 (in the Desktop app from v2.1.286). Check yours with
claude --version. - You don't write the code. Claude has a built-in skill for this,
plugin-authoring. You describe the mod in plain words and Claude writes it.
How to make one (about 5 minutes)
- Open Claude Code in a project folder. You can type
/plugin-authoringfirst, or just ask. - Paste one of the prompts below.
- Claude Code asks before it creates each file. Approve them.
- When it asks about the session, choose Enable for this session. The mod loads when Claude finishes.
- Check it: type
/pluginand open the Installed tab. You can turn it off there.
A mod Claude writes lasts only for that session. To keep it, copy its folder out of ~/.claude/dev-mods/ to a place of your own, like ~/mods/usage-meter, and start Claude Code with claude --plugin-dir ~/mods/usage-meter.
Prompt 1: a usage meter above your prompt
Make a mod that shows one line above my prompt with how full my context window is: a percentage and a short bar. Keep it small and quiet. When you're done, tell me in plain words what this mod can read and what it can change.
Anthropic's own sample mod token-weather does this kind of thing. Yours can be simpler.
Prompt 2: a pause before a risky command
Make a mod that holds any shell command with rm -rf or a force push before it runs. Show me the command and what it would change, with two buttons: Proceed and Cancel. When you're done, tell me in plain words what this mod can read and what it can change.
This is the idea of Anthropic's sample blast-radius. It is a safety net, not a lock. For a hard no, use permission rules (a deny rule in your settings).
Prompt 3: your own /handoff command
Make a mod that adds a /handoff command. When I type it, write a short note to handoff.md in this project: which files changed today, what we decided, and what is left to do. When you're done, tell me in plain words what this mod can read and what it can change.
Mods can add a /command of their own. Type /handoff at the end of the day and the next session starts from the note.
The 3-step check before you install anyone else's mod
- Who wrote it? Install mods only from authors and marketplaces you trust. Anthropic's sample mods are shared "as they are, without support". A random repo is a stranger's code.
- Ask Claude to explain it. Get the mod's files first (for example, clone the repo). Then paste:
Run claude plugin validate on the folder ./some-mod and explain the hooks: and calls: lines in plain words. What can this mod read, change, send or approve? Does it touch my files, my API keys or the network?
If you don't understand the answer, don't install it.
3. Know the off switch before you need it.
- One mod: /plugin → Installed → disable or uninstall it.
- Every installed mod, for one session: start with claude --safe-mode.
- Every mod you installed, in every session: set "disableAllHooks": true in ~/.claude/settings.json.
The honest part
- Mods aren't sandboxed. If you turn on sandboxing, it isolates the Bash commands Claude runs. A process a mod starts runs outside it.
- A mod runs with your permissions. It can read and write your files, read environment variables and API keys, see every prompt you send, approve a tool call before you're asked, and spend your usage by calling a model.
- A mod can't change the permission prompt, so read every prompt Claude Code shows you.
--safe-modedoesn't stop the built-in mods (like/diff). It stops the ones you installed.- Mods don't run in a WSL session of the Desktop app.
- This is how it works as of October 2026. Menus and versions change.
Sources: code.claude.com/docs/en/plugins/mods/overview and /create (17 Oct 2026), Anthropic's announcement (1 Oct 2026).