$npx -y skills add bitjaru/styleseed --skill ss-updateUpdate StyleSeed engine in your project — analyzes what's outdated and updates safely
| 1 | # StyleSeed Update Assistant |
| 2 | |
| 3 | ## When NOT to use |
| 4 | |
| 5 | - For first-time setup → use `/ss-setup` |
| 6 | - For just one new component or skin — copy that file manually |
| 7 | - For projects that have heavily diverged from upstream — manual diff review first |
| 8 | - Updating the engine is separate from re-designing your UI. Steps 1–5 update engine files only; |
| 9 | if you want an old generic build re-done to the new standard, that's **Step 6 (Retrofit)**. |
| 10 | |
| 11 | Automatically detect and update StyleSeed files in the current project. |
| 12 | |
| 13 | ## Reassure the user first |
| 14 | |
| 15 | Updating is **safe and reversible**. Updates are additive — new rules, |
| 16 | components, skins, and skills get added; your `theme.css`, your components, and |
| 17 | your app code are never overwritten, and design rules only ever get added (never |
| 18 | changed in a breaking way). A big version jump looks like a lot changed, but |
| 19 | it's almost all additions. **Do NOT warn the user that the build will break** |
| 20 | unless you actually find a changed component/import API. Tell them: commit first, |
| 21 | copy the new rules + skills, run a build, and `git reset --hard` if anything is |
| 22 | off — they can't permanently break their project. |
| 23 | |
| 24 | ## Instructions |
| 25 | |
| 26 | ### Step 1: Detect Current Setup |
| 27 | |
| 28 | Scan the project to find where StyleSeed files are: |
| 29 | |
| 30 | ```bash |
| 31 | # Find DESIGN-LANGUAGE.md |
| 32 | find . -name "DESIGN-LANGUAGE.md" -not -path "*/node_modules/*" |
| 33 | |
| 34 | # Find CLAUDE.md |
| 35 | find . -name "CLAUDE.md" -not -path "*/node_modules/*" |
| 36 | |
| 37 | # Find skills (ss-* is current; ui-*/ux-* are legacy names to migrate from) |
| 38 | find . -path "*/.claude/skills/ss-*" -o -path "*/.claude/skills/ui-*" -o -path "*/.claude/skills/ux-*" | head -20 |
| 39 | |
| 40 | # Find theme.css |
| 41 | find . -name "theme.css" -not -path "*/node_modules/*" |
| 42 | |
| 43 | # Find .cursorrules |
| 44 | find . -name ".cursorrules" |
| 45 | ``` |
| 46 | |
| 47 | Report what was found and where. |
| 48 | |
| 49 | ### Step 2: Check StyleSeed Version |
| 50 | |
| 51 | **Fast check first** — compare the local version to the published one without cloning: |
| 52 | ```bash |
| 53 | # local marker (may be absent on older installs) |
| 54 | cat engine/VERSION 2>/dev/null || cat VERSION 2>/dev/null || echo "unknown" |
| 55 | # latest published version + what's new |
| 56 | curl -s https://styleseed-demo.vercel.app/version.json |
| 57 | ``` |
| 58 | If the local version already matches `version.json`'s `version`, tell the user they're |
| 59 | up to date and stop. Otherwise report `whatsNew` and continue. |
| 60 | |
| 61 | Then clone/pull to actually diff the files: |
| 62 | ```bash |
| 63 | if [ -d "/tmp/styleseed" ]; then |
| 64 | cd /tmp/styleseed && git pull |
| 65 | else |
| 66 | git clone https://github.com/bitjaru/styleseed.git /tmp/styleseed |
| 67 | fi |
| 68 | ``` |
| 69 | |
| 70 | Compare: |
| 71 | - `engine/VERSION` (or `version.json`) vs the local copy — the source of truth |
| 72 | - DESIGN-LANGUAGE.md rule count + Table of Contents |
| 73 | - Skills present in `.claude/skills/` vs upstream (don't hardcode a count — list the diff) |
| 74 | - Whether `CLAUDE.md`, `AGENTS.md`, and `.cursorrules` exist (ship all three) |
| 75 | - New engine docs (VISUAL-CRAFT.md, APP-PLAYBOOKS.md, PAGE-TYPES.md) |
| 76 | |
| 77 | ### Step 3: Report & Ask |
| 78 | |
| 79 | Show the user what needs updating: |
| 80 | |
| 81 | ``` |
| 82 | StyleSeed Update Report: |
| 83 | |
| 84 | Current state: |
| 85 | - DESIGN-LANGUAGE.md: [location] — [old/current version indicator] |
| 86 | - Skills: [count] found (latest: 12) |
| 87 | - Golden Rules: [yes/no] |
| 88 | - .cursorrules: [yes/no] |
| 89 | |
| 90 | Recommended updates: |
| 91 | 1. ✅ [safe] Update skills (X → 12) |
| 92 | 2. ✅ [safe] Add .cursorrules |
| 93 | 3. ⚠️ [review] Update DESIGN-LANGUAGE.md ([old line count] → [new line count]) |
| 94 | 4. ⚠️ [merge] Add Golden Rules to CLAUDE.md (won't overwrite existing content) |
| 95 | |
| 96 | Shall I proceed? (I'll ask before each ⚠️ item) |
| 97 | ``` |
| 98 | |
| 99 | ### Step 4: Execute Updates |
| 100 | |
| 101 | For each update, in order: |
| 102 | |
| 103 | **Always safe (do without asking):** |
| 104 | - Copy skills: `cp -r /tmp/styleseed/engine/.claude/skills/ .claude/skills/` |
| 105 | - Copy .cursorrules (if not exists): `cp /tmp/styleseed/engine/.cursorrules .cursorrules` |
| 106 | |
| 107 | **Ask before doing:** |
| 108 | |
| 109 | For DESIGN-LANGUAGE.md: |
| 110 | - Show diff summary: how many new rules, what sections added |
| 111 | - Ask: "Update DESIGN-LANGUAGE.md? (Y/N)" |
| 112 | - If yes: copy to the detected location |
| 113 | |
| 114 | For CLAUDE.md (Golden Rules): |
| 115 | - Check if Golden Rules section already exists |
| 116 | - If not: ask "Add Golden Rules section to your CLAUDE.md? This adds 10 lines at the top. Your existing content stays untouched." |
| 117 | - If yes: insert Golden Rules after the first heading |
| 118 | |
| 119 | **Never touch:** |
| 120 | - theme.css — say "Your theme.css (skin) is untouched." |
| 121 | - components/ — say "Your components are untouched. Run `/ss-lint` to check compliance." |
| 122 | |
| 123 | ### Step 5: Summary |
| 124 | |
| 125 | ``` |
| 126 | Update complete! |
| 127 | |
| 128 | ✅ Skills: 12 (added X new) |
| 129 | ✅ .cursorrules: added |
| 130 | ✅ DESIGN-LANGUAGE.md: updated to latest |
| 131 | ✅ Golden Rules: added to CLAUDE.md |
| 132 | |
| 133 | Not touched: |
| 134 | - theme.css (your skin) |
| 135 | - components/ (your code) |
| 136 | |
| 137 | Next: run /ss-lint on your pages to check for rule violations. |
| 138 | ``` |
| 139 | |
| 140 | ### Step 6: Retrofit existing UI (optional but recommended) — "re-do a generic old build" |
| 141 | |
| 142 | Updating the rules doesn't re-design screens you already built with an older StyleSeed. If the |
| 143 | user says their existi |