Build|Claude Code Mods

ModsCode / Claude Code Mods / Build

The Claude Code Mods code reference

Read real mods' code and start building from it. For each thing you may want to build: the smallest form, written by ModsCode, and the code of public mods that do it, with their licence. The same code runs in the terminal and the desktop app.

Check the code yourself before you copy or install it. Mods run unsandboxed, with your permissions. ModsCode does not vouch for what the code does.

Security practices

How to build a mod that readers can check before they install it. Each practice rests on rules ModsCode reads in every mod's code; none of them rates a mod.

Designs

Pane designs to copy into a mod: one file each of look, a mod by the maker of ModsCode, with sample data and its code (PolyForm Noncommercial 1.0.0). All 54 designs.

A mod is a plugin with a .claude-plugin/plugin.json, a hooks/hooks.json whose modules names your code, and a file that exports register(on). on(event, hook) handles an event, and each hook gets ($, e, next). See the guide; the primary source is Anthropic's official documentation. Once it is public on GitHub, a topic adds it to ModsCode.