v0.2.0 — Tailwind v4 + Brand Color Detection
Pre-releaseWhat's new
Added
-
Tailwind v4 support.
detect-stack.mjsnow reportstailwind.flavor(v3 | v4) by parsing both thetailwindcssdependency version and the@import "tailwindcss"/@themedirectives in
globals.css. The Skill workflow branches on this:- v3 projects continue to use
templates/globals.css.tpl+tailwind.config.tpl. - v4 projects use the new
templates/globals.v4.css.tpland skip the JS config entirely (CSS-first).
- v3 projects continue to use
-
Custom brand color detection. New
scripts/detect-brand.mjslooks for an existingbrand/primary/accentcolor across:tailwind.config.{js,ts,mjs}— object form and string form.globals.css— plain CSS variables (--brand,--primary-600).globals.cssv4@themeblocks (--color-brand-600).
Output classPrefix (one of
brand/primary/accent/indigofallback) is substituted everywhere the Skill would otherwise hard-code indigo. -
New reference:
references/tailwind-v4.md— v3 → v4 class deltas and the v4 idioms. -
New reference:
references/brand-color-strategy.md— exact rules for when to substitute, when to preserve, edge cases. -
New template:
templates/globals.v4.css.tpl— v4-flavor globals.
Changed
SKILL.mdstep 1 now runs two detection scripts in sequence and announces both results.SKILL.mdstep 5 branches ontailwind.flavorand always readsbrand-color-strategy.mdbefore emitting anyindigoclass.references/tailwind-modernization.md— added a top-of-file note declaringindigoas a placeholder for the detectedclassPrefix, and a pointer to the v4 reference.- README roadmap and "supported stacks" table updated to reflect v4 support.
新增
- Tailwind v4 支持。
detect-stack.mjs通过解析tailwindcss依赖版本号 +globals.css里的@import "tailwindcss"/@theme指令,输出tailwind.flavor(v3 | v4)。Skill 工作流据此分支:- v3 项目继续使用
templates/globals.css.tpl+tailwind.config.tpl。 - v4 项目使用新增的
templates/globals.v4.css.tpl,完全跳过 JS 配置(CSS-first)。
- v3 项目继续使用
- 自动检测品牌色。新增脚本
scripts/detect-brand.mjs,跨tailwind.config、普通 CSS 变量、v4@theme块查找已有的brand/primary/accent颜色。检测到的classPrefix会替换 Skill
默认硬编码的 indigo。 - 新增参考文档:
references/tailwind-v4.md、references/brand-color-strategy.md。 - 新增模板:
templates/globals.v4.css.tpl。
改动
SKILL.mdStep 1 依次跑两个检测脚本;Step 5 按tailwind.flavor分支。- README roadmap 和"支持栈"表更新。