← All guides

Guide · Mod · ★★★☆☆

Claude Code mods: build a live agent panel by asking

I never meant to make a mod. I asked Claude to let me watch my agents, and it built a small plugin that shows them above the chat box.

By Arthur Hsiao · Last updated · 4 min read

The idea. A mod is a Claude Code plugin that changes Claude's own screen or behaviour. It is not a web page and not a script you run. Ask for a panel, a status line or a toast, and Claude can write the mod for you. It lives on your machine.

How it started

I was running several agents at once and could not see what each one was doing. I gave Claude one prompt, close to this:

I want to live stream what my agents are doing. Show me if each one is pending
or working. Give each agent a name and a hand-drawn character, so I can see it
at a glance.

I did not say "mod" or "plugin". Claude picked that itself. It wrote a local plugin and put a panel on top of the chat box in the session. The panel lists every agent with its name, its drawn character and its state, and it updates while they work.

1What a mod is

A mod is a normal Claude Code plugin with one extra part: a hooks module. It has three files:

my-mod/
  .claude-plugin/plugin.json   name, version, one-line description
  hooks/hooks.json             { "modules": ["./register.tsx"] }
  hooks/register.tsx           the code

The code is one register function. In it you hook events with on(event, hook). Each hook gets $ (the engine: UI, files, processes, timers), e (the event) and next (carry on). It is the same idea as the hooks you put in settings.json, but it can also draw things on screen.

2What you can ask for

The built-in plugin-authoring skill maps a plain request to a shape:

You ask forClaude builds
A panel or sidebar beside the chatA pane, opened with $.ui.open
A row above the chat boxAn AbovePrompt band
A status line entry or a toast$.ui.status and $.ui.toast
Block or change a tool callA tool.call hook
A new slash command$.command.register

My agent panel is the "row above the chat box" kind. The same skill also lists a pane that stays beside the transcript, like the built-in /diff.

3What you will see

The first time Claude writes a mod in a session, it asks you one question:

Turn on the mods Claude writes in this session?

The choices are How does this work?, Turn them on and Not now. Only you can answer it. No permission mode or hook answers for you. On Turn them on, the mod loads when the turn ends, and each later edit reloads it when that turn ends. On Not now, the files are still written and load the next time the session starts.

This question is why I did not notice at first. I said yes to a prompt, and a panel appeared.

4Check it and test it

Claude writes the mod under ~/.claude/dev-mods/. You can check it yourself:

claude plugin validate <mod folder>
claude plugin test <mod folder>

validate reads the manifest and the code the way Claude Code will, and lists anything it would refuse. To load a mod from a folder in a session you started yourself:

claude --plugin-dir <mod folder>

If a hook fails, the transcript shows one dim line with the plugin name and the reason. Run claude --debug for the full log.

5Make it better with a second prompt

The first version is rarely the last one. These follow-ups worked for me:

Make the panel one line per agent, and hide an agent when it finishes.
Use a different colour for pending, working and failed.
Add a /agents command that shows the full list.

Read what it wrote before you keep it. A mod runs inside Claude Code with your permissions, like any plugin.

Mods are early access. The API they use can change between Claude Code releases without notice. Keep the mod small, and expect to ask Claude to fix it after an update. Do not install a mod from someone else without reading it first.

To save the same work as a reusable instruction instead of a screen change, see Claude Code skills.