Source-cited Obsidian knowledge base about Claude Code mods: how they work, how to build them, and how to check one before you install it.

<img src="assets/hero.svg" alt="Claude Mods Brain: a second brain for Claude Code mods. Linked notes on events, the mods API, safety, the catalog, flows, canon, sources and pitfalls orbit the title." width="100%"/>
<img alt="Tested on Claude Code 2.1.288" src="https://img.shields.io/badge/tested%20on-Claude%20Code%202.1.288-d97757"/> <img alt="Notes" src="https://img.shields.io/badge/notes-100%2B-4a6fa5"/> <img alt="Sources" src="https://img.shields.io/badge/dated%20sources-50-4a6fa5"/> <img alt="Claims checked" src="https://img.shields.io/badge/claims%20tracked-290%2B-3a8a5c"/> <img alt="License" src="https://img.shields.io/badge/license-MIT%20%2B%20CC%20BY%204.0-555"/>
On October 1, 2026, Anthropic shipped mods in Claude Code 2.1.287. A mod is a small TypeScript add-on that runs inside Claude Code. It can:
That is a lot of power, and it moves fast. Mods are not sandboxed: a mod runs with your permissions. And the API can change between releases. This brain exists so you can learn mods, build them, and judge someone else's mod before you install it, without guessing.
| Plain explanations | How a mod is put together, how hooks chain around Claude Code, every event family, the $ API, where a mod can draw, and its time and size limits. |
| Step-by-step recipes | Build a status band, a pane, a slash command, or a guard that holds a risky tool call. Migrate old settings hooks. Test and publish. |
| A safety checklist | What a mod can reach, what it costs you in usage, how prompt injection gets in, and an ordered audit you can run before installing anything. |
| A graded catalog | 40 built-in, official, and community mods, each pinned to a commit, with what it touches and an adopt, trial, or avoid verdict and the reason. |
| Patterns and pitfalls | What works, what breaks, and why, gathered from the docs and the 235-comment design thread. |
| Small tools | A scanner that reads a mod without running it, and a drift check that tells you which notes to re-check after a Claude Code update. |
<img src="_attachments/mods-hook-chain.svg" alt="Diagram: an event passes through prepend, user, append, and builtin hook tiers to the core and back" width="85%"/>
1. Read it like a book. Open this folder as a vault in Obsidian and start at wiki/meta/Start Here.md. It splits into four paths: understand mods, build a mod, check someone else's mod, and keep this brain current. Every note links to its neighbours, so the graph view is a good map.
2. Ask it questions in Claude Code. Copy agents/mods-secretary.md into your project's .claude/agents/ folder, open Claude Code here, and ask things like:
"How do I hold a Bash call until I approve it?" "Is this mod safe to install?" "Claude Code just updated. What do I need to re-check?"
The agent answers from the notes, cites the note and the official page, and never installs or runs a mod for you.
3. Check a mod before you install it. With Python 3.10 or newer:
python3 -m mods_brain.cli audit-mod path/to/some-mod --origin owner/repo@abc1234 --tested-on 2.1.288 --date 2026-10-03
You get a report covering which events the mod hooks, what it calls, how far it reaches (from draws only to network), whether it can spend your usage, and red flags such as downloads code and then runs it. A clean report is a starting point, not a verdict. The checklist in the vault covers what a scan can't see.
references/ list all 50 sources and every tracked claim with its verdict.Mods are new and the API "may change between releases without notice". When Claude Code updates, follow wiki/flows/Research Refresh Workflow.md. In short: capture the new type definitions, run the drift check, and re-read the notes it lists.
wiki/ the knowledge: concepts, flows, deliverables, catalog entries, reports
references/ source ledger, claim ledger, canon summaries, generated API data
scripts/ the scanner, drift check, and report renderers (plain Python, no dependencies)
schemas/ JSON Schemas for every generated file
tests/ tests with synthetic fixtures (no real mod is ever run)
agents/ the mods-secretary agent for Claude Code
No copies of third-party documentation are included: the vault links to the original pages instead.
wiki/, references/, agents/): CC BY 4.0. Reuse them freely, with credit.scripts/, mods_brain/, tests/, schemas/): MIT.Made by Daniel Agrici. Corrections and new sources are welcome: see CONTRIBUTING.
Not captured.