invalid-hook

Validate hook loaders by registering hooks with invalid event names.

182|8|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/compozy/agh --skill invalid-hook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: invalid-hook
Source: https://github.com/compozy/agh/tree/main/internal/skills/testdata/loader/invalid-hook
Command: npx skills add https://github.com/compozy/agh --skill invalid-hook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps detect and prevent misconfigured hook event handlers that could otherwise fail silently or trigger unintended command behavior.

Core Features & Use Cases

  • Hook validation testing: Configures a hook with an invalid event name to verify the loader rejects or flags unsupported hook events.
  • Command/args wiring under test: Ensures the system still parses command and args structure while the event itself is invalid.
  • Use case: During development of the hook loader, you can run this fixture to confirm that only known event patterns are accepted and that invalid events do not register.

Quick Start

Use the invalid-hook Skill unit in your hook loader test suite to verify that a hook with event "foo.bar" is rejected.

Frequently Asked Questions about invalid-hook

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

FAQPage Schema
How do I test that a hook loader rejects invalid event names?

To test hook validation, register a hook with an intentionally invalid event name like "foo.bar" and verify the loader rejects it. This fixture confirms only known event patterns are accepted and invalid events fail fast.

What happens to command and args parsing when a hook event is unsupported?

Command and args parsing continues normally even when the hook event itself is invalid. The runtime parses the command structure while failing fast specifically on unsupported or unknown hook event values.

Why do I need to validate hook event configuration?

Validating hook event configuration prevents misconfigured handlers from failing silently or triggering unintended command behavior. Without validation, unsupported hook events could register and cause unpredictable runtime execution.

Can I use an invalid hook fixture to test command wiring in a skill runtime?

Yes, you can use it in skill or agent runtime testing to verify command execution wiring. The fixture ensures the system parses command and args structure while confirming invalid hook events are rejected.

What is the best way to verify only known hook event patterns are accepted?

The best way is to run a test fixture that registers a hook with an invalid event name. This confirms the loader accepts only known event patterns and rejects unknown values immediately.

When should I not use an invalid hook event for configuration testing?

You should not use it outside of development and testing contexts. It is a fixture designed specifically for validating hook loaders during development, not for production configuration.