engremran07/gsmvault/alp-morph-dom-diff
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.
DOM diffing with Alpine morph. Use when: updating DOM efficiently from server HTML, HTMX swap alternatives, preserving Alpine state during DOM updates.
Install
npx vskill@latest install engremran07/gsmvault/alp-morph-dom-diffSKILL.md
The same SKILL.md was published earlier as engremran07/gsmvault/alp-morph-dom-diff.
Alpine Morph — DOM Diffing
When to Use
- Updating a section of the page from server HTML without losing Alpine state
- HTMX
morphswap strategy for seamless partial updates - Re-rendering component HTML while keeping reactive state intact
Patterns
Alpine.morph for Manual DOM Update
HTMX with Morph Swap
Configure HTMX to use morph swap for Alpine-compatible updates:
Morph with Key Preservation
Use id attributes to help morph identify matching elements:
Anti-Patterns
| Pattern | Problem | Fix | |
|---|---|---|---|
innerHTML = to replace Alpine-managed DOM | Destroys reactive state | Use Alpine.morph() | |
Morph without stable id attributes | Morph can't match elements, causes flicker | Add id to key elements | |
| Using morph for tiny updates | Overkill, worse perf than targeted update | Use reactive x-text/x-bind for simple changes |
Red Flags
el.innerHTML = htmlinside an Alpine component — destroys state- HTMX
hx-swap="innerHTML"on Alpine-reactive elements — should usemorph - Alpine.morph called on elements without stable identifiers
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-morph-dom-diff/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
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-morph-dom-diff)