kjuhwa/skills-hub/agent-lifecycle-hooks
Claude Code and agent skill by kjuhwa/skills-hub
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Attach RunHooks and AgentHooks to observe and react to agent lifecycle events.
Install
npx vskill@latest install kjuhwa/skills-hub/agent-lifecycle-hooksSKILL.md
The same SKILL.md was published earlier as kjuhwa/skills-hub/agent-lifecycle-hooks.
agent-lifecycle-hooks
Implement RunHooks (run-level) or AgentHooks (agent-level) to observe agent start/end, LLM calls, tool calls, and handoffs. Pass hooks to Runner.run(hooks=...) or Agent(hooks=...).
When to apply
Logging, usage tracking, debugging, or triggering side effects (e.g., saving state) at each lifecycle step. Alternative to custom tracing processors for lightweight observation.
Core snippet
Key notes
RunHooksapplies to the entire run;AgentHooksscopes to a single agenton_tool_start/endonly fires for local function tools, not hosted toolscontext.usagetracks cumulative token usage across the runcontext.turn_inputinon_agent_startgives the agent's current input
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/agents/agent-lifecycle-hooks/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kjuhwa/skills-hub/agent-lifecycle-hooks)