Crush Configuration
charmbracelet/crush
Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.
Explains the hookify rule file format: markdown with YAML frontmatter that watches bash commands, file edits, prompts or stop events and warns or blocks.
$ npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install anthropics/claude-plugins-official writing-hookify-rules --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/hookify/skills/writing-rules .claude/skills/writing-hookify-rules && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "writing-hookify-rules" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify/skills/writing-rules into .claude/skills/writing-hookify-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-hookify-rules", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify/skills/writing-rulesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install anthropics/claude-plugins-official writing-hookify-rules --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/hookify/skills/writing-rules .agents/skills/writing-hookify-rules && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "writing-hookify-rules" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify/skills/writing-rules into .agents/skills/writing-hookify-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-hookify-rules", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install anthropics/claude-plugins-official writing-hookify-rules --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/hookify/skills/writing-rules .cursor/skills/writing-hookify-rules && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "writing-hookify-rules" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify/skills/writing-rules into .cursor/skills/writing-hookify-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-hookify-rules", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/anthropics/claude-plugins-official.git --path plugins/hookify/skills/writing-rules--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install anthropics/claude-plugins-official writing-hookify-rules --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/hookify/skills/writing-rules .gemini/skills/writing-hookify-rules && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "writing-hookify-rules" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify/skills/writing-rules into .gemini/skills/writing-hookify-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-hookify-rules", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install anthropics/claude-plugins-official writing-hookify-rulesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/hookify/skills/writing-rules .github/skills/writing-hookify-rules && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "writing-hookify-rules" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify/skills/writing-rules into .github/skills/writing-hookify-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-hookify-rules", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install anthropics/claude-plugins-official writing-hookify-rules --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/hookify/skills/writing-rules .opencode/skills/writing-hookify-rules && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "writing-hookify-rules" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify/skills/writing-rules into .opencode/skills/writing-hookify-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-hookify-rules", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
writing-hookify-rulesExplains the hookify rule file format: markdown with YAML frontmatter that watches bash commands, file edits, prompts or stop events and warns or blocks.
Hookify rules are markdown files with YAML frontmatter, kept in `.claude/` as files named `hookify.` plus the rule name and `.local.md`. The frontmatter has a kebab-case `name` that starts with a verb such as warn or block, an `enabled` flag, an `event` (`bash`, `file`, `stop`, `prompt` or `all`) and an optional `action` that is either `warn`, the default, or `block`. A simple rule adds one `pattern`, a Python regex matched against the command for bash events or the new text for file events.
More complex rules list several conditions, each with a field (such as `command`, `file_path`, `new_text`, `old_text` or `content`), an operator (`regex_match`, `contains`, `equals`, `not_contains`, `starts_with` or `ends_with`) and a pattern, and all of them must match for the rule to trigger. The markdown body after the frontmatter is the message shown to Claude, and a good one says what was detected, why it is a problem and what to do instead. The excerpt ends in the event type guide, so later sections are not described.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit b78ac49. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Writing Hookify Rules loads about 2.1k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 639 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
You're adding an API key to a .env file. Ensure this file is in .gitignore!s-warning.local.md` - Warn about editing .env filesAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from anthropics/claude-plugins-official at commit b78ac49, republished under its Apache-2.0 licence (© anthropics). 639 words, ~2,104 tokens.
.claude/skills/writing-hookify-rules/SKILL.md (or your agent's skills folder).Hookify rules are markdown files with YAML frontmatter that define patterns to watch for and messages to show when those patterns match. Rules are stored in .claude/hookify.{rule-name}.local.md files.
---
name: rule-identifier
enabled: true
event: bash|file|stop|prompt|all
pattern: regex-pattern-here
---
Message to show Claude when this rule triggers.
Can include markdown formatting, warnings, suggestions, etc.name (required): Unique identifier for the rule
warn-dangerous-rm, block-console-logenabled (required): Boolean to activate/deactivate
true: Rule is activefalse: Rule is disabled (won't trigger)event (required): Which hook event to trigger on
bash: Bash tool commandsfile: Edit, Write, MultiEdit toolsstop: When agent wants to stopprompt: When user submits a promptall: All eventsaction (optional): What to do when rule matches
warn: Show message but allow operation (default)block: Prevent operation (PreToolUse) or stop session (Stop events)warnpattern (simple format): Regex pattern to match
Example:
event: bash
pattern: rm\s+-rfFor complex rules with multiple conditions:
---
name: warn-env-file-edits
enabled: true
event: file
conditions:
- field: file_path
operator: regex_match
pattern: \.env$
- field: new_text
operator: contains
pattern: API_KEY
---
You're adding an API key to a .env file. Ensure this file is in .gitignore!Condition fields:
field: Which field to checkcommandfile_path, new_text, old_text, contentoperator: How to matchregex_match: Regex pattern matchingcontains: Substring checkequals: Exact matchnot_contains: Substring must NOT be presentstarts_with: Prefix checkends_with: Suffix checkpattern: Pattern or string to matchAll conditions must match for rule to trigger.
The markdown content after frontmatter is shown to Claude when the rule triggers.
Good messages:
Example:
⚠️ **Console.log detected!**
You're adding console.log to production code.
**Why this matters:**
- Debug logs shouldn't ship to production
- Console.log can expose sensitive data
- Impacts browser performance
**Alternatives:**
- Use a proper logging library
- Remove before committing
- Use conditional debug buildsMatch Bash command patterns:
---
event: bash
pattern: sudo\s+|rm\s+-rf|chmod\s+777
---
Dangerous command detected!Common patterns:
rm\s+-rf, dd\s+if=, mkfssudo\s+, su\s+chmod\s+777, chown\s+rootMatch Edit/Write/MultiEdit operations:
---
event: file
pattern: console\.log\(|eval\(|innerHTML\s*=
---
Potentially problematic code pattern detected!Match on different fields:
---
event: file
conditions:
- field: file_path
operator: regex_match
pattern: \.tsx?$
- field: new_text
operator: regex_match
pattern: console\.log\(
---
Console.log in TypeScript file!Common patterns:
console\.log\(, debugger, print\(eval\(, innerHTML\s*=, dangerouslySetInnerHTML\.env$, credentials, \.pem$node_modules/, dist/, build/Match when agent wants to stop (completion checks):
---
event: stop
pattern: .*
---
Before stopping, verify:
- [ ] Tests were run
- [ ] Build succeeded
- [ ] Documentation updatedUse for:
Match user prompt content (advanced):
---
event: prompt
conditions:
- field: user_prompt
operator: contains
pattern: deploy to production
---
Production deployment checklist:
- [ ] Tests passing?
- [ ] Reviewed by team?
- [ ] Monitoring ready?Literal characters: Most characters match themselves
rm matches "rm"console.log matches "console.log"Special characters need escaping:
. (any char) → \. (literal dot)( ) → \( \) (literal parens)[ ] → \[ \] (literal brackets)Common metacharacters:
\s - whitespace (space, tab, newline)\d - digit (0-9)\w - word character (a-z, A-Z, 0-9, _). - any character+ - one or more* - zero or more? - zero or one| - ORExamples:
rm\s+-rf Matches: rm -rf, rm -rf
console\.log\( Matches: console.log(
(eval|exec)\( Matches: eval( or exec(
chmod\s+777 Matches: chmod 777, chmod 777
API_KEY\s*= Matches: API_KEY=, API_KEY =Test regex patterns before using:
python3 -c "import re; print(re.search(r'your_pattern', 'test text'))"Or use online regex testers (regex101.com with Python flavor).
Too broad:
pattern: log # Matches "log", "login", "dialog", "catalog"Better: console\.log\(|logger\.
Too specific:
pattern: rm -rf /tmp # Only matches exact pathBetter: rm\s+-rf
Escaping issues:
"pattern" requires double backslashes \\spattern: \s works as-isLocation: All rules in .claude/ directory
Naming: .claude/hookify.{descriptive-name}.local.md
Gitignore: Add .claude/*.local.md to .gitignore
Good names:
hookify.dangerous-rm.local.mdhookify.console-log.local.mdhookify.require-tests.local.mdhookify.sensitive-files.local.mdBad names:
hookify.rule1.local.md (not descriptive)hookify.md (missing .local)danger.local.md (missing hookify prefix).claude/hookify.{name}.local.md file in project root.local.md fileTemporary: Set enabled: false in frontmatter
Permanent: Delete the .local.md file
See ${CLAUDE_PLUGIN_ROOT}/examples/ for complete examples:
dangerous-rm.local.md - Block dangerous rm commandsconsole-log-warning.local.md - Warn about console.logsensitive-files-warning.local.md - Warn about editing .env filesMinimum viable rule:
---
name: my-rule
enabled: true
event: bash
pattern: dangerous_command
---
Warning message hereRule with conditions:
---
name: my-rule
enabled: true
event: file
conditions:
- field: file_path
operator: regex_match
pattern: \.ts$
- field: new_text
operator: contains
pattern: any
---
Warning messageEvent types:
bash - Bash commandsfile - File editsstop - Completion checksprompt - User inputall - All eventsField options:
commandfile_path, new_text, old_text, contentuser_promptOperators:
regex_match, contains, equals, not_contains, starts_with, ends_with© anthropics, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/hookify/skills/writing-rules of anthropics/claude-plugins-official.
Open the folder on GitHubat commit b78ac49
We found 24 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 6 other GitHub owners. This page covers the copy in anthropics/claude-plugins-official, which our catalogue first saw on October 7, 2026.
Writing Hookify Rules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Writing Hookify Rules this skillanthropics/claude-plugins-official | 38k | 6 repos | ~2.1k | Automated safety check: Notes | Apache-2.0 | |
| Crush Configurationcharmbracelet/crush | 29k | — | ~3.7k | Automated safety check: Pass | Custom licence | |
| Plate Plugin Creatorudecode/plate | 17k | — | ~2.3k | Automated safety check: Pass | Custom licence | |
| AgentSys Cross-Platform Maintenanceagent-sh/agentsys | 994 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Readyprekuter/dryforge | 410 | 1 repos | ~6.8k | Automated safety check: Pass | Apache-2.0 | |
| Agent Setup Health Audittw93/Waza | 7.2k | — | ~5.2k | Automated safety check: Notes | MIT |
charmbracelet/crush
Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.
udecode/plate
Build new Plate plugins with Slate-first architecture, sane typing, and explicit React/Plate wrapper boundaries.
agent-sh/agentsys
Maintainer guide to where AgentSys keeps its marketplace, installer, transforms and adapters, and what to run when preparing a release or fixing a platform bug.
prekuter/dryforge
Understand what you mean before anything is built. An agent skill from prekuter/dryforge.
tw93/Waza
Audits a project's agent configuration, instruction drift, hooks, MCP and AI maintainability, then reports prioritized findings with evidence and next actions.
nukeop/nuclear
A skill your agent uses when writing, scaffolding, or modifying Nuclear plugins.
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
anthropics/claude-plugins-official
Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.
anthropics/claude-plugins-official
Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.
anthropics/claude-plugins-official
Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.
Categories
Explains the hookify rule file format: markdown with YAML frontmatter that watches bash commands, file edits, prompts or stop events and warns or blocks. md`. The frontmatter has a kebab-case `name` that starts with a verb such as warn or block, an `enabled` flag, an `event` (`bash`, `file`, `stop`, `prompt` or `all`) and an optional `action` that is either `warn`, the default, or `block`.
Writing Hookify Rules fits situations like: creating a rule that warns before dangerous rm commands; blocking console.log or other patterns from being written into code; toggling or editing an existing hookify rule; looking up hookify frontmatter fields and operators.
Run `npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a claude-code`. Or copy the skill folder (plugins/hookify/skills/writing-rules in anthropics/claude-plugins-official) into .claude/skills/writing-hookify-rules in your project. Claude Code loads it when a task matches its description.
Run `npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a codex`. Or copy the skill folder (plugins/hookify/skills/writing-rules in anthropics/claude-plugins-official) into .agents/skills/writing-hookify-rules in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add anthropics/claude-plugins-official --skill writing-hookify-rules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-hookify-rules, .gemini/skills/writing-hookify-rules, .github/skills/writing-hookify-rules and .opencode/skills/writing-hookify-rules in your project.
Going by SKILL.md and its folder, Writing Hookify Rules needs the command-line tools its instructions call (python3) and credentials named API_KEY. Our summary lists: The hookify plugin for Claude Code.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Writing Hookify Rules is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Writing Hookify Rules: Crush Configuration (charmbracelet/crush, 29k stars), Plate Plugin Creator (udecode/plate, 17k stars), AgentSys Cross-Platform Maintenance (agent-sh/agentsys, 994 stars) and Ready (prekuter/dryforge, 410 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
anthropics (a GitHub organization, an official publisher) maintains it in anthropics/claude-plugins-official, which has 37,509 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 8, 2026.
Source: anthropics/claude-plugins-official on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.