Agent-alchemy lifecycle-hooks
install
source · Clone the upstream repo
git clone https://github.com/sequenzia/agent-alchemy
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sequenzia/agent-alchemy "$T" && mkdir -p ~/.claude/skills && cp -r "$T/ported/20260310/flat/core-tools/skills/lifecycle-hooks" ~/.claude/skills/sequenzia-agent-alchemy-lifecycle-hooks-6c272d && rm -rf "$T"
manifest:
ported/20260310/flat/core-tools/skills/lifecycle-hooks/SKILL.mdsource content
Lifecycle Hooks
On before_action
Trigger: Fires before the agent executes any action Applies when: Action is a file write, file edit, or shell command
Auto-approve file operations targeting deep-analysis session and cache directories. This allows the deep-analysis workflow to write session files without requiring user approval for each operation.
The implementation logic is in references/auto-approve-da-session.sh. This script:
- Reads action context from stdin as JSON
- Checks if the target path matches
,.agents/sessions/__da_live__/
, or.agents/sessions/exploration-cache/.agents/sessions/da-*/ - For matching paths: approves the operation automatically
- For non-matching paths: passes through to normal permission flow
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)
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 script in
can be executed directly if the harness supports shell-based hooks.references/