# Plugins and mods

> Bundle skills, slash commands, sub-agents, hooks, MCP and language servers into a KazoCode plugin compatible with Claude Code, or change how KazoCode behaves with a mod.

## Plugins

A plugin bundles the things that customize the agent: [skills](https://kazocode.app/docs/customize/skills.md), slash commands, [sub-agents](https://kazocode.app/docs/agent/agents.md), [hooks](https://kazocode.app/docs/customize/hooks.md), [MCP servers](https://kazocode.app/docs/customize/mcp.md) and language servers. Plugins use the Claude Code plugin layout, so one plugin works in both.

```sh
npx kazocode-sdk new plugin review-kit
```

```text
review-kit/
  .claude-plugin/plugin.json
  skills/review-kit/SKILL.md      skills the agent can use
  commands/hello.md               /hello in the chat
  agents/review-kit-reviewer.md   a sub-agent
  hooks/hooks.json                commands that run on agent events
  .mcp.json                       MCP servers
  .lsp.json                       language servers
```

`@kazocode/sdk/plugin` has types for every file: `PluginManifest`, `HooksFile` (with every `HookEvent`), `McpFile`, and the frontmatter of skills, agents and commands.

Install a plugin by copying it to `~/.kazocode/plugins/<name>`, or from the Extensions view.

## Mods

A mod is a single file that changes how KazoCode itself behaves: block certain tool calls, add a chat command, or show something in the status bar. Put it in `.kazo/mods/` for one project or `~/.kazocode/mods/` for every project.

```ts title=".kazo/mods/guard.ts"
import { defineMod } from "@kazocode/sdk/mod";

export default defineMod((kazo) => {
  kazo.onToolCall((call) => {
    if (call.tool === "bash" && /git push --force/.test(String(call.input.command))) return { block: "No force pushes." };
  });
  kazo.commands.register("standup", "Summarize today's commits", async (_args, say) => say("…"));
  kazo.statusBar.set("oncall", "On call");
});
```

KazoCode asks before running a mod, and asks again whenever its file changes. `/mods` lists, reloads or creates mods.

## Plugin, mod or extension?

| You want to | Use |
| --- | --- |
| Teach the agent a workflow, add commands, agents, hooks or MCP servers | A plugin |
| Change KazoCode's own behavior with a few lines of code | A mod |
| Add editor features: commands, languages, UI messages | An [extension](https://kazocode.app/docs/sdk/extensions.md) |
