Auto-Trigger Hooks
This skill defines trigger intent between skills. When a skill completes its workflow, a host runtime or agent may read this metadata, record a pending follow-up, and execute the next skill only when that action is supported and safe for the current session.
Hook Definitions
PRD Creation Chain
Implementation Chain
Session Management
Hook Format in Skills
To add auto-trigger capability to a skill, add to its front matter:
Implementation Guide
When a skill completes its workflow:
- Check
hooksin its own front matter (before_start,after_complete,on_error,on_progress) - For each hook:
- If
mode: auto, record or run a low-risk follow-up only when the host runtime supports it - If
mode: background, record a non-blocking follow-up; do not mutate durable files silently - If
mode: ask_first, ask user before triggering - If
condition:exists, check it first
- If
- Pass context to the triggered skill
Example Integration
prd-planner should add
self-improving-agent uses explicit validation and application gates
Its Claude failure hook is installed by the CLI adapter, not declared as
portable skill metadata. The hooks examples in this skill are declarative
intent only unless a host adapter explicitly implements them. Other hosts
should use documented adapters or manual capture.
create-pr should add
Chain Visualization
Error Correction Chain
Important Rules
- Don't create infinite loops - Ensure chains terminate
- Ask before major actions - Use
mode: ask_firstfor PRs, deployments, and durable file changes - Background tasks - Use
mode: backgroundfor non-blocking analysis or proposal artifacts - Pass context - Always include relevant context to triggered skills
