一键导入
canonicalize-tailwind
Sort, normalize, deduplicate, and resolve conflicting Tailwind utility classes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Sort, normalize, deduplicate, and resolve conflicting Tailwind utility classes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add dark mode with colors, shadows, and surfaces handled the way a designer would.
Generate a complete visual identity and marketing-site mockup board from a product idea.
Extract and organize existing UI into reusable components with thoughtful APIs.
Create dark-mode variants of raster images for dark UI contexts.
Design and build new UI with the complete ui.sh design guideline system.
Compare multiple UI options in-browser with the ui.sh picker.
| name | canonicalize-tailwind |
| description | Sort, normalize, deduplicate, and resolve conflicting Tailwind utility classes. |
Use this when the user wants to clean up, canonicalize, or normalize Tailwind class lists.
Keep the user informed so longer runs do not look stuck.
npx @tailwindcss/cli canonicalize.Use npx @tailwindcss/cli canonicalize to clean up Tailwind class lists — collapses shorthands (mt-2 mr-2 mb-2 ml-2 → m-2), resolves overrides (py-3 p-1 px-3 → p-3), canonicalizes arbitrary values to named utilities, and sorts classes; pass --css path/to/input.css if the project uses a custom CSS entry file
Single class string:
npx @tailwindcss/cli canonicalize "mt-2 mr-2 mb-2 ml-2"
# m-2
Multiple class strings as positional args (each returned on its own line):
npx @tailwindcss/cli canonicalize "py-3 p-1 px-3" "mt-2 mr-2 mb-2 ml-2"
# p-3
# m-2
Pipe class strings via stdin (one per line):
echo "py-3 p-1 px-3\nmt-2 mr-2 mb-2 ml-2" | npx @tailwindcss/cli canonicalize
# p-3
# m-2
Use --format json or --format jsonl for structured output with input/output/changed fields:
npx @tailwindcss/cli canonicalize --format json "py-3 p-1 px-3"
# [{ "input": "py-3 p-1 px-3", "output": "p-3", "changed": true }]
Use --stream to process stdin line-by-line without buffering:
npx @tailwindcss/cli canonicalize --stream