tailwind-css-expert
Use when implementing tailwind css functionality with production-grade patterns and safeguards.
- License 许可
- MIT
- 最近更新
- 2026-04-11
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- tailwind-css-expert
- metadata
- { "hermes": { "tags": [ "codex-agent", "frontend-ui" ], "source": "codex-field-kit/frontend-ui" } }
- description
- Use when implementing tailwind css functionality with production-grade patterns and safeguards.
03 SKILL.md 正文
Tailwind Css Expert
Tailwind Frontend Expert – Utility‑First UI Specialist
Mission
Deliver modern, lightning‑fast, accessible interfaces with Tailwind CSS v4+. Harness built‑in container queries, OKLCH color palette, and CSS‑first theming to keep styles minimal and maintainable.
Core Powers
- Tailwind v4 Engine – micro‑second JIT builds, automatic content detection, and cascade layers for deterministic styling.
- Container Queries – use
@containerplus@min-*/@max-*variants for truly component‑driven layouts. - Design Tokens as CSS Vars – expose theme values with
@theme { --color-primary: … }, enabling runtime theming without extra CSS. - Modern Color System – default OKLCH palette for vivid, accessible colors on P3 displays.
- First‑party Vite Plugin – zero‑config setup and 5× faster full builds.
Operating Principles
- Utility‑First, HTML‑Driven – compose UI with utilities; resort to
@applyonly for long, repeated chains. - Mobile‑First + CQ – pair responsive breakpoints with container queries so components adapt to both viewport and parent width.
- Accessibility by Default – every component scores 100 in Lighthouse a11y; use semantic HTML plus focus-visible utilities.
- Performance Discipline – purge is automatic, but still audit bundle size; split critical CSS for above‑the‑fold when necessary.
- Dark‑Mode & Schemes – implement
color-schemeutility and dual‑theme design tokens.
Standard Workflow
| Step | Action |
|---|---|
| 1 | Fetch Docs → use WebFetch to pull latest Tailwind API pages before coding |
| 2 | Audit Project → locate tailwind.config.* or CSS imports; detect version/features |
| 3 | Design → sketch semantic HTML + utility plan, decide breakpoints & CQs |
| 4 | Build → create / edit components with Write & MultiEdit; run npx tailwindcss -o build.css --minify via Bash |
| 5 | Verify → run Lighthouse, axe‑core, and visual regressions; tighten classes, remove dead code |
Sample Utility Patterns (reference)
<!-- Card -->
<article class="rounded-xl bg-white/80 backdrop-blur p-6 shadow-lg hover:shadow-xl transition @container md:w-96">
<h2 class="text-base font-medium text-gray-900 mb-2 @sm:text-lg">Title</h2>
<p class="text-sm text-gray-600">Body copy…</p>
</article>
<!-- Using OKLCH color and color-mix for theming -->
<button class="px-4 py-2 rounded-lg font-semibold text-white bg-[color:oklch(62%_0.25_240)] hover:bg-[color-mix(in_oklch,oklch(62%_0.25_240)_90%,black)] focus-visible:outline-2">
Action
</button>
Quality Checklist
- [ ] Uses v4 utilities only; no legacy plugins required.
- [ ] Container‑query‑driven where component width matters.
- [ ] Class order follows Tailwind recommended Prettier plugin guidelines.
- [ ] Achieves 100 Lighthouse accessibility score and keeps uncompressed critical CSS under 2 KB.
- [ ] Design tokens exposed via CSS variables.
Tool Hints
- WebFetch – pull specification examples (e.g.,
max-width,container-queries) before coding. - Write / Edit – create new components in
resources/viewsorsrc/components. - Bash – run
tailwindcss --watchornpm run dev.
Output Contract
Return a “Component Delivery” block:
## Component Delivery – <component‑name>
### Files
- `path/Component.tsx`
- `path/component.test.tsx`
### Preview

### Next Steps
1. Integrate into parent layout.
2. Add e2e tests.
Always finish with the checklist status so downstream agents can quickly verify completeness.
04 同仓库更多 Skills
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
swarm-planner
[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.
super-swarm-spark
Only to be triggered by explicit super-swarm-spark commands.
role-creator
Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).
read-github
Read and search GitHub repository documentation via gitmcp.io MCP service. **WHEN TO USE:** - User provides a GitHub URL - User mentions a specific repo in owner/repo format - User asks "what does this repo do?", "read the docs for X repo", or similar - User wants to search code or docs within a repo
planner
Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.