
Now loading...
Today marks the launch of mods, small TypeScript functions designed to alter the functionality of Claude Code. These modifications can enhance prompts, introduce new user interfaces, replace existing features, or introduce entirely new capabilities. Developers have the option to create their own mods or request specific modifications directly from Claude Code. These updates are encapsulated within plugins, allowing for simpler installation and sharing, and they’re compatible with both the Claude Code command line interface and desktop application.
Mods operate with the same permissions as Claude Code itself and are not sandboxed, emphasizing the need for users to install them only from trusted sources, similarly to any other software on their systems.
To explore the capabilities of mods, you can read our guide on building your first mod.
The decision to develop mods was driven by a clear demand from developers for greater customization possibilities within Claude Code, without having to wait for new features to be officially released. While previous tools, known as hooks, provided some level of control, they did not offer the comprehensive modification options that mods now present.
Our goal is to make Claude Code feel personalized to each user’s needs, enabling them to customize it according to their workflow. We previously shared the design concepts for mods on GitHub to gather input from the developer community, and we express our gratitude to all those who contributed their thoughts.
Every action taken by Claude Code triggers an event, such as tool calls or permission requests. A mod is effectively a function that interfaced with these events, having the ability to execute before, after, or instead of an event, as well as wrap around it to perform actions on both sides. With the power of a single function, mods can achieve several tasks:
They can rewrite prompts before they’re processed by the model, block or modify tool calls, approve or disallow permission requests, and even redact sensitive information from tool outputs prior to the model’s review. Additionally, a mod has the capability to alter the user interface, modifying or replacing displays like tool results or questions generated by Claude. It can introduce buttons, inputs, and allow other mods to respond to user actions. Currently, mods can be used within both the terminal and desktop applications.
When multiple mods target the same event, they execute in the order they’re loaded, allowing for a stacking arrangement from various developers. Thus, the first mod that loads will see the event first and influence the final outcome.
Moreover, users can leverage Claude Code to create mods, with the capability to generate TypeScript code, install it, and apply real-time updates within their current session.
Under the plugin system, mods are compatible with team and enterprise plans, ensuring existing plugin permissions remain in effect. Administrators have the ability to permit or restrict access to plugin marketplaces, while those with Team and Enterprise plans can manage these settings via an admin console. For users on Claude API and third-party API plans, administrators can enforce managed settings directly to their devices.
A built-in mod named sec-default – which serves as a security protocol – loads first on Team and Enterprise plans to prevent user-installed mods from executing potentially harmful actions, such as overriding permission denials. The source code for sec-default is accessible for review. Additionally, administrators can prioritize their own mods while retaining the restrictions imposed by sec-default.
Teams are able to use mods to create custom controls and functionalities. For instance, a mod can display continuous integration and deployment status, enforce confirmation before executing commands that could impact production configurations, or track all interactions between mods via audit logging.
Mods are ready for use within the Claude Code CLI and desktop application. Users can obtain plugins that encompass mods from the Claude directory or via the command line using /plugin. To share a mod, package it into a plugin and submit it to the directory.
For those looking to create their own mods, comprehensive resources are available in our getting started guide as well as the documentation.
