Interactive initialization script that generates a compliant lifecycle Hook for an AI Agent or Plugin. Use when you need to automate workflows based on events like PreToolUse or SessionStart.
Resources
2Install
npx skillscat add richfrem/project-sanctuary/create-hook Install via the SkillsCat registry.
SKILL.md
Lifecycle Hook Scaffold Generator
You are tasked with generating a new Hook integration using our deterministic backend scaffolding pipeline.
Execution Steps:
Gather Requirements:
Ask the user for:- The target lifecycle event (e.g.
PreToolUse,SessionStart,SubagentStart). - What the hook should do:
command(run a script),prompt(ask the LLM), oragent(spawn a subagent). - Where the
hooks.jsonfile should be appended.
- The target lifecycle event (e.g.
Scaffold the Hook:
You must execute the hidden deterministicscaffold.pyscript.Run the following bash command:
python3 ~~agent-scaffolders-root/scripts/scaffold.py --type hook --name hook-stub --path <destination-directory> --event <lifecycle-event> --action <command|prompt|agent>Confirmation:
Print a success message showing the configured hook sequence.
Next Actions
- Offer to run
audit-pluginto validate the generated artifacts.