$npx -y skills add Weaverse/shopify-hydrogen-skills --skill theme-updateSafely update a Weaverse Pilot theme to the latest version — detects current version, fetches release diffs, plans changes category-by-category, preserves customizations, verifies build.
| 1 | # Theme Update — Weaverse Pilot |
| 2 | |
| 3 | Safely upgrade a Weaverse Pilot theme from its current version to a newer release. This skill walks through detection, planning, execution, and verification — never overwriting user customizations without explicit approval. |
| 4 | |
| 5 | ## Source |
| 6 | |
| 7 | - Theme repo: https://github.com/Weaverse/pilot |
| 8 | - Releases: https://github.com/Weaverse/pilot/releases |
| 9 | - Package name: `@weaverse/pilot` |
| 10 | - Versioning: `YYYY.M.D` (e.g., `2026.4.7`). Older: semver (`v8.1.0`) |
| 11 | |
| 12 | ## Quick Check |
| 13 | |
| 14 | ```bash |
| 15 | node skills/theme-update/scripts/check_pilot_updates.mjs |
| 16 | node skills/theme-update/scripts/check_pilot_updates.mjs --target v2026.4.7 |
| 17 | ``` |
| 18 | |
| 19 | --- |
| 20 | |
| 21 | ## Procedure |
| 22 | |
| 23 | Follow these phases in order. Do NOT skip steps. |
| 24 | |
| 25 | ### Phase 1 — Detection |
| 26 | |
| 27 | 1. Read `package.json` → get `version` field |
| 28 | 2. If `name` is not `@weaverse/pilot`, ask the user to confirm this is a Pilot-based project |
| 29 | 3. Fetch releases: |
| 30 | |
| 31 | ```bash |
| 32 | curl -s "https://api.github.com/repos/Weaverse/pilot/releases?per_page=50" |
| 33 | ``` |
| 34 | |
| 35 | 4. Identify all releases between current version and latest (or user-specified target) |
| 36 | 5. Present to user: |
| 37 | - Current version |
| 38 | - Target version (latest unless specified) |
| 39 | - Number of intermediate releases |
| 40 | - Summary of key changes (features, fixes, breaking changes) |
| 41 | |
| 42 | **If already on latest → stop here and tell the user.** |
| 43 | |
| 44 | ### Phase 2 — Branch |
| 45 | |
| 46 | ```bash |
| 47 | git checkout -b update/v{CURRENT}-to-v{TARGET} |
| 48 | git push -u origin update/v{CURRENT}-to-v{TARGET} |
| 49 | ``` |
| 50 | |
| 51 | Always work on a branch. Never update on main directly. |
| 52 | |
| 53 | ### Phase 3 — Plan |
| 54 | |
| 55 | For each release in the update range (oldest to newest): |
| 56 | |
| 57 | 1. **Fetch the diff** between consecutive versions: |
| 58 | |
| 59 | ```bash |
| 60 | # Full comparison URL |
| 61 | https://api.github.com/repos/Weaverse/pilot/compare/v{OLD}...v{NEW} |
| 62 | |
| 63 | # Raw diff |
| 64 | https://github.com/Weaverse/pilot/compare/v{OLD}...v{NEW}.diff |
| 65 | ``` |
| 66 | |
| 67 | 2. **Download the target version's source** (for reference files): |
| 68 | |
| 69 | ```bash |
| 70 | curl -sL "https://api.github.com/repos/Weaverse/pilot/tarball/v{TARGET}" | tar xz |
| 71 | ``` |
| 72 | |
| 73 | 3. **Categorize every changed file** into three buckets: |
| 74 | |
| 75 | #### Auto-merge (safe to apply without asking) |
| 76 | - `package.json` version bump, dependencies |
| 77 | - Lock files (`package-lock.json`, `bun.lockb`, `pnpm-lock.yaml`) |
| 78 | - `tsconfig.json`, `vite.config.ts`, `tailwind.config.ts` — ONLY if user hasn't customized them |
| 79 | - New files that don't exist in user's project (additive only) |
| 80 | - `.github/`, `CHANGELOG.md`, `LICENSE` |
| 81 | |
| 82 | #### Needs review (show diff, get approval) |
| 83 | - `app/components/` — UI components user may have customized |
| 84 | - `app/routes/` — route files user may have modified |
| 85 | - `app/lib/` — utility modules |
| 86 | - `app/root.tsx`, `app/entry.client.tsx`, `app/entry.server.tsx` |
| 87 | - `app/styles/` — CSS/Tailwind changes |
| 88 | - Any file where the user has local changes (`git diff` shows modifications from Pilot base) |
| 89 | |
| 90 | #### Skip (mention but don't touch) |
| 91 | - Files the user deleted (they removed the feature intentionally) |
| 92 | - Files in directories the user reorganized |
| 93 | - `.env`, `.env.example` — never overwrite environment files |
| 94 | |
| 95 | 4. **Present the plan** in a clear table: |
| 96 | |
| 97 | ``` |
| 98 | ## Update Plan: v2026.3.23 → v2026.4.7 |
| 99 | |
| 100 | ### Auto-merge (3 files) |
| 101 | ✅ package.json — version + dependency bumps |
| 102 | ✅ bun.lockb — lock file update |
| 103 | ✅ app/lib/utils.ts — new helper function added |
| 104 | |
| 105 | ### Needs Review (5 files) |
| 106 | ⚠️ app/components/Header.tsx — Pilot added shopify-account web component |
| 107 | Your version: custom mega menu logic |
| 108 | Pilot change: replaced AccountButton with <shopify-account> |
| 109 | → Recommend: keep your mega menu, add shopify-account separately |
| 110 | |
| 111 | ⚠️ app/routes/_index.tsx — performance improvements |
| 112 | Your version: added custom hero section |
| 113 | Pilot change: caching + skeleton loading |
| 114 | → Recommend: apply caching, keep your hero |
| 115 | |
| 116 | ### New Files (2 files) |
| 117 | ➕ app/components/ScrollReveal.tsx — new scroll animation component |
| 118 | ➕ app/lib/reviews.ts — extracted reviews API |
| 119 | |
| 120 | ### Skipped (1 file) |
| 121 | ⏭️ app/components/CombinedListings.tsx — you deleted this file |
| 122 | ``` |
| 123 | |
| 124 | **Wait for user confirmation before proceeding.** Ask: |
| 125 | > "Review the plan above. Approve to continue, or tell me which files to handle differently." |
| 126 | |
| 127 | ### Phase 4 — Execute |
| 128 | |
| 129 | Apply changes in order, one release at a time if multi-version jump: |
| 130 | |
| 131 | #### 4a. Auto-merge files |
| 132 | |
| 133 | ```bash |
| 134 | # Copy new file from Pilot source |
| 135 | cp /tmp/pilot-reference/{FILE_PATH} {FILE_PATH} |
| 136 | |
| 137 | # Or apply targeted patch |
| 138 | git apply --3way <patch-file> |
| 139 | ``` |
| 140 | |
| 141 | After each auto-merge, verify with `git diff --stat`. |
| 142 | |
| 143 | #### 4b. Needs-review files |
| 144 | |
| 145 | For each file: |
| 146 | |
| 147 | 1. Show a **three-way comparison**: |
| 148 | - Pilot at user's version (baseline) |
| 149 | - Pilot at target version (their changes) |
| 150 | - User's current file (local modifications) |
| 151 | |
| 152 | 2. Identify what the user changed vs what Pilot changed: |
| 153 | - User-only changes → preserve |
| 154 | - Pilot-only changes → apply |
| 155 | - Overlapping changes → flag conflict |
| 156 | |
| 157 | 3. |