hooks-patterns

Pass

Audited by Gen Agent Trust Hub on Oct 3, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill describes a potential attack surface by documenting how hooks ingest untrusted user input via the $ARGUMENTS placeholder and sys.stdin in script examples.
  • Ingestion points: Hook configurations in SKILL.md use the $ARGUMENTS placeholder to pass event data to scripts or LLM prompts.
  • Boundary markers: Documentation suggests using delimiters (e.g., <USER_ARGUMENTS>) to wrap external content.
  • Capability inventory: Documented hooks can trigger shell command execution (type: command) or further LLM processing (type: prompt).
  • Sanitization: Examples demonstrate best practices for sanitization, such as using Python's re module to block sensitive keywords (e.g., 'password', 'secret') or check for command anti-patterns.
  • [COMMAND_EXECUTION]: The skill provides numerous examples of hook configurations that execute local shell scripts (e.g., format.sh, security-check.sh, run-linter.sh) and CLI tools like prettier. These are presented as educational templates for developers to implement deterministic logic within the hooks system.
  • [DYNAMIC_EXECUTION]: The documentation covers the 'two-layer pattern' for conditional skill invocation, which uses a hook script to dynamically decide whether to activate a secondary skill based on prompt clarity. This is a documented architectural pattern for optimizing performance in the target environment.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 3, 2026, 10:27 AM