skills/tailwind-css/SKILL.md
Tailwind CSS v4 styling with utility-first classes, theme configuration, and modern CSS patterns. Use when writing or modifying CSS classes, configuring themes, implementing responsive designs, or migrating from v3. Triggers on Tailwind, utility classes, responsive breakpoints, dark mode styling.
npx skillsauth add afk-agents/agentic-toolkit tailwind-cssInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write modern, maintainable styles using Tailwind CSS v4's utility-first approach.
Responsive: sm:, md:, lg:, xl:, 2xl: (mobile-first)
States: hover:, focus:, active:, disabled:, group-hover:, peer-checked:
Dark mode: dark:
Arbitrary values: top-[117px], bg-[#bada55]
CSS variables: bg-(--my-color) (v4 syntax)
@theme { } as CSS custom propertiesConfiguration moved from JS to CSS via @theme:
/* app.css */
@import "tailwindcss";
@theme {
--font-sans: "Inter", system-ui, sans-serif;
--color-brand-500: oklch(0.637 0.237 25.331);
--breakpoint-lg: 64rem;
--spacing: 0.25rem;
}
Theme values generate both utility classes (bg-brand-500) and CSS variables (var(--color-brand-500)).
Replace v3 directives with single import:
/* v3 (deprecated) */
@tailwind base;
@tailwind components;
@tailwind utilities;
/* v4 */
@import "tailwindcss";
Requires: Safari 16.4+, Chrome 111+, Firefox 128+
Uses native CSS features: @property, color-mix(), cascade layers. Use v3.4 for older browsers.
@tailwindcss/cli@tailwindcss/postcss@tailwindcss/viteNo longer need postcss-import or autoprefixer as separate dependencies.
Run npx @tailwindcss/upgrade for automated migration.
| v3 | v4 |
|----|----|
| shadow-sm | shadow-xs |
| shadow | shadow-sm |
| blur-sm | blur-xs |
| blur | blur-sm |
| rounded-sm | rounded-xs |
| rounded | rounded-sm |
| drop-shadow-sm | drop-shadow-xs |
| drop-shadow | drop-shadow-sm |
| outline-none | outline-hidden |
| ring | ring-3 |
bg-opacity-50) → slash syntax (bg-black/50)flex-shrink-* → shrink-*flex-grow-* → grow-*overflow-ellipsis → text-ellipsiscurrentColor (was gray-200)currentColor (was blue-500)1px (was 3px, use ring-3 for old default)gray-400)default (was pointer)bg-(--my-color) instead of bg-[--my-color]tw:bg-red-500 (variant-like)@media (hover: hover))Use @utility instead of @layer utilities:
@utility btn-primary {
background-color: var(--color-brand-500);
padding: 0.5rem 1rem;
border-radius: 0.25rem;
}
Use @reference to access theme in isolated style blocks:
<style scoped>
@reference "../app.css";
.custom { @apply bg-brand-500; }
</style>
Or use CSS variables directly: var(--color-brand-500)
| Directive | Purpose |
|-----------|---------|
| @import "tailwindcss" | Import Tailwind |
| @theme { } | Define design tokens |
| @source "../path" | Include source paths for class detection |
| @source not "../path" | Exclude paths |
| @utility name { } | Custom utility classes |
| @variant name { } | Apply variants in CSS |
| @custom-variant | Define new variants |
| @apply | Inline utilities (needs @reference in modules) |
| @reference "path" | Import for context without output |
Functions:
--alpha(color / opacity) - adjust color opacity--spacing(value) - generate spacing valuesvar(--theme-variable) - reference theme variablesARIA: aria-checked:, aria-disabled:
Data attributes: data-[size=large]:, data-active:
Has selector: has-[:focus]:
Child/descendant: *:p-2, **:rounded-full
Named groups: group/item, peer-checked/opt1:
<div class="@container">
<div class="@sm:grid-cols-2 @lg:grid-cols-4">
<!-- Styles based on container width -->
</div>
</div>
Named containers: @container/sidebar, @lg/sidebar:
Read these files only when you need detailed utility reference:
<!-- Flex -->
<div class="flex items-center justify-center">
<!-- Grid -->
<div class="grid place-items-center">
<!-- Absolute positioning -->
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
<div class="rounded-lg bg-white p-6 shadow-md dark:bg-gray-800">
<button class="rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
<input class="w-full rounded-md border border-gray-300 px-3 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
<p class="truncate">Very long text...</p>
<!-- or multi-line -->
<p class="line-clamp-3">...</p>
testing
Analyzes text files for AI-generated writing patterns and returns JSON metrics. Run on drafts or essays to detect overused AI patterns like slop words, contrast structures, and suspicious trigrams. Use when checking writing for AI-like patterns or when asked to score a file for slop.
tools
Use this skill when you need to analyze writing for AI-like patterns and get actionable suggestions for making text sound more natural and human-written. This is particularly useful after drafting or editing creative writing, essays, or blog posts. The agent uses the /slop-score skill to identify problematic patterns and provides specific revision suggestions.\n\n<example>\nContext: The user has just finished writing a blog post draft and wants feedback on naturalness.\nuser: "I just finished my draft in drafts/ai-future-essay.md. Can you check it for AI-sounding language?"\nassistant: "I'll use the slop-analyst agent to analyze your draft for AI-like patterns and get specific suggestions for improvement."\n<commentary>\nSince the user wants to check their writing for AI patterns, use the Task tool to launch the slop-analyst agent which specializes in this analysis using the /slop-score skill.\n</commentary>\n</example>\n\n<example>\nContext: The parent agent has made significant edits to a piece and wants to verify the writing still sounds natural.\nuser: "Please revise this paragraph to be more engaging"\nassistant: "Here's the revised paragraph: [revised text]"\n<commentary>\nAfter making substantial revisions, it would be valuable to check if the new text sounds natural. Use the Task tool to launch the slop-analyst agent to analyze the revised content.\n</commentary>\nassistant: "Let me also run this through the slop-analyst to make sure the revisions sound natural."\n</example>\n\n<example>\nContext: User is working on creative writing and mentions concerns about their writing sounding robotic.\nuser: "Something feels off about this story I wrote. It doesn't sound like me."\nassistant: "I'll have the slop-analyst examine your story to identify any patterns that might be making it feel unnatural."\n<commentary>\nThe user's concern about authenticity is exactly what the slop-analyst is designed to address. Use the Task tool to launch it for detailed pattern analysis.\n</commentary>\n</example>
testing
Creates or updates agent skills (SKILL.md files) following official documentation and best practices. Use when the user wants to create a new skill, update an existing skill, or scaffold a skill directory structure.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.