# Hook Lifecycle Execution

> Load and execute YAML-defined lifecycle hooks with optional conditions and controlled timeouts.

- Skill: `shyamsridhar123/hook-lifecycle-execution` (Agent Skill)
- Install (CLI): `npx skillmds@latest add shyamsridhar123/hook-lifecycle-execution`
- Raw SKILL.md: https://api.skillmd.com/api/skills/shyamsridhar123/hook-lifecycle-execution/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: shyamsridhar123 (https://skillmd.com/u/shyamsridhar123)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/shyamsridhar123/hook-lifecycle-execution

---


# Hook Lifecycle Execution

Load and execute YAML-defined lifecycle hooks with optional conditions and controlled timeouts.

## When to Use

Use this skill when:

- Working with code in `src/hooks/index.ts/`
- User mentions "hooks"
- User mentions "pre-commit"
- User mentions "post-generate"
- User mentions "condition"
- User mentions "timeout"

## Patterns

- event-scoped hook discovery under .github/hooks
- execSync command execution with timeout
- file/command condition evaluation
- verbose output and early failure stop
- per-hook success/error aggregation

## Examples

```
const runner = new HookRunner(rootPath, verbose); await runner.execute('post-generate');
```

## Category

**reliability** - Error handling, recovery, and fault tolerance

