engremran07/gsmvault/alp-component-lifecycle
Claude Code and agent skill by engremran07/gsmvault
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Component lifecycle: init(), destroy(). Use when: setting up timers/intervals on mount, cleaning up event listeners, running initialization logic when component appears.
Install
npx vskill@latest install engremran07/gsmvault/alp-component-lifecycleSKILL.md
The same SKILL.md was published earlier as engremran07/gsmvault/alp-component-lifecycle.
Alpine Component Lifecycle
When to Use
- Running setup logic when a component initializes (fetch data, start timers)
- Cleaning up resources when a component is removed from DOM
- Registering/deregistering global event listeners tied to a component's lifetime
Patterns
init() — Runs on Component Mount
destroy() — Cleanup on Removal
Async Init with Fetch
Global Listener with Cleanup
Anti-Patterns
| Pattern | Problem | Fix | |
|---|---|---|---|
setInterval without destroy() cleanup | Memory leak, ghost timers | Always clear in destroy() | |
addEventListener without removeEventListener | Leaked listeners accumulate | Store handler ref, remove in destroy() | |
Heavy sync work in init() | Blocks rendering | Use async init() or $nextTick | |
Using x-init AND init() method together | Double initialization | Pick one — init() method preferred |
Red Flags
setIntervalorsetTimeoutwithout corresponding cleanup indestroy()- Global event listeners added in
init()without removal - Fetch calls in
init()without loading/error states
Quality Gate
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/alp-component-lifecycle/SKILL.md
Popularity
- 7-day trend score
- 5
Refreshed 8 Oct 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/engremran07/gsmvault/alp-component-lifecycle)