mcpField
R
rule-catalog

rule-catalog

github.com/atholaAgent workflows34397 installsUpdated 1d ago
Repository

About rule-catalog

A Hookify skill for browsing categorized, prebuilt rules and installing them into a project. It suits users who want to find and apply standard rules before writing custom ones, and rules can also serve as templates.

Key features

  1. 01Browse prebuilt rules by category
  2. 02Install one rule or an entire category
  3. 03Bulk installation through a Python script
  4. 04Edit rule action, enabled state, and pattern

Use cases

  1. 01Block force pushes to main branches
  2. 02Add rules for Python and security actions
  3. 03Install a category of rules in bulk

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/athola/claude-night-market --skill rule-catalog

After installing, type/rule-catalogin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/documentation/
require-slop-scan-for-docs.md
warn-slop-in-markdown.md
rules/git/
block-destructive-git.md
block-force-push.md
warn-large-commits.md
warn-risky-git.md
rules/performance/
warn-large-file-ops.md
rules/python/
block-dynamic-code.md
warn-print-statements.md
rules/security/
destructive-command-guard.md
require-security-review.md
rules/stewardship/
campsite-check.md
rules/workflow/
enforce-scope-guard.md
plan-before-large-dispatch.md
require-spec-before-code.md

Details

From the project README

When 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-rules instead
  • Debugging or modifying existing installed rules
  • Converting Python SDK hooks: use hookify:from-hook instead

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
RuleActionDefaultDescription
block-force-pushblockenabledPrevent force push to main/master
block-destructive-gitblockenabledBlock reset --hard, checkout -- ., clean -fd, etc.
warn-risky-gitwarnenabledWarn about rebase -i, soft reset, etc.
warn-large-commitswarnenabledWarn about large binary files
python/ - Python Quality
RuleActionDefaultDescription
block-dynamic-codeblockenabledBlock dangerous dynamic code execution
warn-print-statementswarnenabledEncourage logging over print()
security/ - Security Gates
RuleActionDefaultDescription
require-security-reviewblockenabledRequire review for auth code
destructive-command-guardwarnenabledWarn on destructive commands targeting prod-shaped paths
workflow/ - Workflow Enforcement
RuleActionDefaultDescription
enforce-scope-guardwarnenabledAnti-overengineering (imbue)
require-spec-before-codeblockdisabledSpec-first development
performance/ - Resource Management
RuleActionDefaultDescription
warn-large-file-opswarnenabledWatch 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:

  1. Read the rule from skills/rule-catalog/rules/git/block-force-push.md
  2. Write it to .claude/hookify.block-force-push.local.md
  3. 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
  1. Find rule in plugins/hookify/skills/rule-catalog/rules/<category>/<rule>.md
  2. Copy to .claude/hookify.<rule-name>.local.md
  3. Edit enabled: true/false as 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:

  1. Create rule file in appropriate category
  2. Follow naming convention: kebab-case.md
  3. Include detailed message with alternatives
  4. Test thoroughly before submitting
  5. 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.md with enabled: true in 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

Comments

Markdown supported