OpenParable
Skip to content
← Back to skills

08 Hook Generate

Agent Building
08-hook-generate

08 Hook Generate is an Agent Skill for agent building published in the ai-driven-dev/framework repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Generate a hook, a handler that runs at a lifecycle event, across the host AI tools. Use when the user wants to create, scaffold, or refactor a hook, or automate an action at a lifecycle point. Not for other artifacts like skills or rules.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/ai-driven-dev/framework/blob/HEAD/plugins/aidd-context/skills/08-hook-generate/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/08-hook-generate, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Hook Generate

Builds one hook: an entry merged into the chosen scope for each supported tool, plus the backing script.

Actions

#ActionRoleInput
01capture-hookClarify the moment, action, matcher, scope, toolsuser request
02write-hookMerge the entry per tool, write the scriptthe captured spec
03validateCheck the file, the merge, and the moment fitfiles written

Run the actions in order, 01 → 03, and run each action's ## Test before the next. Before running an action, read its file in actions/, not only the table or assets.

References

  • references/hook-authoring.md: the contract (R1-R7), the lifecycle moments, and the handler, matcher, and exit-code model.
  • references/tool-paths.md: per-tool support, moment-to-event names, file formats, scopes, and write targets.

Assets

  • assets/hook-template.json: the entry scaffold.
  • assets/hook-script-template.sh: the backing-script scaffold.