HO

hook-factory

Generates automated safety hooks and configuration files to enforce architectural constraints and monitor tool usage.

Install

mkdir -p .claude/skills/hook-factory-fzturk && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16850" && unzip -o skill.zip -d .claude/skills/hook-factory-fzturk && rm skill.zip

Installs to .claude/skills/hook-factory-fzturk

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Generates all safety hooks, enforcement scripts, and hook configuration JSON files for a system based on the plan analysis. Hooks enforce forbidden patterns, audit tool usage, and prevent architectural drift. Use after SYSTEM_MANIFEST.md is complete and all forbidden patterns are identified.
292 charsno explicit “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • →Extract hook rules from plan analysis
  • →Generate main hook configuration JSON
  • →Create `safety-check.sh` script for pre-tool use gates
  • →Generate `audit-log.sh` script for post-tool use auditing
  • →Produce `forbidden-pattern.sh` script for prompt-level scope guarding
  • →Generate `smoke-test-hooks.sh` for testing all hooks

How it works

This skill extracts forbidden patterns from analysis, then generates JSON configuration files and shell scripts for `userPromptSubmitted`, `preToolUse`, and `postToolUse` hooks.

Inputs & outputs

You give it
`analysis/plan_analysis.json`, `SYSTEM_MANIFEST.md`
You get back
`.github/hooks/` directory structure containing hook configurations and scripts

When to use hook-factory

  • →Generating security hooks
  • →Auditing tool usage
  • →Enforcing architectural patterns
  • →Preventing unauthorized file edits

About hook-factory

Analyzes system manifests to build a security enforcement layer. It generates hook scripts and JSON configurations that block forbidden patterns and provide comprehensive audit logs for all agent tool interactions.

>

When not to use it

  • →Before `SYSTEM_MANIFEST.md` is complete
  • →Before all forbidden patterns are identified
  • →When the goal is not to generate safety enforcement layers

Limitations

  • →Requires `plan_analysis.json` and `SYSTEM_MANIFEST.md` as input
  • →Focuses on generating hooks, scripts, and config files
  • →Does not cover the initial identification of forbidden patterns

How it compares

This factory approach automatically generates a complete set of security hooks and scripts based on identified forbidden patterns, providing a structured enforcement layer unlike manual script creation.

Compared to similar skills

hook-factory side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
hook-factory (this skill)06moReviewAdvanced
openspec-onboard109moReviewBeginner
windows-ui-automation1712moReviewAdvanced
workflow-orchestration-patterns106moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry