Escritura de Reglas Hookify

Write hookify rule files with YAML frontmatter, regex patterns, and event-based triggers.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/juanjo-zurich/juarvis-v4 --skill escritura-de-reglas-hookify-juanjo-zurich
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Escritura de Reglas Hookify
Source: https://github.com/juanjo-zurich/juarvis-v4/tree/main/plugins/config/skills/writing-rules
Command: npx skills add https://github.com/juanjo-zurich/juarvis-v4 --skill escritura-de-reglas-hookify-juanjo-zurich

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing hookify rules requires knowing the exact frontmatter schema, event types, condition operators, and regex escaping conventions; this Skill provides the complete syntax reference so rules are valid and trigger correctly on the first attempt. ## Core Features & Use Cases - Rule File Format: Defines the markdown-plus-YAML-frontmatter structure for rules stored as .juarvis/hookify.{name}.local.md, including required fields (name, enabled, event) and optional action (warn/block). - Simple and Advanced Patterns: Supports single regex patterns for simple rules and multi-condition blocks with fields (command, file_path, new_text) and operators (regex_match, contains, equals, not_contains, starts_with, ends_with) for complex rules. - Event Guidance and Regex Tips: Covers bash, file, stop, prompt, and all event types with common pattern examples (dangerous commands, console.log, .env edits) plus YAML escaping pitfalls. - Use Case: When you want the agent to warn before running rm -rf or block edits adding API keys to .env files, use this Skill to author a correctly structured hookify rule. ## Quick Start Create a hookify rule that warns me whenever a bash command uses sudo or rm -rf.

Frequently Asked Questions about Escritura de Reglas Hookify

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a hookify rule file?▼

Create a markdown file named .juarvis/hookify.{rule-name}.local.md with YAML frontmatter containing name, enabled, event, and a regex pattern. The markdown body after the frontmatter is the message shown to the agent when the rule triggers.

What event types do hookify rules support?▼

Hookify rules support five event types: bash for shell commands, file for Edit/Write/MultiEdit operations, stop for completion checks, prompt for user input, and all to match every event. The event field is required in the frontmatter.

How do I write a hookify rule with multiple conditions?▼

Use the advanced format with a conditions list in the frontmatter, where each condition specifies a field (command, file_path, new_text, old_text, content), an operator (regex_match, contains, equals, not_contains, starts_with, ends_with), and a pattern. All conditions must match for the rule to trigger.

What is the difference between warn and block actions in hookify?▼

The warn action shows the message but allows the operation to proceed, and it is the default when no action is specified. The block action prevents the operation or stops the session entirely.

Why does my hookify regex pattern not match?▼

Common causes are YAML escaping issues and overly broad or narrow patterns. Use unquoted patterns in YAML so backslashes like \s work literally, escape special characters like parentheses, and test patterns with a regex tool before deploying.