Cargador de Configuración Hookify

Parses YAML frontmatter from hookify rule files into evaluable Rule objects.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/juanjo-zurich/juarvis-v4 --skill cargador-de-configuraci-n-hookify-juanjo-zurich
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Cargador de Configuración Hookify
Source: https://github.com/juanjo-zurich/juarvis-v4/tree/main/plugins/config/skills/config-loader
Command: npx skills add https://github.com/juanjo-zurich/juarvis-v4 --skill cargador-de-configuraci-n-hookify-juanjo-zurich

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Understanding how Juarvis loads and parses hookify rule files (.juarvis/hookify.*.local.md) is difficult without a technical reference, making it hard to debug why rules are not triggering or are parsed incorrectly. ## Core Features & Use Cases - Frontmatter Extraction: Explains how extract_frontmatter() splits rule files into YAML frontmatter and markdown message body. - Rule Data Structures: Documents the Condition and Rule dataclasses, including fields, operators, events, and actions (warn/block). - Legacy Pattern Conversion: Describes how a simple pattern field is automatically converted into a Condition with regex_match based on the event type. - Use Case: A user writes a hookify rule that never triggers; this reference helps them verify the frontmatter structure, event field, and condition syntax the loader expects. ## Quick Start Ask the AI to explain how the hookify config loader parses a .local.md rule file and why a specific rule is not being loaded.

Frequently Asked Questions about Cargador de Configuración Hookify

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

FAQPage Schema
How do I write a hookify rule file that the loader will parse correctly?▼

Create a .juarvis/hookify.*.local.md file starting with --- frontmatter containing name, enabled, event, and either pattern or conditions, followed by a second --- and the markdown message body. The loader converts a simple pattern into a regex_match Condition automatically.

How does the config loader convert a simple pattern into conditions?▼

When only a pattern field exists without conditions, the loader creates one Condition with operator regex_match. The field is command for bash events, new_text for file events, and content for other events.

What fields and operators does a hookify Condition support?▼

A Condition has field (command, new_text, old_text, file_path), operator (regex_match, contains, equals, and others), and pattern. Multiple conditions can be listed under the conditions key in the YAML frontmatter.

Why is my hookify rule not being loaded or evaluated?▼

Common causes are missing frontmatter markers, malformed YAML, encoding errors, or enabled set to false. The loader logs a warning and skips the file on I/O, parsing, or encoding errors instead of crashing.

Can I filter loaded rules by event type?▼

Yes, load_rules accepts an optional event parameter such as bash or file. It returns only enabled rules matching that event, or all enabled rules when no event is specified.