lifecycle-hooks
CommunityEffortlessly manage resource lifecycle with injectable post-construct and pre-destruct hooks.
Software Engineering#database migration#dependency injection#Rust#lifecycle management#resource cleanup
Authorjymchng
Version1.0.0
Installs0
System Documentation
What problem does it solve?
The lifecycle-hooks Skill simplifies resource management by adding lifecycle hooks to injectable types, enabling seamless initialization and cleanup processes.
Core Features & Use Cases
- Post-Construct Hooks: Execute initialization tasks such as database migrations or connection warm-up after object construction.
- Pre-Destruct Hooks: Clean up resources like closing database connections or flushing buffers before shutdown.
- Use Case: Use lifecycle hooks in a database connection setup where you want to perform schema migrations upon object creation and close the pool gracefully before the program exits.
Quick Start
To use lifecycle hooks, first create a database instance and apply post-construct and pre-destruct hooks for schema migration and connection cleanup.
Dependency Matrix
Required Modules
None requiredComponents
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: lifecycle-hooks Download link: https://github.com/jymchng/injectable/archive/main.zip#lifecycle-hooks Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.