Agent skill
lifecycle-hooks
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)
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/lifecycle-hooks-sequenzia-agent-alchemy-4
SKILL.md
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__/,.agents/sessions/exploration-cache/, or.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
references/can be executed directly if the harness supports shell-based hooks.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?