Claude Code mod patterns for hooks and next, ui.render drawing, $.state, guards, and plugin tests. Load before any edit to a plugin hooks module or hooks.json, however small, or for mod questions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Claude Code Mods Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-claude-code-mods-patterns)
---
name: claude-code-mods-patterns
description: Claude Code mod patterns for hooks and next, ui.render drawing, $.state, guards, and plugin tests. Load before any edit to a plugin hooks module or hooks.json, however small, or for mod questions.
---
# Claude Code mods patterns
Default assumption: Claude Code 2.1.334, per the Claude Code changelog. The stable channel is 2.1.331, per the npm dist-tags, and mods are on by default from CLI 2.1.287 and Desktop 2.1.286, per the mods overview.
A row or entry that names a version applies when the Claude Code the mod's users run is at least that version. The API types the engine writes into the plugin's `.claude-plugin/types/` are the reference for the version loaded.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| --------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing a mod, or raising the Claude Code version it supports | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing a hooks module or `hooks.json` | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing a hook, a `ui.render` tree, a `$.state` value or contract, or a registered tool | [reference/practices.md](reference/practices.md) |
| Running `claude plugin validate`, `claude plugin test`, or `tsc` on a mod | [reference/tooling.md](reference/tooling.md) |
| Writing or changing a mod's `*.test.ts` or `*.test.tsx` | [reference/testing.md](reference/testing.md) |