Skip to content
Back to skills

Create Hook

ASecurity

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.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 6, 2026
toolspythonbashbackend

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add richfrem/Project_Sanctuary --skill create-hook --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Hook?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Create Hook
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-create-hook/badge)](https://www.skillsdirectory.com/skills/richfrem-create-hook)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: create-hook
description: 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.
disable-model-invocation: false
allowed-tools: Bash, Read, Write
---

# Lifecycle Hook Scaffold Generator

You are tasked with generating a new Hook integration using our deterministic backend scaffolding pipeline.

## Execution Steps:

1. **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), or `agent` (spawn a subagent).
   - Where the `hooks.json` file should be appended.

2. **Scaffold the Hook:**
   You must execute the hidden deterministic `scaffold.py` script.
   
   Run the following bash command:
   ```bash
   python3 ~~agent-scaffolders-root/scripts/scaffold.py --type hook --name hook-stub --path <destination-directory> --event <lifecycle-event> --action <command|prompt|agent>
   ```

3. **Confirmation:**
   Print a success message showing the configured hook sequence.


## Next Actions
- Offer to run `audit-plugin` to validate the generated artifacts.

Files in this skill

  • SKILL.md1.2 KB
  • evals/evals.json1.5 KB
  • references/fallback-tree.md1.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.