Hook Prompt Has Field
Hook configuration must contain at least one "prompt" key with a non-empty string value. The check scans for "prompt": "..." anywhere in the config file.
Antipatterns
- Missing prompt field. Defining
"type": "prompt"without a"prompt"key. - Empty prompt string. Setting
"prompt": ""— the regex requires at least one character. - Prompt in wrong location. A
"prompt"key outside the hooks block satisfies this check but may not function as a hook.
Pass / Fail
Pass
{ "type": "prompt", "prompt": "Check for security issues" }
Fail
{ "type": "prompt" }
Limitations
Checks for any "prompt": "..." pattern in the file. Does not verify the field is inside a hook handler or that the handler's type is "prompt" or "agent". Agent-specific rules supersede with additional context.
