One-click install
npx skills add https://github.com/scooter-lacroix/Maestro --skill hooks-scooter-lacroix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hooks
Source: https://github.com/scooter-lacroix/Maestro/tree/main/maestro/skills/hooks
Command: npx skills add https://github.com/scooter-lacroix/Maestro --skill hooks-scooter-lacroix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill allows developers to intercept and modify AI agent behavior at critical points in the execution lifecycle, enabling fine-grained control and custom logic integration.

Core Features & Use Cases

  • Event Interception: Trigger custom logic before or after specific agent actions like tool use or prompt submission.
  • Behavior Modification: Programmatically block or alter agent actions based on custom rules.
  • Use Case: Implement a pre-execution check to ensure all code generated by an agent adheres to specific coding standards before it's committed.

Quick Start

Add a new hook to the 'SessionStart' event by running the command echo '{"type": "resume"}' | .maestro/hooks/session-start-continuity.sh.

Frequently Asked Questions about hooks

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

FAQPage Schema
How do I intercept AI agent behavior before tool use?

You intercept AI agent behavior before tool use by developing custom logic hooks for the PreToolUse lifecycle event, registering them via shell wrappers and TypeScript handlers in .maestro/settings.json.

What lifecycle events can I trigger custom logic on for AI orchestration?

Custom logic hooks can trigger on six lifecycle events: PreToolUse, PostToolUse, UserPromptSubmit, PreCompact, SessionStart, and Stop to intercept and modify AI agent actions.

Can I programmatically block or alter AI agent actions based on custom rules?

Yes, you can programmatically block or alter AI agent actions by defining custom rules within your TypeScript handlers to modify behavior during intercepted lifecycle events.

How do I register custom hooks for event interception?

You register custom hooks by defining your logic in TypeScript handlers, creating shell wrappers, and configuring the event registration within the .maestro/settings.json file.

Do I need TypeScript to define custom logic for AI agent lifecycle events?

Yes, TypeScript handlers are required for defining custom logic, along with shell wrappers, to properly intercept and modify AI agent behavior during lifecycle events.