
hookify
Behavioral rules engine that blocks unsafe commands through markdown rule files, with no code required.
- version
- 1.10.3
- GitHub stars
- 350
What it does
- Adds
/hookify:from-hook,/hookify:install,/hookify:list, and/hookify:configurecommands plus arule_guard.pyhook for Bash, Write, Edit, prompt, and stop events - Ships default-on Git Safety rules that block force pushes to
main/masterand warn on risky operations likereset --hardorclean -fd - Enforces user overrides from
.claude/on top of bundled rules, with a stdlib parser fallback when PyYAML is missing - Designed for teams that want guardrails on destructive commands without writing hook code
Behavioral rules engine: create safety hooks through markdown configuration with pattern matching and zero-code rule authoring
Add marketplace
/plugin marketplace add athola/claude-night-marketRun it inside Claude Code once, then install the plugin below.
Install
/plugin install hookify@claude-night-marketRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceWhen To Use
- Browsing available hookify rules by category
- Installing standard pre-built rules into a project
- Looking for ready-made rules before writing custom ones
When NOT To Use
- Writing custom rules from scratch: use
hookify:writing-rulesinstead - Debugging or modifying existing installed rules
- Converting Python SDK hooks: use
hookify:from-hookinstead
Hookify Rule Catalog
Pre-built rules for common scenarios. Install directly or use as templates.
Quick Install
# Install a specific rule
Skill(hookify:rule-catalog) then install git:block-force-push
# Or use the Python installer for bulk operations
python3 plugins/hookify/scripts/install_rule.py git:block-force-push
python3 plugins/hookify/scripts/install_rule.py --category git
python3 plugins/hookify/scripts/install_rule.py --all
Verification: Run python --version to verify Python environment.
Available Rules
git/ - Git Safety
| Rule | Action | Default | Description |
|---|---|---|---|
block-force-push | block | enabled | Prevent force push to main/master |
block-destructive-git | block | enabled | Block reset --hard, checkout -- ., clean -fd, etc. |
warn-risky-git | warn | enabled | Warn about rebase -i, soft reset, etc. |
warn-large-commits | warn | enabled | Warn about large binary files |
python/ - Python Quality
| Rule | Action | Default | Description |
|---|---|---|---|
block-dynamic-code | block | enabled | Block dangerous dynamic code execution |
warn-print-statements | warn | enabled | Encourage logging over print() |
security/ - Security Gates
| Rule | Action | Default | Description |
|---|---|---|---|
require-security-review | warn | enabled | Require review for auth code |
destructive-command-guard | warn | enabled | Warn on destructive commands targeting prod-shaped paths |
workflow/ - Workflow Enforcement
| Rule | Action | Default | Description |
|---|---|---|---|
enforce-scope-guard | warn | enabled | Anti-overengineering (imbue) |
require-spec-before-code | block | disabled | Spec-first development |
performance/ - Resource Management
| Rule | Action | Default | Description |
|---|---|---|---|
warn-large-file-ops | warn | enabled | Watch large file writes |
Installation Instructions
Method 1: Claude-Assisted (Recommended)
When you invoke this skill, tell Claude which rule(s) to install:
**Verification:** Run `git status` to confirm working tree state.
Install git:block-force-push
Verification: Run the command with --help flag to verify availability.
Claude will:
- Read the rule from
skills/rule-catalog/rules/git/block-force-push.md - Write it to
.claude/hookify.block-force-push.local.md - Confirm installation
Method 2: Python Script
For bulk operations or automation:
# Install single rule
python3 plugins/hookify/scripts/install_rule.py git:block-force-push
# Install all rules in category
python3 plugins/hookify/scripts/install_rule.py --category python
# Install all rules
python3 plugins/hookify/scripts/install_rule.py --all
# List available rules
python3 plugins/hookify/scripts/install_rule.py --list
# Install to custom directory
python3 plugins/hookify/scripts/install_rule.py git:block-force-push --target /path/to/.claude
Verification: Run the command with --help flag to verify availability.
Method 3: Manual Copy
- Find rule in
plugins/hookify/skills/rule-catalog/rules/<category>/<rule>.md - Copy to
.claude/hookify.<rule-name>.local.md - Edit
enabled: true/falseas needed
Rule File Locations
Rules are stored relative to this skill:
**Verification:** Run the command with `--help` flag to verify availability.
skills/rule-catalog/
├── SKILL.md (this file)
└── rules/
├── git/
│ ├── block-force-push.md
│ ├── block-destructive-git.md
│ ├── warn-risky-git.md
│ └── warn-large-commits.md
├── python/
│ ├── block-dynamic-code.md
│ └── warn-print-statements.md
├── security/
│ ├── require-security-review.md
│ └── destructive-command-guard.md
├── workflow/
│ ├── enforce-scope-guard.md
│ └── require-spec-before-code.md
└── performance/
└── warn-large-file-ops.md
Verification: Run the command with --help flag to verify availability.
Customizing Rules
After installation, edit the rule in .claude/:
# Change action from warn to block
action: block
# Disable temporarily
enabled: false
# Modify pattern
pattern: your-custom-pattern
Verification: Run the command with --help flag to verify availability.
Creating Pull Requests for New Rules
To add rules to the catalog:
- Create rule file in appropriate category
- Follow naming convention:
kebab-case.md - Include detailed message with alternatives
- Test thoroughly before submitting
- Update this SKILL.md catalog table
Related
Skill(hookify:writing-rules)- Create custom rules/hookify:list- Show installed rules/hookify:configure- Manage installed rules
Exit Criteria
- Installed rule file exists at
.claude/hookify.<rule-name>.local.mdwithenabled: truein its frontmatter - Rule activates without requiring a session restart; verified by triggering a matching pattern and observing the warn or block response
- When installing via Python script, exit code 0 is returned and the rule file is present at the target path
- Rule file structure matches the catalog source at
skills/rule-catalog/rules/<category>/<rule>.md; no fields silently dropped during installation
Readme
Hookify
Behavioral rules and safety hooks for Claude Code.
Overview
Hookify provides a suite of pre-configured rules that are active immediately upon installation. These rules protect critical git branches, prevent destructive operations, and enforce security and workflow standards without requiring manual configuration.
Active Rules
The following rules are enabled by default:
- Git Safety: Blocks force pushes to
main/masterand destructive operations likereset --hardorclean -fd. Warnings are issued for risky actions such as interactive rebases or soft resets. - File Management: Monitors for large binary files or large file operations that could bloat the repository or context.
- Code Standards: Blocks dangerous dynamic code execution
and warns about print statements in Python.
Authentication changes require a security review,
and new features must comply with
scope-guardpolicies.
Architecture
Hookify uses a ConfigLoader to manage behavioral rules.
It automatically searches for user-defined rules in the .claude/ directory,
which can override any of the default bundled rules.
These configurations are processed by the RuleEngine to evaluate tool usage
against the active rule set during execution.
The hooks/rule_guard.py hook runs that evaluation on every Bash, Write,
Edit, prompt, and stop event and denies or warns as the rule says.
The hook runs under the operator's python3. When that interpreter
cannot import PyYAML, the loader reads rule frontmatter with a stdlib
parser that accepts plain and quoted scalars plus the
conditions: list, so block rules still block. A rule outside that
subset fails to load and is named in the hook's systemMessage.
Bundled rules resolve their locations relative to the plugin's installation
path to ensure portability across different environments.
Installation
claude install hookify@claude-night-market
Or from source:
git clone https://github.com/athola/claude-night-market
cd claude-night-market
claude install ./plugins/hookify
Commands
| Command | Description |
|---|---|
/hookify:from-hook | Convert Python SDK hooks to declarative hookify rules |
/hookify:install | Install a rule, category, or bundle (e.g. --bundle safe-defaults) |
/hookify:list | List installed and available rules |
/hookify:configure | Configure rule settings |
Bundles
Per the inclusive-defaults policy,
hookify ships a curated safe-defaults bundle of warn-only rules. Block-action
rules are intentionally excluded so a default-on bundle install cannot interrupt
legitimate commands.
python3 plugins/hookify/scripts/install_rule.py --bundle safe-defaults
Contents (all action: warn):
documentation:require-slop-scan-for-docsgit:warn-large-commits,git:warn-risky-gitperformance:warn-large-file-opspython:warn-print-statementsworkflow:plan-before-large-dispatch
Scripts
Rule Suggester
Analyze project context and suggest relevant rules:
python plugins/hookify/scripts/rule_suggester.py --project-dir .
Detects languages, frameworks, and tooling to recommend appropriate rules.
Documentation
- Rule Catalog:
Skill(hookify:rule-catalog) - Rule Writing:
Skill(hookify:writing-rules) - Hook Scope:
Skill(abstract:hook-scope-guide)(requires abstract plugin)
Optional Dependencies
| Dependency | Purpose | Fallback |
|---|---|---|
| abstract plugin | hook-scope-guide skill for advanced hook patterns | Hookify works fully without it, minus the skill |
Hookify is fully functional without optional dependencies. The abstract plugin provides additional guidance for advanced hook development patterns.
Stewardship
Ways to leave this plugin better than you found it:
- Bundled rule descriptions are an opportunity to add "why" annotations explaining the risk each rule guards
- The rule suggester output could include confidence scores so users know which suggestions are strongest
- User override examples in
.claude/would benefit from a minimal template showing the override format /hookify:from-hookconversion could document edge cases where Python hooks do not map cleanly to rules
See STEWARDSHIP.md for the full stewardship principles guiding this project.
Credits
Inspired by the original hookify plugin by Daisy Hollman at Anthropic.
Enhanced for claude-night-market with:
- Zero-config bundled rules
- Portable path resolution via
__file__ - User override support
- Night-market plugin integration
Details
- Marketplace
- athola/claude-night-market
- Source
- plugins/hookify
- Category
- Community
- Keywords
- hooks, safety, behavioral-rules, configuration
- Listed since
- Apr 7, 2026
More from athola/claude-night-market
All 23- imbuev1.10.3
- leylinev1.10.3
- memory-palacev1.10.3
- ministerv1.10.3
- oraclev1.10.3
- parseltonguev1.10.3
- pensivev1.10.3
- phantomv1.10.3
- sanctumv1.10.3
- scribev1.10.3
- scryv1.10.3
- spec-kitv1.10.3
- tomev1.10.3
- abstractv1.10.3
- archetypesv1.10.3
- attunev1.10.3
- cartographv1.10.3
- conjurev1.10.3
- conservev1.10.3
- egregorev1.10.3
- gauntletv1.10.3
- heraldv1.10.3
Similar to hookify
More Agent Workflow & Planning
abstractPluginathola/claude-night-market350 starsSkill authoring, hook development, evaluation frameworks, and escalation governance for the Claude Code plugin ecosystem
hooks-pluginPluginlaurigates/claude-plugins60 starsClaude Code hooks for enforcing best practices and workflow automation
writing-hookify-rulesSkillanthropics/claude-plugins-official7.6K installsGuide to writing hookify rule files, covering frontmatter fields, event types, and regex pattern tips.
hooks-developmentPlugindavepoon/buildwithclaude3.8K starsDevelopment Hooks - Event-driven automation hooks
hooks-formattingPlugindavepoon/buildwithclaude3.8K starsFormatting Hooks - Event-driven automation hooks
sc-hooksPluginkylesnowschwartz/SimpleClaude116 starsSimpleClaude hooks for auto-formatting, lint checks, and tool monitoring