engremran07/gsmvault/alp-reactivity-effect

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.

Alpine.effect for computed dependencies. Use when: auto-tracking reactive dependencies, running side effects that depend on multiple reactive values, replacing manual $watch chains.

Install

npx vskill@latest install engremran07/gsmvault/alp-reactivity-effect

SKILL.md

The same SKILL.md was published earlier as engremran07/gsmvault/alp-reactivity-effect.

Alpine.effect — Auto-Tracked Reactive Effects

When to Use

  • Side effects that depend on multiple reactive values (auto-tracked)
  • Simpler alternative to multiple $watch calls
  • Computed DOM updates that depend on several state properties

Patterns

Basic x-effect for Class Binding
html
<div x-data="{ count: 0, limit: 10 }">
<span x-text="count"></span>
<button @click="count++">+</button>
<p x-effect="$el.classList.toggle('text-red-500', count >= limit)">
<!-- Auto-updates when count or limit changes -->
</p>
</div>
x-effect for Side Effects
html
<div x-data="{ query: '', category: '' }">
<input x-model.debounce.300ms="query" placeholder="Search...">
<select x-model="category">
<option value="">All</option>
<option value="firmware">Firmware</option>
</select>
<template x-effect="
if (query.length >= 2 || category) {
const params = new URLSearchParams({ q: query, cat: category });
htmx.ajax('GET', '/search/fragments/results/?' + params, '#results');
}
"></template>
<div id="results"></div>
</div>
Alpine.effect in Store Init
html
<script>
document.addEventListener('alpine:init', () => {
Alpine.store('theme', {
current: localStorage.getItem('theme') || 'dark',
set(val) { this.current = val; }
});
Alpine.effect(() => {
const theme = Alpine.store('theme').current;
document.documentElement.setAttribute('data-theme', theme);
localStorage.setItem('theme', theme);
});
});
</script>
Effect for Title Update
html
<div x-data="{ page: 'Dashboard' }">
<template x-effect="document.title = page + ' — GSMFWs Admin'"></template>
<button @click="page = 'Users'">Users</button>
<button @click="page = 'Firmwares'">Firmwares</button>
</div>

Anti-Patterns

PatternProblemFix
Mutating tracked state inside effectInfinite re-run loopEffects should be read-only side effects
Heavy DOM manipulation in effectBlocks reactivity cycleBatch updates, use $nextTick
Using x-effect for simple bindingsOverkillUse x-bind or x-text instead

Red Flags

  • x-effect that writes back to its own tracked dependencies
  • Effect running expensive operations without debouncing
  • Using x-effect where x-bind:class or x-text suffices

Quality Gate

powershell
& .\.venv\Scripts\python.exe -m ruff check . --fix
& .\.venv\Scripts\python.exe -m ruff format .
& .\.venv\Scripts\python.exe manage.py check --settings=app.settings_dev

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/engremran07/gsmvault/alp-reactivity-effect/badge)](https://verified-skill.com/skills/engremran07/gsmvault/alp-reactivity-effect)

Something wrong with this skill or its page? Tell us.