sw-updater

Analyze git changes to synchronize service-worker.js cache definitions.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/LucasPier/cuentos-interactivos --skill sw-updater
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sw-updater
Source: https://github.com/LucasPier/cuentos-interactivos/tree/main/.agents/skills/sw-updater
Command: npx skills add https://github.com/LucasPier/cuentos-interactivos --skill sw-updater

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides an automated analyzer to keep service-worker.js aligned with the project's actual files by inspecting git status and diffs, and guiding cache version bumps.

Core Features & Use Cases

  • Automates service worker synchronization by comparing local changes to the main branch and identifying affected caches.
  • Generates a decision guide and prompts for updating CACHE_* versions and orphaned entries.
  • Supports manual and git-driven workflows, including offline and CI-like scenarios where you want deterministic planning of SW updates.

Quick Start

Execute the analyzer with python .agents/skills/sw-updater/scripts/analizar-sw.py to generate a report and propose updates to the service worker.

Frequently Asked Questions about sw-updater

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate service worker cache version updates when project files change?▼

Automate service worker cache updates by analyzing git diffs between your current branch and main to identify affected files. The analyzer reads service-worker.js, parses CACHE_* definitions, and outputs recommendations for bumping cache versions and removing orphaned entries.

How does service worker synchronization work with unstaged and staged git changes?▼

Service worker synchronization works by comparing unstaged, staged, or committed changes against the main branch. It parses VERSION_APP and CACHE_* definitions in service-worker.js to detect which cached assets were modified and generates a decision guide for updates.

Do I need Python to analyze and update my service worker cache files?▼

Yes, you need Python installed to execute the analyzer script. It reads your service-worker.js file, inspects git status and diffs, and generates a report proposing cache version bumps and flagging orphaned cache entries.

Can I manually analyze specific files for service worker updates instead of using git?▼

Yes, the analyzer supports both manual file analysis and full git-based scans. You can run a manual workflow to inspect specific files or use git-driven workflows to compare local changes against the main branch for deterministic planning.

What is the best way to find orphaned entries in a service worker cache?▼

The best way to find orphaned entries is to run a git-based scan that compares your current project files against the assets defined in service-worker.js. The analyzer outputs recommendations identifying orphaned entries and suggesting cache version bumps.

Does the service worker analyzer work in CI environments without a full git history?▼

Yes, the analyzer supports CI-like scenarios and offline workflows where deterministic planning of service worker updates is needed. It compares local changes against the main branch and generates a report for cache bumps and orphaned entries.