Guides Claude Code published oct 5, 2026

Claude Code Mods Tutorial: Add a File-Review Check

beginner

The Rundown

Claude Code mods let you add custom behavior to your coding assistant. They can change prompts, add controls, and pause a tool call while you make a decision. Anthropic introduced mods on October 1, 2026.

In this guide, you will build a small mod that asks for approval before Claude edits a file named release-settings.json. You will try an ordinary edit, refuse a settings change, then approve it and check the saved file.

Use a practice folder. This example adds a review step to two file-editing tools. Shell commands, other tools, and other programs fall outside its checks.

University Pro members: Open this guide's Resources panel for the individual starter files, practice files, and tests. Download the setup instructions first, then save each file to the path it lists.

What are Claude Code mods?

A mod is a plugin whose JavaScript or TypeScript code registers event handlers, called hooks. A hook can respond to a tool call, a submitted prompt, or an interface update. You can load and manage mods through Claude Code's plugin system.

A few useful examples are a panel showing recent file changes, a command that reports task progress, or a review question before a particular edit. The mod authoring workflow lets you ask Claude to write the code from a description.

Mods vs Skills, hooks, and plugins

You need to…Start with
Save instructions for a repeated task, such as reviewing a pull request.A Skill.
Run a check or script when an event happens.A settings hook.
Ask before editing a fixed file or block a known tool operation.A permission rule.
Add a custom review dialog, interface panel, or event-handling logic.A mod.
Share several of these features as one install.A plugin.

Claude Code documents each of these options separately. A simple permission rule may already meet your need. This exercise uses a mod so you can design the review question and preview the proposed change.

What you need

Use Claude Code in a terminal for the steps below, with an account that can run it. A terminal is the app where you type commands. You will also need an empty folder and a text editor to inspect the files.

Mods require Claude Code v2.1.287 or later. Use v2.1.289 or newer for this guide because the October 3 release includes permission and mod-loading fixes. In your terminal, check:

Prompt
claude --version

For a native installation, update with claude update. For another installation method, follow the matching Claude Code setup instructions.

The terminal and Desktop's Code tab support mod interfaces. Other surfaces have limits, so follow this terminal walkthrough before adapting it to your usual setup.

What this mod leaves unchecked

The supplied starter watches the built-in Edit and Write tools for one filename. It does not inspect Bash, PowerShell, NotebookEdit, MCP tools, or writes from another program. It also does not resolve symbolic links or other names that might point to the same file.

Treat it as a review aid. Keep backups, inspect changes, and use proper file permissions or an isolated environment for work that needs stronger protection. Anthropic's plugin security documentation explains that mods have the same machine access as Claude Code.

For a fixed rule such as asking before editing one path, consider Claude Code's normal Edit permission rules first. Use a custom mod when the review needs more detail or logic.

Keep, disable, or remove the mod

Keep the reviewed review-before-edit directory. Load it again with --plugin-dir when starting another session. Keep one copy active while testing changes.

Mods that Claude creates in its session's mods folder, ~/.claude/dev-mods/<session-id>/, have a different lifecycle: copy those to a durable folder before relying on them across sessions.

To stop this local example, exit the session and start Claude without --plugin-dir. For an installed plugin, use the plugin manager and open /plugin → Installed to disable or uninstall it.

For troubleshooting, claude --safe-mode starts a session without user-installed mods and other customizations. That also removes this review check. Use it in the practice folder and restore your normal setup afterward.

Build and review AI-written software with more confidence

A file-review check solves one small problem. The next step is a clear process for planning a build, testing changes, and deciding when an app is ready for users.

Nate Grahek's Intro to Vibe Coding covers project scope, AI coding tools, debugging, deployment, and production risks such as authentication, payments, and API keys.

Watch Intro to Vibe Coding with University Pro →

The starter files and tests are available through this guide's Resources panel for University Pro members. Claude access and usage have separate terms. The course teaches broader development methods; this guide covers the new mods feature.

$29 billed monthly · cancel anytime
Go Pro