css-tailwind-styling
Skill4 starsChanged 7 days agoMITView on GitHub
Expert guidance for writing clean, performant CSS and Tailwind CSS. Use when creating styles, designing components, optimizing performance, or establishing styling conventions. Covers modern CSS features, Tailwind utility patterns, responsive design, accessibility, and team collaboration standards.
In this repository43 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- agent-symlink-initSkill
- code-inspector-initSkill
- commitSkill
- copywritingSkill
- lingui-best-practicesSkill
- lingui-workflowSkill
- repo-skill-creatorSkill
- weekly-reportSkill
- agent-dispatchSkill
- agentic-review-handoffSkill
- agent-practice-auditSkill
- agent-symlink-initSkill
- architecture-hardening-loopSkill
- ardot-mcpSkill
- branch-creatorSkill
- chrome-dev-mcpSkill
- code-inspector-initSkill
- code-plugin-architectureSkill
- commit-pushSkill
- commitSkill
- decision-first-technical-writingSkill
- design-systemSkill
- desktop-agent-activitySkill
- dev-environment-roi-auditSkill
- disk-tidySkill
- figma-mcpSkill
- file-tidySkill
- goal-gateSkill
- grill-autopilotSkill
- kimi-computer-useSkill
- lingui-workflowSkill
- local-web-surfaceSkill
- open-code-review-loopSkill
- prompt-studioSkill
- review-prompt-composerSkill
- task-completion-loopSkill
- uxc-facadeSkill
- web-performance-auditSkill
- weekly-reportSkill
- workflow-gateSkill
- worktree-tidySkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Follow the requested styling scope and the project's existing design tokens, component patterns, formatter, linter, and package manager.
- Distinctive: line 31
Maintainability First: Write styles that are easy to understand and modify
- Distinctive: line 33
Accessibility By Default: Ensure WCAG AA compliance (4.5:1 contrast ratio minimum)
- Distinctive: line 34
Mobile-First Responsive: Start with mobile and progressively enhance
- Distinctive: line 41
Use this protocol only when the task needs Tailwind-specific guidance.
- Distinctive: line 53
Use these signals to validate or refine the initial state:
- Very specific: line 55
Prefer v4 when you find: @import "tailwindcss", @theme, @utility, @custom-variant
- Very specific: line 56
Prefer v3 when you find: @tailwind base;, @tailwind components;, @tailwind utilities.
- Distinctive: line 76
Use the existing task context first.
- Distinctive: line 95
Use the existing context: Follow the project's framework, styling system, and conventions.
- Distinctive: line 98
Provide code examples when useful: Keep small fixes focused; a full good/bad tutorial is optional.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CSS and Tailwind CSS Styling Expert
Overview
This skill provides comprehensive best practices for writing maintainable, performant, and accessible styles using both traditional CSS and Tailwind CSS. It covers modern techniques, performance optimization, responsive design patterns, and team collaboration standards.
Follow the requested styling scope and the project's existing design tokens, component patterns, formatter, linter, and package manager. A local style fix does not require adopting Tailwind, migrating versions, installing tools, or reformatting unrelated code.
When to Use This Skill
- Creating or refactoring component styles
- Setting up a new project's styling architecture
- Optimizing CSS or Tailwind performance
- Establishing team styling conventions
- Reviewing code for style-related issues
- Implementing responsive designs
- Ensuring accessibility compliance
- Debugging style conflicts or specificity issues
Core Principles
General Styling Philosophy
- Maintainability First: Write styles that are easy to understand and modify
- Performance Conscious: Minimize bundle size and render-blocking
- Accessibility By Default: Ensure WCAG AA compliance (4.5:1 contrast ratio minimum)
- Mobile-First Responsive: Start with mobile and progressively enhance
- Consistency Over Cleverness: Establish and follow patterns
Version Detection & Decision Flow
Use this protocol only when the task needs Tailwind-specific guidance; ordinary CSS work skips it. Reuse version evidence already established in the current task instead of repeating the same inspection.
1. Detect Tailwind Version (Dependency First)
Inspect package.json first:
tailwindcssmajor version4-> initial state:v4tailwindcssmajor version3-> initial state:v3- Missing/unclear dependency -> initial state:
unknown(continue with signal checks)
2. Cross-Check with Configuration and Style Signals
Use these signals to validate or refine the initial state:
- Prefer v4 when you find:
@import "tailwindcss",@theme,@utility,@custom-variant - Prefer v3 when you find:
@tailwind base;,@tailwind components;,@tailwind utilities;with a config-driven setup
3. Resolve Final State
v4: dependency and signals align to v4v3: dependency and signals align to v3conflict: dependency and syntax/config signals disagreeunknown: insufficient evidence to identify a single version
4. Required Decision Behavior
v4: Use the v4 path; include v3 only for an explicit comparison or migration decision.v3: Use the v3 path; include v4 only for an explicit comparison or migration decision.conflict: Inspect the conflicting dependency/config signals and recommend the smallest justified repair. Compare repair paths only when that choice affects the requested work.unknown: Gather only the evidence needed for version-dependent changes. For a new project with no established version, recommend v4; version-independent CSS work can continue without a migration proposal.
Load Only the Relevant Detail
Use the existing task context first. If the requested change is already clear, proceed without opening a reference. Otherwise select the relevant reference and read only the named sections from its contents list; do not load all references by default.
| Requested work or established state | Read only when the detail is needed |
| Ordinary CSS, layout, selectors, tokens, or a responsive fix | CSS reference: the matching Traditional CSS section; Modern CSS Features only for the feature involved. Skip Tailwind guidance. |
| Tailwind utilities, complete class mappings, component variants, or class organization | Tailwind reference: the matching numbered section. Reuse the project's existing formatter and components. |
| Confirmed Tailwind v3 configuration or source scanning | Tailwind reference: section 6's v3 (config-first) block or section 10's v3 guidance only. Do not add the v4 alternative. |
| Confirmed Tailwind v4 configuration or source scanning | Tailwind reference: section 6's v4 (CSS-first) block or section 10's v4 guidance only. Do not add the v3 alternative. |
| Version conflict, migration, or an explicit version comparison | Use the version decision flow above, then only the implicated configuration sections in the Tailwind reference. |
| Affected accessibility, browser compatibility, or performance behavior | Verification reference: only the relevant section and applicable checklist items. Tool lists are options, not installation prerequisites. |
Reference examples do not replace the current styling system or expand the requested work. Use the existing checks and relevant runtime evidence for the affected surface; a recipe or code read alone does not prove a UI interaction passed. Report missing runtime evidence as UNVERIFIED instead of broadening a local task into a full-site audit.
Output Format
Scale the response to the requested CSS/Tailwind work:
- Use the existing context: Follow the project's framework, styling system, and conventions.
- Detect the version when relevant: For Tailwind-specific decisions, use dependency and syntax/config evidence. Skip Tailwind detection for ordinary CSS work.
- Report decision-relevant evidence: Name the detected version and chosen approach when they affect the answer. Include an alternate version or repair comparison only for an unresolved conflict, migration, or requested comparison.
- Provide code examples when useful: Keep small fixes focused; a full good/bad tutorial is optional.
- Explain non-obvious choices: Connect the change to the requested result.
- Preserve accessibility: Report relevant a11y implications and actual checks for the affected surface.
- Check performance: Flag evidence-backed risks relevant to the change.
- Suggest tools only for an actual gap: Reuse existing tooling; do not add setup work merely to satisfy this guide.
Always prioritize:
- ✅ Maintainability and readability
- ✅ Performance and bundle size
- ✅ Accessibility compliance
- ✅ Team consistency
- ✅ Modern best practices
Version History
- v1.2 (2026-02-24): Added v3/v4 dual-track support with dependency-first detection flow, conflict handling, and structured output contract fields.
- v1.1 (2026-02-24): Clarified Tailwind adoption criteria, responsive prefix guidance, and compatibility wording.
- v1.0 (2025-01): Initial release covering Tailwind CSS + modern CSS best practices.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

