Skip to content
Back to skills

Lifecycle Hooks

ASecurity

Behavioral rules and lifecycle event handlers for the core-tools package. Defines automated behaviors that trigger at specific points in the agent workflow. (converted from hooks)

  • 43 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 29, 2026
ai-agentsshellbash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 29, 2026

npx -y skills add sequenzia/agent-alchemy --skill lifecycle-hooks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lifecycle Hooks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lifecycle Hooks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sequenzia-lifecycle-hooks/badge)](https://www.skillsdirectory.com/skills/sequenzia-lifecycle-hooks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: lifecycle-hooks
description: Behavioral rules and lifecycle event handlers for the core-tools package. Defines automated behaviors that trigger at specific points in the agent workflow. (converted from hooks)
dependencies: []
---

# Lifecycle Hooks

This skill defines behavioral rules that were originally enforced by platform lifecycle hooks. These rules describe automated behaviors that trigger at specific points in the agent workflow.

---

## On before_action

**Trigger:** Fires before the agent executes any action (file write, shell command, etc.)
**Applies when:** Action matches `Write|Edit|Bash`

This rule auto-approves file operations targeting deep-analysis session and cache directories. It prevents permission prompts from interrupting autonomous exploration workflows.

The implementation logic is in **references/auto-approve-da-session.sh**. This script:
- Reads action context from stdin (JSON with action type and parameters)
- Checks if the target file path or command references session directories (`.agents/sessions/__da_live__/`, `.agents/sessions/exploration-cache/`, `.agents/sessions/da-*/`)
- If matched, approves the action automatically
- If not matched, passes through to normal permission flow (no opinion)

## Integration Notes

**What this component does:** Defines automated behavioral rules that were originally enforced by platform lifecycle hooks.

**Origin:** Converted from 1 lifecycle hook (PreToolUse/before_action)

**Capabilities needed:**
- Event/lifecycle hook system (if the target harness supports one)
- Alternatively, implement as middleware, conditional checks, or manual review steps

**Adaptation guidance:**
- This behavior was originally enforced automatically by the platform. In the target harness, it may need to be implemented as middleware, event handlers, or manual review steps.
- The command hook script in `references/` can be executed directly if the harness supports shell-based hooks.
- The auto-approval targets session file operations to enable uninterrupted deep analysis workflows.

Files in this skill

  • SKILL.md2 KB
  • references/auto-approve-da-session.sh2.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.