Mod your
agent.

Mods are TypeScript extensions for Command Code. Add tools, slash commands, and rules that change how your agent works.

Your agent
> git push --force origin main
LForce-pushed to main
+
A mod~/.commandcode/mods/guard.ts
1export default (cmd) => {
2 cmd.hooks({
3 beforeToolCall: ({input}) =>
4 input.command.includes('--force')
5 ? {block: true} : undefined,
6 });
7};
=
Your agent, modded
> git push --force origin main
L✕ Blocked by guard.ts

//Discover

Community mods

Install one and make it part of your workflow, or build your own and publish it here.

1 mod

//Create

Start with an idea.

Copy a prompt into Command Code. It builds the mod, then you can refine it together.

  • 01command

    Slash command

    Prompt

    Build me a mod that adds a /standup slash command summarizing what changed in git today.

    slash-command.ts

    addCommand: a /command returning {prompt} or {message}

  • 02tool

    Custom tool

    Prompt

    Build me a mod that adds a tool the model can call to count TODO markers in the repo.

    custom-tool.ts

    addTool: a model-callable tool with run + exec

  • 03hook

    Block dangerous commands

    Prompt

    Build me a mod that blocks any shell command containing "rm -rf" unless I confirm it first.

    block-dangerous-commands.ts

    hooks.beforeToolCall: block or allow with a confirm

  • 04hook

    Input shortcuts

    Prompt

    Build me a mod that expands "fix:" at the start of my prompt into a full bug-fix instruction.

    input-shortcuts.ts

    hooks.transformInput: rewrite or handle typed input

  • 05event

    Observe events

    Prompt

    Build me a mod that logs every tool call and how long it took to a file in the project.

    observe-events.ts

    on(event) + the cross-mod events bus

  • 06renderer

    Custom entry renderer

    Prompt

    Build me a mod that renders a styled summary row in the feed at the end of every run.

    custom-entry-renderer.ts

    addRenderer + showEntry: styled feed rows

  • 07flag

    Flags and options

    Prompt

    Build me a mod with a --mod-option strict=true flag that tightens what shell commands are allowed.

    flags-and-options.ts

    addFlag / getFlag + --mod-option

  • 08hook

    Lifecycle hooks

    Prompt

    Build me a mod that keeps the agent working until all tests pass, using the Stop hook.

    lifecycle-hooks.ts

    onStop, onSessionStart/End, afterToolCall isError, subagent events

  • 09showcase

    Kitchen sink

    Prompt

    What kinds of mods can I build for Command Code? Show me a few examples.

    kitchen-sink.ts

    every capability in one annotated file

  • 01command

    Slash command

    Prompt

    Build me a mod that adds a /standup slash command summarizing what changed in git today.

    slash-command.ts

    addCommand: a /command returning {prompt} or {message}

  • 02tool

    Custom tool

    Prompt

    Build me a mod that adds a tool the model can call to count TODO markers in the repo.

    custom-tool.ts

    addTool: a model-callable tool with run + exec

  • 03hook

    Block dangerous commands

    Prompt

    Build me a mod that blocks any shell command containing "rm -rf" unless I confirm it first.

    block-dangerous-commands.ts

    hooks.beforeToolCall: block or allow with a confirm

  • 04hook

    Input shortcuts

    Prompt

    Build me a mod that expands "fix:" at the start of my prompt into a full bug-fix instruction.

    input-shortcuts.ts

    hooks.transformInput: rewrite or handle typed input

  • 05event

    Observe events

    Prompt

    Build me a mod that logs every tool call and how long it took to a file in the project.

    observe-events.ts

    on(event) + the cross-mod events bus

  • 06renderer

    Custom entry renderer

    Prompt

    Build me a mod that renders a styled summary row in the feed at the end of every run.

    custom-entry-renderer.ts

    addRenderer + showEntry: styled feed rows

  • 07flag

    Flags and options

    Prompt

    Build me a mod with a --mod-option strict=true flag that tightens what shell commands are allowed.

    flags-and-options.ts

    addFlag / getFlag + --mod-option

  • 08hook

    Lifecycle hooks

    Prompt

    Build me a mod that keeps the agent working until all tests pass, using the Stop hook.

    lifecycle-hooks.ts

    onStop, onSessionStart/End, afterToolCall isError, subagent events

  • 09showcase

    Kitchen sink

    Prompt

    What kinds of mods can I build for Command Code? Show me a few examples.

    kitchen-sink.ts

    every capability in one annotated file

  • 01command

    Slash command

    Prompt

    Build me a mod that adds a /standup slash command summarizing what changed in git today.

    slash-command.ts

    addCommand: a /command returning {prompt} or {message}

  • 02tool

    Custom tool

    Prompt

    Build me a mod that adds a tool the model can call to count TODO markers in the repo.

    custom-tool.ts

    addTool: a model-callable tool with run + exec

  • 03hook

    Block dangerous commands

    Prompt

    Build me a mod that blocks any shell command containing "rm -rf" unless I confirm it first.

    block-dangerous-commands.ts

    hooks.beforeToolCall: block or allow with a confirm

  • 04hook

    Input shortcuts

    Prompt

    Build me a mod that expands "fix:" at the start of my prompt into a full bug-fix instruction.

    input-shortcuts.ts

    hooks.transformInput: rewrite or handle typed input

  • 05event

    Observe events

    Prompt

    Build me a mod that logs every tool call and how long it took to a file in the project.

    observe-events.ts

    on(event) + the cross-mod events bus

  • 06renderer

    Custom entry renderer

    Prompt

    Build me a mod that renders a styled summary row in the feed at the end of every run.

    custom-entry-renderer.ts

    addRenderer + showEntry: styled feed rows

  • 07flag

    Flags and options

    Prompt

    Build me a mod with a --mod-option strict=true flag that tightens what shell commands are allowed.

    flags-and-options.ts

    addFlag / getFlag + --mod-option

  • 08hook

    Lifecycle hooks

    Prompt

    Build me a mod that keeps the agent working until all tests pass, using the Stop hook.

    lifecycle-hooks.ts

    onStop, onSessionStart/End, afterToolCall isError, subagent events

  • 09showcase

    Kitchen sink

    Prompt

    What kinds of mods can I build for Command Code? Show me a few examples.

    kitchen-sink.ts

    every capability in one annotated file