engremran07/gsmvault/alp-store-computed

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.

Computed properties in Alpine stores. Use when: deriving values from store state, creating getters, calculating totals or filtered counts from store data.

Install

npx vskill@latest install engremran07/gsmvault/alp-store-computed

SKILL.md

The same SKILL.md was published earlier as engremran07/gsmvault/alp-store-computed.

Alpine Store Computed Properties

When to Use

  • Deriving display values from store state (e.g., badge counts, formatted strings)
  • Creating getter-like properties that recalculate when dependencies change
  • Filtering or aggregating store data for UI display

Patterns

Getter-Style Computed Property
html
<script>
document.addEventListener('alpine:init', () => {
Alpine.store('cart', {
items: [],
get total() {
return this.items.reduce((sum, item) => sum + item.price * item.qty, 0);
},
get count() {
return this.items.reduce((sum, item) => sum + item.qty, 0);
},
get isEmpty() {
return this.items.length === 0;
}
});
});
</script>
Using Computed in Templates
html
<div x-data>
<span x-text="$store.cart.count" x-cloak></span>
<span x-show="!$store.cart.isEmpty" x-cloak
x-text="'$' + $store.cart.total.toFixed(2)">
</span>
</div>
Notification Store with Computed Filters
html
<script>
document.addEventListener('alpine:init', () => {
Alpine.store('notifications', {
items: [],
get unread() { return this.items.filter(n => !n.read); },
get unreadCount() { return this.unread.length; },
get hasUnread() { return this.unreadCount > 0; },
markRead(id) {
const item = this.items.find(n => n.id === id);
if (item) item.read = true;
}
});
});
</script>
<span x-data x-show="$store.notifications.hasUnread" x-cloak
class="bg-red-500 text-white rounded-full px-2 text-xs"
x-text="$store.notifications.unreadCount">
</span>

Anti-Patterns

PatternProblemFix
Heavy computation inside getterRuns on every accessCache result, recalculate on mutation
Side effects inside gettersUnpredictable re-runsMove side effects to actions
Deeply nested reactive objects in gettersProxy overheadKeep store data flat

Red Flags

  • Getter that modifies state (should be read-only)
  • Complex nested object traversal in a getter accessed on every render
  • Missing x-cloak on elements displaying computed values

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, 95 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-store-computed/badge)](https://verified-skill.com/skills/engremran07/gsmvault/alp-store-computed)

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