[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EW4NFP9QGKBDGQYEZ2HKCS":3,"skill-same:01M7EW4NFP9QGKBDGQYEZ2HKCS":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7EW4NFP9QGKBDGQYEZ2HKCS","ams-tailwind-patterns",null,"TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-tailwind-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tailwind-patterns\ndescription: Build UIs with Tailwind CSS: utility composition, component extraction, theming, dark mode, and responsive design. Use for utility-first styling in any framework.\ncategory: web-development\n---\n\n# Tailwind Patterns\n\nA practical guide to Tailwind CSS done professionally: composing utilities, extracting components (the right way), theming with design tokens, dark mode, responsive design, and keeping utility soup maintainable.\n\n## Overview\n\nTailwind's utility classes move styling into markup, which trades CSS-file archaeology for long class strings. It works brilliantly with **component extraction**: repeated utility combos become components (React\u002FVue\u002Fetc.), not CSS classes. The failure mode is \"utility soup\" — 40-class divs repeated across files. The fix is always components, not `@apply` (which the Tailwind team itself de-emphasizes).\n\n## When to use\n\n- Utility-first styling in React\u002FVue\u002FSvelte\u002FHTML projects.\n- Design systems built on Tailwind tokens.\n- Dark mode and responsive design via variants.\n- Cleaning up an inconsistent Tailwind codebase.\n\n## Core concepts\n\n- **Utilities.** `flex`, `px-4`, `text-sm`, `bg-zinc-900` — single-purpose classes. Learn the naming grammar (`{property}-{scale}`) and you can guess most classes.\n- **Variants.** `hover:`, `focus:`, `dark:`, `sm:`\u002F`md:`\u002F`lg:`, `disabled:`, `group-hover:`, `data-[state=open]:` — state and context modifiers. Stackable: `dark:hover:bg-zinc-800`.\n- **Theme.** `tailwind.config.js` `theme.extend`: colors, fonts, spacing, radii, shadows — your design tokens. v4 uses CSS-first `@theme`. Semantic names (`surface`, `muted`) over literal (`gray-200`).\n- **Dark mode.** `dark:` variant with `class` strategy (toggle `.dark` on `\u003Chtml>`) or `media` (OS preference). Class strategy + a theme store = user toggle.\n- **Responsive.** Mobile-first: base classes are mobile, `md:` overrides up. Design small → large.\n- **Arbitrary values.** `w-[137px]`, `grid-cols-[1fr_2fr]`, `text-[13px]` — escape hatch for one-offs. Frequent use = missing theme token.\n- **Container queries.** `@container` \u002F `@md:` variants for component-level responsiveness (better than page breakpoints for reusable components).\n\n## Practical workflow\n\n**1. Configure tokens once.**\n```js\n\u002F\u002F tailwind.config.js\nmodule.exports = {\n  darkMode: 'class',\n  content: ['.\u002Fsrc\u002F**\u002F*.{ts,tsx}'],\n  theme: { extend: {\n    colors: { brand: { 50: '...', 500: '#6d28d9', 600: '...', 900: '...' } },\n    fontFamily: { sans: ['Inter', 'system-ui', 'sans-serif'] },\n  }},\n};\n```\n\n**2. Component extraction (the pattern).**\n```tsx\n\u002F\u002F NOT: repeating 15 utilities in 20 files\n\u002F\u002F YES: one Button component\nfunction Button({ variant = 'primary', className = '', ...props }) {\n  const base = 'inline-flex items-center justify-center rounded-lg px-4 py-2 text-sm font-medium transition-colors focus-visible:outline-2 disabled:opacity-50';\n  const variants = {\n    primary: 'bg-brand-600 text-white hover:bg-brand-500',\n    secondary: 'bg-zinc-100 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-100',\n  };\n  return \u003Cbutton className={`${base} ${variants[variant]} ${className}`} {...props} \u002F>;\n}\n```\n\n**3. Responsive + dark.**\n```html\n\u003Cdiv class=\"grid grid-cols-1 gap-4 p-4 md:grid-cols-3 md:p-8 bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-100\">\n```\n\n**4. Consistency tooling.** Prettier plugin (`prettier-plugin-tailwindcss`) sorts classes deterministically — kills diff noise. Lint against raw color values drifting outside the theme.\n\n## Common pitfalls\n\n- **`@apply` for components.** Extract to framework components instead. `@apply` recreates the CSS-file problems Tailwind avoids and breaks with some variants.\n- **Utility soup duplication.** Same 20 classes pasted in 15 files = a missing component. Extract at the third repetition.\n- **Literal colors everywhere.** `bg-[#6d28d9]` scattered = theme drift. Put it in the config as `brand-600`.\n- **Dark mode afterthought.** Bolting `dark:` on at the end doubles the work. Design both modes from the start; use semantic tokens.\n- **Desktop-first responsive.** Writing `lg:` overrides for desktop then fighting mobile. Mobile-first: base = mobile.\n- **Overriding with `!important`.** `!`-prefixed utilities signal specificity fights — usually a sign the component structure needs fixing.\n- **Purge\u002Fcontent misconfiguration.** Dynamic class construction (`bg-${color}-500`) gets purged in production. Safelist or use full class names in a lookup map.\n- **Ignoring the prettier plugin.** Unsorted classes = noisy diffs and review friction. One plugin, zero debate.\n- **Huge HTML payloads.** Extremely long class strings bloat HTML; component extraction + gzip mitigates. For truly massive pages, consider whether utilities-per-element is the right call.\n","# Tailwind Patterns\n\nA practical guide to Tailwind CSS done professionally: composing utilities, extracting components (the right way), theming with design tokens, dark mode, responsive design, and keeping utility soup maintainable.\n\n## Overview\n\nTailwind's utility classes move styling into markup, which trades CSS-file archaeology for long class strings. It works brilliantly with **component extraction**: repeated utility combos become components (React\u002FVue\u002Fetc.), not CSS classes. The failure mode is \"utility soup\" — 40-class divs repeated across files. The fix is always components, not `@apply` (which the Tailwind team itself de-emphasizes).\n\n## When to use\n\n- Utility-first styling in React\u002FVue\u002FSvelte\u002FHTML projects.\n- Design systems built on Tailwind tokens.\n- Dark mode and responsive design via variants.\n- Cleaning up an inconsistent Tailwind codebase.\n\n## Core concepts\n\n- **Utilities.** `flex`, `px-4`, `text-sm`, `bg-zinc-900` — single-purpose classes. Learn the naming grammar (`{property}-{scale}`) and you can guess most classes.\n- **Variants.** `hover:`, `focus:`, `dark:`, `sm:`\u002F`md:`\u002F`lg:`, `disabled:`, `group-hover:`, `data-[state=open]:` — state and context modifiers. Stackable: `dark:hover:bg-zinc-800`.\n- **Theme.** `tailwind.config.js` `theme.extend`: colors, fonts, spacing, radii, shadows — your design tokens. v4 uses CSS-first `@theme`. Semantic names (`surface`, `muted`) over literal (`gray-200`).\n- **Dark mode.** `dark:` variant with `class` strategy (toggle `.dark` on `\u003Chtml>`) or `media` (OS preference). Class strategy + a theme store = user toggle.\n- **Responsive.** Mobile-first: base classes are mobile, `md:` overrides up. Design small → large.\n- **Arbitrary values.** `w-[137px]`, `grid-cols-[1fr_2fr]`, `text-[13px]` — escape hatch for one-offs. Frequent use = missing theme token.\n- **Container queries.** `@container` \u002F `@md:` variants for component-level responsiveness (better than page breakpoints for reusable components).\n\n## Practical workflow\n\n**1. Configure tokens once.**\n```js\n\u002F\u002F tailwind.config.js\nmodule.exports = {\n  darkMode: 'class',\n  content: ['.\u002Fsrc\u002F**\u002F*.{ts,tsx}'],\n  theme: { extend: {\n    colors: { brand: { 50: '...', 500: '#6d28d9', 600: '...', 900: '...' } },\n    fontFamily: { sans: ['Inter', 'system-ui', 'sans-serif'] },\n  }},\n};\n```\n\n**2. Component extraction (the pattern).**\n```tsx\n\u002F\u002F NOT: repeating 15 utilities in 20 files\n\u002F\u002F YES: one Button component\nfunction Button({ variant = 'primary', className = '', ...props }) {\n  const base = 'inline-flex items-center justify-center rounded-lg px-4 py-2 text-sm font-medium transition-colors focus-visible:outline-2 disabled:opacity-50';\n  const variants = {\n    primary: 'bg-brand-600 text-white hover:bg-brand-500',\n    secondary: 'bg-zinc-100 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-100',\n  };\n  return \u003Cbutton className={`${base} ${variants[variant]} ${className}`} {...props} \u002F>;\n}\n```\n\n**3. Responsive + dark.**\n```html\n\u003Cdiv class=\"grid grid-cols-1 gap-4 p-4 md:grid-cols-3 md:p-8 bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-100\">\n```\n\n**4. Consistency tooling.** Prettier plugin (`prettier-plugin-tailwindcss`) sorts classes deterministically — kills diff noise. Lint against raw color values drifting outside the theme.\n\n## Common pitfalls\n\n- **`@apply` for components.** Extract to framework components instead. `@apply` recreates the CSS-file problems Tailwind avoids and breaks with some variants.\n- **Utility soup duplication.** Same 20 classes pasted in 15 files = a missing component. Extract at the third repetition.\n- **Literal colors everywhere.** `bg-[#6d28d9]` scattered = theme drift. Put it in the config as `brand-600`.\n- **Dark mode afterthought.** Bolting `dark:` on at the end doubles the work. Design both modes from the start; use semantic tokens.\n- **Desktop-first responsive.** Writing `lg:` overrides for desktop then fighting mobile. Mobile-first: base = mobile.\n- **Overriding with `!important`.** `!`-prefixed utilities signal specificity fights — usually a sign the component structure needs fixing.\n- **Purge\u002Fcontent misconfiguration.** Dynamic class construction (`bg-${color}-500`) gets purged in production. Safelist or use full class names in a lookup map.\n- **Ignoring the prettier plugin.** Unsorted classes = noisy diffs and review friction. One plugin, zero debate.\n- **Huge HTML payloads.** Extremely long class strings bloat HTML; component extraction + gzip mitigates. For truly massive pages, consider whether utilities-per-element is the right call.\n",{},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-tailwind-patterns",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ams-tailwind-patterns",{"tool":37,"command":38},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ams-tailwind-patterns",{"tool":40,"command":41},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ams-tailwind-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-tailwind-patterns\u002FSKILL.md",true,[],[46,53,61,68,75,82],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":57,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]