flowingkhaosSign in
Build a Claude Code mod that fails closedstep 1 of 8 · 0 of 18 carriedSign in to keep it
Step 1 of 8 · weight 1 · about 15 minutes

Read it, then pass the check at the end to open step 2.

Before you start: Claude Code, Bun and git

Updated

Before you start

A Claude Code mod is a small plugin of TypeScript functions that runs inside Claude Code itself: it can draw a line above the prompt, open a side pane, hold a tool call until you answer, or watch every command go by. In this workshop you build four of them, the four we run every day, and you finish with a gate that refuses to install a mod that would fail open.

Everything here was built and tested on Claude Code 2.1.291 to 2.1.294, on Linux. The macOS and Windows commands are the official installers; we did not run them ourselves. The times are estimates.

What you need

Tool Version Why this workshop needs it Free
Claude Code 2.1.291 or newer mods are an early-access feature of recent builds the CLI is free; it needs a Claude plan or API key
Bun 1.2 or newer runs tsc for the type-check in step 7 yes
git any the mod folder is a repository, and step 7 makes it a marketplace yes
A terminal — the steps run claude from a shell; the Desktop Code tab works too (see the gotchas) yes

Get it on your machine

Claude Code:

curl -fsSL https://claude.ai/install.sh | bash
irm https://claude.ai/install.ps1 | iex
curl -fsSL https://claude.ai/install.sh | bash

Bun:

curl -fsSL https://bun.sh/install | bash
powershell -c "irm bun.sh/install.ps1 | iex"
curl -fsSL https://bun.sh/install | bash

git:

xcode-select --install
winget install --id Git.Git -e
sudo apt install -y git

On Fedora, use sudo dnf install -y git instead of apt.

Check all three. Each prints a version; Claude Code must say 2.1.291 or higher:

claude --version
bun --version
git --version

Then make the folder every step works in:

mkdir -p ~/claude-mods && cd ~/claude-mods && git init

Known gotchas

These are the ones we hit while building the mods; none is invented.

  • The mods API is early access. The engine says so in its own type file: the surface may change between releases. When a step’s code stops validating after an update, read the new types (step 2 shows where) before you change anything else.
  • The Desktop Code tab takes no command-line flags. Where a step says claude --plugin-dir <folder>, the Desktop app needs the folder in the CLAUDE_CODE_PLUGIN_DIRS variable of your settings’ env block instead.
  • A mod’s slash command does not run under claude -p "/name". In a headless run the text goes to the model as a plain prompt. Test commands in an interactive session.
  • An edit to an installed mod needs /reload-plugins. Nothing reinstalls; the folder is read in place.
  • In a Bun workspace, never run bunx tsc. In our monorepo it replaced node_modules and broke the install. Step 7 runs a pinned tsc instead.
The gate · a reading check closes this stepweight 1 of Σw 15

Check what you read in “Before you start: Claude Code, Bun and git”

Three questions drawn from a larger pool, so no two papers are quite the same. Two right passes it and opens the next step. The questions are public; scoring them needs an account, and the key never leaves the server.

Loading the check…

All 8 stepsTake the check

The columns, fixes and workshops continue in the community: SEO, AI, and making money with code.

Join on Whop

Luke Sidney writes and builds everything here, alone, in the open. lukesidney.me