spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / README.md
24 lines · 1.6 KBPreviewCodeRaw
1# Mods
2
3A mod is a Claude Code plugin whose behaviour lives in a hooks module: one
4`register(on, options)` entry that hooks the engine's events as functions
5`($, e, next)`. These three ship inside Claude Code; this folder is their
6source, published as it is built into the binary.
7
8| Mod | What it does | Seated |
9| --- | --- | --- |
10| [`sec-default`](sec-default) | Keeps an organization's classic hooks, prompt content, managed settings and tool policy out of reach of the plugins a person installs; adds no policy of its own. | Outermost, on a machine with managed settings or for a Team or Enterprise organization, unless managed `prependPlugins` says otherwise |
11| [`diff`](diff) | `/diff`: the session's uncommitted changes in a pane beside the transcript, file by file with their hunks, refreshed as Claude edits files and runs commands. | Built in |
12| [`telemetry`](telemetry) | Adds `$.telemetry` (`log`, `mark`) in the `engine.create` fold so a plugin can record an event as a first-party analytics row; sends nothing wherever Claude Code's analytics are off. | Built in |
13
14Each folder is a complete plugin: `.claude-plugin/plugin.json`, a
15`hooks/hooks.json` naming the module, and TypeScript under `hooks/` typed
16against the declarations `/plugin-types` writes (`import type … from
17'claude-code'`). To read one running from source:
18
19 claude --plugin-dir mods/diff
20
21Early access: hooks modules load only where function hooks are enabled, and
22the API these mods are written against may change between releases without
23notice. They are not listed in this repository's marketplace; the copies that
24matter are the ones already in your Claude Code.