asset-hash-busting
OfficialHoist asset() usage to prevent sprite fetches.
Authordecocms
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Calls to asset() inside render functions recompute URLs for icons, leading to repeated network requests and wasted bandwidth.
Core Features & Use Cases
- Hoist asset() results to module scope to reuse a single URL across renders.
- Applies to frontend component libraries with frequent icon/SVG usage to reduce bandwidth.
- Provides guidance to identify asset() calls that do not depend on props and can be moved outside render logic.
Quick Start
Move any asset('/sprites.svg') call outside the component body to a module-level constant and reuse that constant in your SVG use href.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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: asset-hash-busting Download link: https://github.com/decocms/storefront-skills/archive/main.zip#asset-hash-busting 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 510,000+ vetted skills library on demand.