tailwindcss-next-init
Tailwindcss Next Init
概览
用本 skill 为目标仓库生成 Tailwind v4 初始化骨架,并给出可复制的依赖安装命令、布局导入检查结果、@source 与 @reference 使用建议。
优先运行脚本完成标准化输出,避免手工遗漏。
标准流程
- 识别目标项目结构。
- 检查
<project-root>/package.json是否存在。 - 检查
src/app/layout.tsx或app/layout.tsx是否存在。 - 检查
src/styles/与styles/目录状态。
- 先做 dry-run 预览。
- 运行:
python3 scripts/init_tailwind_v4.py --project-root /abs/path/to/project --dry-run
- 先确认将创建/覆盖的文件,再决定是否执行真实写入。
- 执行初始化写入。
- 默认最小模板:
python3 scripts/init_tailwind_v4.py --project-root /abs/path/to/project
- 贴近本仓库模板:
python3 scripts/init_tailwind_v4.py --project-root /abs/path/to/project --preset project-like
- 已有文件需覆盖时显式加
--force。
- 处理依赖安装。
- 按脚本输出的包管理器命令安装依赖(脚本只生成命令,不直接执行安装)。
- 默认图标策略是
--icons all,安装lucide/mdi/tabler三套图标集。
- 检查导入与扫描边界。
- 若脚本提示缺少全局样式导入,在目标
layout.tsx增加:
import "@/styles/globals.css";
import "@/styles/custom.css";
- 若类名来自
node_modules或扫描盲区,按提示在tailwind-core.css增加@source。
- 进行项目验证。
- 至少执行一次构建链路检查(如
pnpm typecheck、pnpm dev)。 - 确认页面样式生效、Iconify 图标类可渲染。
脚本参数契约
scripts/init_tailwind_v4.py 支持以下参数:
--project-root <path>:目标项目根目录(必填)--preset minimal|project-like:模板风格,默认minimal--icons all|lucide|none:图标策略,默认all--package-manager auto|pnpm|npm|yarn|bun:包管理器,默认auto--dry-run:仅预览,不写文件--force:覆盖已存在文件
资源说明
references/repo-tailwind-audit.md- 记录当前仓库 Tailwind 链路与历史演进,供“项目同款”策略参考。
references/tailwind-v4-best-practices.md- 记录 Tailwind v4 / Next.js / Iconify 的最佳实践与官方链接。
assets/templates/minimal/*- 通用最小模板,适合跨项目快速落地。模板源文件使用
.tpl后缀。
- 通用最小模板,适合跨项目快速落地。模板源文件使用
assets/templates/project-like/*- 贴近本仓库风格,包含 safe-area、reduced-motion、theme token bridge。模板源文件使用
.tpl后缀。 project-like模板中的@layer ... antd ...为仓库同款特化项;非 Ant Design 项目可按需移除该 layer。
- 贴近本仓库风格,包含 safe-area、reduced-motion、theme token bridge。模板源文件使用
模板后缀约定:
- 模板源:
*.tpl - 目标产物:
src/styles/*.css或styles/*.css(脚本自动判定) init_tailwind_v4.py严格读取.tpl,不会回退读取.css模板。
输出约束
执行本 skill 时,始终输出:
- 目标项目识别结果(layout、styles、package manager)
- 将写入/已写入文件列表
- 依赖安装命令(按所选包管理器)
@source与@reference的建议片段- 验证清单(至少 3 条可执行检查项)
More from adonis0123/adonis-skills
staged-changes-review
Checklist-driven review of staged Git changes with deterministic rule scanning and semantic analysis. Use when the user wants to review staged changes, check for errors before commit, or validate code quality before committing.
25ruler-rules-init
Migrate and bootstrap Ruler-based AI rules across repositories with English-first templates, preset-based project detection, and safe, idempotent setup. Use when creating or standardizing `.ruler/*` files, generating `AGENTS.md`/`CLAUDE.md`, wiring `ruler:apply` into `package.json`, adding generated-file ignores in `.gitignore`, and designing `applyTo` scoping patterns such as `**` and `web/**`.
18discuss-before-plan
Enforces 'decide then plan' discipline - the pre-planning decision gate. Use when the user asks for a plan or starts a change while key decisions are unresolved: architecture tradeoffs, data flow, public interfaces, unclear requirements, multi-module scope, or roughly 5+ files affected. Also triggers when the user explicitly wants to discuss, compare options, or review architecture before committing. Core job: reduce incorrect-execution cost by confirming decisions before producing executable plans.
17claude-skills-sync-init
Bootstrap Claude skill-sync automation in any repository. Use when users ask to set up `.agents/skills` to `.claude/skills` syncing, generate `skills:sync:*` scripts, inject package.json scripts/postinstall hooks, or initialize this sync workflow in a new or existing project.
16staged-review-validator
Validate staged-changes-review findings with evidence-based verdicts and minimal-fix guidance. Use when you need to confirm whether each reported issue is valid and actionable.
14weekly-report
Generate structured weekly reports from Git commit history across one or multiple repositories. Use when you need concise, project-grouped progress summaries for status reporting.
11