hooks-only

Run configured shell commands after session.post_create events using hook metadata.

182|8|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/compozy/agh --skill hooks-only
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hooks-only
Source: https://github.com/compozy/agh/tree/main/internal/skills/testdata/loader/hooks-only
Command: npx skills add https://github.com/compozy/agh --skill hooks-only

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill makes it easy to attach lifecycle automation to session creation, so new sessions can be initialized consistently without manual steps.

Core Features & Use Cases

  • Hook on session.post_create: Runs a command automatically right after a session is created.
  • Configurable environment and timeouts: Sets hook-specific environment variables and enforces an execution timeout.
  • Use Case: Ensure every newly created session announces readiness (for example, to coordinate downstream tools) as soon as it exists.

Quick Start

Add and activate the hooks-only skill so that every new session runs the configured post-create shell command with the provided timeout and environment variable.

Frequently Asked Questions about hooks-only

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

FAQPage Schema
How do I automate shell commands to run automatically when a new session is created?

You can automate session initialization by configuring a lifecycle hook that triggers a shell command after the session.post_create event. This ensures deterministic session bootstrapping without manual steps.

What is a session lifecycle hook and when do I need event-driven automation for session bootstrapping?

A session lifecycle hook is an event-driven automation mechanism that executes a configured shell command when a specific lifecycle event occurs. You need it for deterministic session bootstrapping and readiness signaling across new sessions.

Can I set custom environment variables and timeouts for a post_create session hook?

Yes, session lifecycle hooks support configurable environment variables and execution timeouts. You define these settings using YAML frontmatter metadata so the daemon can register and execute the hook reliably.

Does configuring session lifecycle hooks require any specific metadata format?

Yes, session lifecycle hooks require YAML frontmatter-based hook metadata. This metadata must include the event, command, args, timeout, and environment variables so the daemon can reliably register and execute the hook.

What is the best way to ensure every newly created session announces readiness to downstream tools?

The best way to ensure readiness signaling is attaching an event-driven lifecycle hook to the session.post_create event. This automatically runs a configured shell command to coordinate downstream tools as soon as the session exists.