🪝
AI EngineeringPython

Writing Hookify Rules

by anthropics

Writing Hookify Rules is an AI Engineering skill for Claude Code, published by anthropics in claude-plugins-official.

33.5K stars3.8K forkson anthropics/claude-plugins-officialAdded 2026/08/13Repository updated 2026/08/13
claude-codemcpskills
Install in seconds
Install Writing Hookify Rules
Copy Writing Hookify Rules into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/anthropics/claude-plugins-official/tree/main/plugins/hookify/skills/writing-rules ~/.claude/skills/writing-rules

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/anthropics/claude-plugins-official.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
plugins/hookify/skills/writing-rules/SKILL.md in anthropics/claude-plugins-official
Installs to
~/.claude/skills/writing-rules
Collection
One of 25 skills cataloged from this repository
Category
AI Engineering2451 skills

What Writing Hookify Rules does

Writing Hookify Rules guides creating hookify rule files with YAML frontmatter to define patterns and messages for Claude Code events. Use it when asked to create, write, or configure hookify rules, or need syntax and pattern guidance.

Writing Hookify Rules is cataloged under AI Engineering on DirSkills. Writing Hookify Rules comes from a repository tagged claude-code, mcp and skills.

Documentation

README

Writing Hookify Rules

Overview

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.

Rule File Format

Basic Structure

---
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.

Frontmatter Fields

name (required): Unique identifier for the rule

  • Use kebab-case: warn-dangerous-rm, block-console-log
  • Be descriptive and action-oriented
  • Start with verb: warn, prevent, block, require, check

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Writing Hookify Rules

  • What else does anthropics publish alongside Writing Hookify Rules?

    Writing Hookify Rules is one of 25 skills that DirSkills catalogs from anthropics/claude-plugins-official, the repository it ships in. Its siblings there include Agent Development, Build MCP App and Build MCP Server. Each one is a separate skill with its own page in this directory, installs the same way Writing Hookify Rules does, and is maintained by anthropics in that same repository. The rest of the collection is listed on the anthropics/claude-plugins-official page.

  • How does Writing Hookify Rules compare to other AI Engineering skills?

    Writing Hookify Rules ranks #164 by stars among the 2451 AI Engineering skills in this catalog. The most-starred ones next to it are Architecture Decision Records, AI-First Engineering and Agentic OS. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Writing Hookify Rules against them. Open each page to compare what they document and how they install.

More from anthropics/claude-plugins-official

Writing Hookify Rules is one of 25 skills cataloged on DirSkills from anthropics/claude-plugins-official.

See all 25 skills
🤖
3w ago

Agent Development

Agent Development guides the creation of autonomous agents for Claude Code plugins, covering agent structure, triggering conditions, system prompts, and best practices. Use it when building subagents or configuring agent frontmatter.
AI Engineering
33.5K3.8K
🧩
3w ago

Build MCP App

Build MCP App adds interactive UI widgets to an MCP server so tools can render forms, pickers, confirmations, dashboards, and progress indicators inline in chat. Use it after build-mcp-server when you need structured input, visual output, or explicit user confirmation.
AI Engineering
33.5K3.8K
🔌
3w ago

Build MCP Server

Build MCP Server guides developers through designing and building MCP servers that work with Claude, from discovery questions to deployment recommendations. Use it when asked to build an MCP server, create an MCP integration, wrap an API for Claude, or expose tools to Claude.
AI Engineering
33.5K3.8K
📦
3w ago

Build MCPB

Build MCPB packages local MCP servers with their runtime into a single installable file. Use it when a server must run on the user's machine without Node or Python installed.
DevOps
33.5K3.8K
🛠️
3w ago

Cardputer Buddy

Cardputer Buddy helps iterate on the Cardputer-Adv MicroPython app bundle (Claude Buddy, Snake, Hello) after initial provisioning via m5-onboard. Use it to add apps, push changed .py files without re-flashing, watch device serial logs, or run one-shot REPL commands.
DevOps
33.5K3.8K
🧠
3w ago

Claude Automation Recommender

Claude Automation Recommender analyzes a codebase to recommend tailored Claude Code automations such as hooks, subagents, skills, plugins, and MCP servers. Use it when setting up Claude Code for a project or optimizing existing workflows.
AI Engineering
33.5K3.8K