hook-integration

Integrate custom skills with Claude Code's 12 hook events.

4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill hook-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-integration
Source: https://github.com/mgd34msu/goodvibes-gemini/tree/main/skills/hook-integration
Command: npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill hook-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to integrating custom skills with Claude Code's 12 hook events, enabling advanced automation and context management within the Gemini CLI.

Core Features & Use Cases

  • Hook Event Understanding: Details on when each of the 12 hook events fires.
  • Pattern Examples: Demonstrates how to build validation, context injection, summarization, and cost-tracking skills using specific hooks.
  • Schema Definitions: Provides clear input and output schemas for hook interactions.
  • Use Case: You are developing a new skill that needs to perform a security check before any tool is used. This skill shows you exactly how to hook into the PreToolUse event and define the expected input and output for your security validation logic.

Quick Start

Use the hook-integration skill to understand how to integrate a skill with the SessionStart hook for context injection.

Frequently Asked Questions about hook-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate custom skills with Claude Code hooks for automation?

Yes, you can enforce security checks before tool usage by hooking custom skills into the PreToolUse event. This allows you to define expected input and output schemas to validate tool actions and execute security validation logic.

What are the available hook events for context management in the Gemini CLI?

The Gemini CLI supports 12 hook events for context management, including SessionStart for context injection and PostSession for summarization. These events allow you to define clear input and output schemas to enrich session context.

How do I inject context into a session using Claude Code hooks?

You inject context into a session by hooking a custom skill into the SessionStart event. This pattern enriches the session with necessary background information at initialization using defined input and output schemas.

Can I perform pre-tool validation using Claude Code hook events?

Yes, you can enforce security checks before tool usage by hooking custom skills into the PreToolUse event. This allows you to define expected input and output schemas to validate tool actions and execute security validation logic.

What is the best way to track costs and summarize sessions with hook integration?

The best way to track costs and summarize sessions is by building custom skills that hook into post-session events. This approach uses detailed input and output schemas to automate post-session summarization and cost tracking.