{"article":{"slug":"customize-claude-code-with-mods-in-typescript","title":"Customize Claude Code with mods in TypeScript","subtitle":null,"summary":"Anthropic introduces mods for Claude Code: small TypeScript functions that rewrite prompts, change tool behavior, add UI, or replace built-ins, shipped inside plugins for CLI and desktop.","content_type":"announcement","language":"en","canonical_url":"https://claude.com/blog/claude-code-mods","author":{"name":"Anthropic","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Anthropic","url":"https://www.anthropic.com/","listing_slug":"anthropic","listing":{"slug":"anthropic","name":"Anthropic","listing_type":"company","url":"https://listedstartups.com/companies/anthropic"}},"topics":[{"name":"AI","slug":"ai","url":"https://listedarticles.com/topics/ai"},{"name":"Developer Tools","slug":"developer-tools","url":"https://listedarticles.com/topics/developer-tools"},{"name":"Programming","slug":"programming","url":"https://listedarticles.com/topics/programming"},{"name":"AI Agents","slug":"ai-agents","url":"https://listedarticles.com/topics/ai-agents"}],"about_listings":[{"slug":"claude","name":"Claude","listing_type":"product","url":"https://listedstartups.com/products/claude"}],"cover_image_url":null,"license":"all-rights-reserved","word_count":777,"reading_minutes":3,"published_at":"2026-10-01T00:00:00.000Z","added_at":"2026-10-03T12:12:34.716Z","updated_at":"2026-10-03T12:12:34.716Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/customize-claude-code-with-mods-in-typescript","markdown_url":"https://listedarticles.com/articles/customize-claude-code-with-mods-in-typescript.md","example":false,"citation":"Anthropic, Anthropic. \"Customize Claude Code with mods in TypeScript.\" 1 Oct 2026. https://claude.com/blog/claude-code-mods (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://claude.com/blog/claude-code-mods"},"body_markdown":"# Customize Claude Code with mods\n\nChange how Claude Code behaves and looks with a few lines of TypeScript.\n\n  * Category\n\n[Product announcements](https://claude.com/blog/category/announcements)\n\n  * Product\n\n[Claude Code](https://claude.com/product/claude-code)\n\n  * Date\n\nOctober 1, 2026\n\n  * Reading time\n\n5\n\nmin\n\n  * Share\n\nCopy link\n\nhttps://claude.com/blog/claude-code-mods\n\nToday we're introducing mods, small TypeScript functions that change how Claude Code works. A mod can rewrite a prompt, add new UI, replace a built-in feature, or add entirely new functionality. You can write a mod yourself, or ask Claude Code to write one for you. Mods ship inside plugins, so you install and share them like any plugin. They work in the Claude Code CLI and desktop app.\n\nMods run with the same access to your machine as Claude Code itself. They aren’t sandboxed, and you should only install mods from sources you trust, the same way you'd install any code on your computer.\n\nTo see what mods can do, [read our guide to building your first mod](https://claude.dev/blog/getting-started-with-claude-code-mods/).\n\n### Why we built mods\n\nDevelopers have asked for more control over how Claude Code works, without waiting for us to ship a feature. [Hooks](https://code.claude.com/docs/en/hooks) helped give users some of this control, but hooks can't rewrite events, draw new UI, or replace features. Mods can.\n\nWe want Claude Code to feel like yours, so you can shape it to the way you work. We [shared the design for mods on GitHub](https://github.com/anthropics/claude-code/issues/91870) before launch to get feedback from developers. Thank you to everyone who weighed in.\n\n### How mods work\n\nEach time Claude Code does something, it emits an event. Examples include calling a tool, asking for permission, and drawing part of the screen. A mod is a function that hooks into one of these events. A mod can run before the event, after it, or instead of it. It can also wrap the event, running code both before and after. With one function, a mod can:\n\n  * Rewrite a prompt before it reaches the model.\n  * Block, rewrite, or retry a tool call.\n  * Approve or deny a permission request.\n  * Redact secrets from tool output before Claude reads it.\n\nA mod can also change what you see. It can edit or replace part of the interface Claude Code draws, like a tool result or a question from Claude. It can add buttons and inputs, and other mods can respond when you press them. Today, a mod can target the terminal, the desktop app, or both.\n\nWhen several mods hook the same event, they run in the order they load. The first mod to load sees the event first and the result last. This lets you stack mods from different authors.\n\nYou can also use Claude Code to mod Claude Code. Ask Claude to create a mod, and it can write the TypeScript, install it, and hot reload it in your session.\n\n### Swap built-in features for your own\n\nSome built-in features of Claude Code now ship as mods. For example, the built-in `/diff` feature is now a mod, so you can turn it off (in `/plugin`) or replace it with your own version. We plan to move more built-in features to mods over time, so you can pare Claude Code down to a small core and add back only what you want.\n\n### Mods for teams and enterprises\n\nMods ship inside plugins, so your existing plugin controls apply. Admins can allow or block plugin marketplaces. On Team and Enterprise plans, an owner sets this in the admin console. On Claude API and third-party API plans, admins push managed settings to users' machines.\n\nOn Team and Enterprise plans, and on any machine with managed settings, a built-in mod called `sec-default` (“security default”) loads first. It stops mods that users install from doing risky things, like overriding your permission deny rules. You can [view the source code](http://github.com/anthropics/claude-code/tree/main/mods) to see what it restricts. Admins can load their own mods first instead. If you do, add `sec-default` to your list to keep its restrictions.\n\nTeams can also use mods to build their own controls and functionality. For example:\n\n  * **CI/CD status:** a mod can show your pipeline’s status in a pane beside the conversation, and update it as builds pass or fail.\n  * **Production safeguards** : a mod can require confirmation before any command touches production config.\n  * **Audit logging:** a mod that loads first can record every call that every other mod makes.\n\n### Getting started\n\nMods are available today in the Claude Code CLI and desktop app. Install plugins that include mods from the [Claude directory](https://claude.ai/directory) or by running `/plugin` in the CLI. To share a mod, package it in a plugin and [submit it to the directory](https://claude.ai/directory/manage). \n\nTo build your own mods, read our [getting started guide](https://claude.dev/blog/getting-started-with-claude-code-mods/) or see the [documentation](https://code.claude.com/docs/en/plugins/mods/overview).","body_html":"<h1 id=\"customize-claude-code-with-mods\">Customize Claude Code with mods</h1>\n<p>Change how Claude Code behaves and looks with a few lines of TypeScript.</p>\n<ul><li>Category</li></ul>\n<p><a href=\"https://claude.com/blog/category/announcements\" rel=\"nofollow ugc noopener\">Product announcements</a></p>\n<ul><li>Product</li></ul>\n<p><a href=\"https://claude.com/product/claude-code\" rel=\"nofollow ugc noopener\">Claude Code</a></p>\n<ul><li>Date</li></ul>\n<p>October 1, 2026</p>\n<ul><li>Reading time</li></ul>\n<p>5</p>\n<p>min</p>\n<ul><li>Share</li></ul>\n<p>Copy link</p>\n<p><a href=\"https://claude.com/blog/claude-code-mods\" rel=\"nofollow ugc noopener\">https://claude.com/blog/claude-code-mods</a></p>\n<p>Today we&#39;re introducing mods, small TypeScript functions that change how Claude Code works. A mod can rewrite a prompt, add new UI, replace a built-in feature, or add entirely new functionality. You can write a mod yourself, or ask Claude Code to write one for you. Mods ship inside plugins, so you install and share them like any plugin. They work in the Claude Code CLI and desktop app.</p>\n<p>Mods run with the same access to your machine as Claude Code itself. They aren’t sandboxed, and you should only install mods from sources you trust, the same way you&#39;d install any code on your computer.</p>\n<p>To see what mods can do, <a href=\"https://claude.dev/blog/getting-started-with-claude-code-mods/\" rel=\"nofollow ugc noopener\">read our guide to building your first mod</a>.</p>\n<h3 id=\"why-we-built-mods\">Why we built mods</h3>\n<p>Developers have asked for more control over how Claude Code works, without waiting for us to ship a feature. <a href=\"https://code.claude.com/docs/en/hooks\" rel=\"nofollow ugc noopener\">Hooks</a> helped give users some of this control, but hooks can&#39;t rewrite events, draw new UI, or replace features. Mods can.</p>\n<p>We want Claude Code to feel like yours, so you can shape it to the way you work. We <a href=\"https://github.com/anthropics/claude-code/issues/91870\" rel=\"nofollow ugc noopener\">shared the design for mods on GitHub</a> before launch to get feedback from developers. Thank you to everyone who weighed in.</p>\n<h3 id=\"how-mods-work\">How mods work</h3>\n<p>Each time Claude Code does something, it emits an event. Examples include calling a tool, asking for permission, and drawing part of the screen. A mod is a function that hooks into one of these events. A mod can run before the event, after it, or instead of it. It can also wrap the event, running code both before and after. With one function, a mod can:</p>\n<ul><li>Rewrite a prompt before it reaches the model.</li><li>Block, rewrite, or retry a tool call.</li><li>Approve or deny a permission request.</li><li>Redact secrets from tool output before Claude reads it.</li></ul>\n<p>A mod can also change what you see. It can edit or replace part of the interface Claude Code draws, like a tool result or a question from Claude. It can add buttons and inputs, and other mods can respond when you press them. Today, a mod can target the terminal, the desktop app, or both.</p>\n<p>When several mods hook the same event, they run in the order they load. The first mod to load sees the event first and the result last. This lets you stack mods from different authors.</p>\n<p>You can also use Claude Code to mod Claude Code. Ask Claude to create a mod, and it can write the TypeScript, install it, and hot reload it in your session.</p>\n<h3 id=\"swap-built-in-features-for-your-own\">Swap built-in features for your own</h3>\n<p>Some built-in features of Claude Code now ship as mods. For example, the built-in <code>/diff</code> feature is now a mod, so you can turn it off (in <code>/plugin</code>) or replace it with your own version. We plan to move more built-in features to mods over time, so you can pare Claude Code down to a small core and add back only what you want.</p>\n<h3 id=\"mods-for-teams-and-enterprises\">Mods for teams and enterprises</h3>\n<p>Mods ship inside plugins, so your existing plugin controls apply. Admins can allow or block plugin marketplaces. On Team and Enterprise plans, an owner sets this in the admin console. On Claude API and third-party API plans, admins push managed settings to users&#39; machines.</p>\n<p>On Team and Enterprise plans, and on any machine with managed settings, a built-in mod called <code>sec-default</code> (“security default”) loads first. It stops mods that users install from doing risky things, like overriding your permission deny rules. You can <a href=\"http://github.com/anthropics/claude-code/tree/main/mods\" rel=\"nofollow ugc noopener\">view the source code</a> to see what it restricts. Admins can load their own mods first instead. If you do, add <code>sec-default</code> to your list to keep its restrictions.</p>\n<p>Teams can also use mods to build their own controls and functionality. For example:</p>\n<ul><li><strong>CI/CD status:</strong> a mod can show your pipeline’s status in a pane beside the conversation, and update it as builds pass or fail.</li><li><strong>Production safeguards</strong> : a mod can require confirmation before any command touches production config.</li><li><strong>Audit logging:</strong> a mod that loads first can record every call that every other mod makes.</li></ul>\n<h3 id=\"getting-started\">Getting started</h3>\n<p>Mods are available today in the Claude Code CLI and desktop app. Install plugins that include mods from the <a href=\"https://claude.ai/directory\" rel=\"nofollow ugc noopener\">Claude directory</a> or by running <code>/plugin</code> in the CLI. To share a mod, package it in a plugin and <a href=\"https://claude.ai/directory/manage\" rel=\"nofollow ugc noopener\">submit it to the directory</a>. </p>\n<p>To build your own mods, read our <a href=\"https://claude.dev/blog/getting-started-with-claude-code-mods/\" rel=\"nofollow ugc noopener\">getting started guide</a> or see the <a href=\"https://code.claude.com/docs/en/plugins/mods/overview\" rel=\"nofollow ugc noopener\">documentation</a>.</p>","headings":[{"level":1,"text":"Customize Claude Code with mods","id":"customize-claude-code-with-mods"},{"level":3,"text":"Why we built mods","id":"why-we-built-mods"},{"level":3,"text":"How mods work","id":"how-mods-work"},{"level":3,"text":"Swap built-in features for your own","id":"swap-built-in-features-for-your-own"},{"level":3,"text":"Mods for teams and enterprises","id":"mods-for-teams-and-enterprises"},{"level":3,"text":"Getting started","id":"getting-started"}]}}