Skip to main content

Claude Code Mods for Beginners: Customize Claude Code with a Few Lines of TypeScript

Mods are small TypeScript functions that ship inside plugins and change how Claude Code handles prompts, tool calls and its screen. This guide covers installing them and the key safety warning.

By
🌐 This article was machine-translated and may contain inaccuracies. Read the Korean original if in doubt.

Claude Code mods are small TypeScript functions that change how Claude Code behaves and looks. Anthropic introduced them on October 1, 2026, saying a mod can rewrite a prompt, add new interface elements, or replace a built-in feature. This guide walks beginners through the idea, installation, and the safety warning you should not skip.

🟢 Model references match the current lineup · model notice · Fable subscription
🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5.5 / Claude Haiku 5.5 (higher tier: Claude Fable 5.2). This notice changes only when Anthropic ships a new model.

Fable subscription (updated November 10, 2026): Claude Fable 5.2, released November 9, 2026, is the current Fable model; Fable 5.1 and Fable 5 are now legacy. Plan terms are the same for all three — Max and Ultra plans and premium seats on Team and seat-based Enterprise plans include Fable at up to 50% of the weekly usage limit; Pro plans and standard seats use usage credits (not available on Free). As a launch offer, Fable models are also included for Pro plans and Team standard seats at up to 50% of the weekly limit through November 16, 2026 (PT). API pricing is $8/M input and $40/M output tokens for Fable 5.2, and $10/$50 for Fable 5.1 and 5. Some cybersecurity and biology requests may be answered by an Opus model due to safety classifiers. See the Fable 5.2 launch news and the Fable 5.2 guide for details.

Event happens tool call, permission, drawing Mod (TypeScript) 1. Runs before the event 2. Runs after the event 3. Runs instead of it 4. Wraps before and after Changed result prompt, behavior, screen

What you will be able to do

In about ten minutes you will understand what mods are, how to install one, and what to watch out for. You do not need to write code: you can install an existing mod or ask Claude to build one for you.

What you need before starting

You only need Claude Code. According to the announcement, mods work in the Claude Code CLI (the command-line version) and the desktop app.

  • Claude Code installed — either the CLI or the desktop app.
  • A plugin that includes a mod — the install steps below show where to find one.
  • On a team or company account — your admin may restrict plugins, so check first.

Quick glossary

  • Mod — a small function that hooks into what Claude Code does and changes the outcome.
  • TypeScript — the programming language mods are written in. You can ask Claude to write it for you.
  • Plugin — a bundle you install to add features. Mods ship inside plugins.
  • Event — a signal Claude Code emits whenever it does something, such as calling a tool or drawing part of the screen.
  • Hook — a feature that runs automatically at a certain moment. Mods can do things hooks cannot.
  • Sandbox — a walled-off area where a program runs safely. Mods do not run in one.
  • Managed settings — settings an admin pushes to users' machines.

What is a mod, and how is it different from a hook?

A mod is a more powerful way to change Claude Code than a hook. Per the announcement, hooks give some control but cannot rewrite events, draw new UI, or replace features, while mods can.

Every time Claude Code does something, it emits an event, and a mod is a function attached to that event. It can step in in four ways, matching the numbers in the diagram above.

  • Before (1) — runs before the event.
  • After (2) — runs after the event.
  • Instead (3) — replaces the event.
  • Wrap (4) — runs code both before and after.

What can a mod actually do?

The announcement lists several concrete abilities, all achievable with a single function.

  • Rewrite a prompt — change it before it reaches the model.
  • Control tool calls — block, rewrite, or retry them.
  • Handle permission requests — approve or deny them.
  • Redact secrets — remove them from tool output before Claude reads it.
  • Change the screen — edit or replace parts of the interface such as a tool result or a question from Claude, and add buttons and inputs. A mod can target the terminal, the desktop app, or both.

Built-in features are becoming mods too. For example, the built-in /diff is now a mod, so you can turn it off in /plugin or replace it with your own version.

How do you install a mod?

Install the plugin that contains it. Anthropic says to find plugins with mods in the Claude directory (a catalog of plugins) or by running /plugin in the CLI.

  1. Start Claude Code. The CLI or desktop app both work.
  2. Type /plugin.
    /plugin
    You know it worked when a plugin management screen opens. Menu labels can change between versions, so follow what you see on screen.
  3. Choose a plugin that includes a mod. You can browse the Claude directory. Read the author and description before installing.
  4. Check that it works. Confirm the plugin appears in your list, then try a simple request to see whether the mod behaves as described.

Warning — install only from sources you trust. Mods are not sandboxed and run with the same access to your machine as Claude Code itself. Anthropic advises treating them like any code you install on your computer. If you cannot tell who made a mod, do not install it.

If something goes wrong, try these next steps.

  • If /plugin is not recognized — check that Claude Code is up to date and update it.
  • If the plugin is not listed — on a team or company account your admin may have blocked the marketplace, so ask them.
  • If a mod behaves unexpectedly — turn that plugin off in /plugin and test again to find the cause.

Can you ask Claude to build a mod for you?

Yes. According to Anthropic, if you ask Claude to create a mod, it can write the TypeScript, install it, and hot reload it (reload it without restarting) in your session. For example:

Make a mod that hides anything that looks like a password in tool output

You know it worked when Claude says the mod is created and installed, and your next request behaves differently. For hands-on building, see Anthropic's guide to building your first mod and the documentation. To share a mod, package it in a plugin and submit it to the directory.

Warning: A mod written by Claude runs with the same access too. Before installing, ask Claude to explain what the code does.

In what order do multiple mods run?

Mods run in the order they load. The first mod to load sees the event first and the result last, which is why you can stack mods from different authors.

First mod loaded (event first, result last) Second mod loaded Claude Code event event → ← result Team / Enterprise: sec-default first

How do teams and companies manage mods?

Because mods ship inside plugins, existing plugin controls apply. Admins can allow or block plugin marketplaces.

  • Team and Enterprise plans — an owner sets this in the admin console.
  • Claude API and third-party API plans — admins push managed settings to users' machines.
  • sec-default ("security default") — on Team and Enterprise plans, and on any machine with managed settings, this built-in mod loads first. It stops user-installed mods from doing risky things such as overriding permission deny rules. You can read its source code to see what it restricts.
  • Admin-owned mods — admins can load their own mods first instead; to keep sec-default's restrictions, add it to the list.

Examples Anthropic gives include showing CI/CD pipeline status beside the conversation, requiring confirmation before commands touch production config, and an audit log of every call other mods make.

Frequently asked questions

Q. Are mods safe?
They are only as safe as their source, because they are not sandboxed. Mods have the same access to your machine as Claude Code, so install only from sources you trust.

Q. Do I need to know how to code?
No. You can install ready-made mods through plugins, or ask Claude to build one for you.

Q. Where can I use mods?
In the Claude Code CLI and the desktop app. A single mod can target the terminal, the desktop app, or both.

Q. Can I turn off built-in features?
Some of them. The built-in /diff is now a mod you can turn off in /plugin or replace, and Anthropic says it plans to move more built-in features to mods.

Source: Customize Claude Code with mods in TypeScript (Anthropic, October 1, 2026)

Was this helpful?

Keep reading