Skip to main content
skill CX Codex

tailwind · boraoztunc — Claude Code skill: what it does, how to install

A skill for Tailwind CSS v4.2 in HyperFrames compositions, with rules for stable browser rendering and v3-to-v4 fixes.

Apache-2.0 218 installs ★ 484 updated 2026-08-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add boraoztunc/skills --skill tailwind -a claude-code
Open on GitHub

What tailwind does

This skill covers Tailwind CSS v4.2 in HyperFrames composition HTML created with hyperframes init --tailwind. It guides utility classes, CSS-first theme values with @theme, custom rules through @utility, and fixes for projects that still use v3 syntax.

The guidance is built around the pinned @tailwindcss/[email protected] runtime. It explains static class tokens, seekable motion, frame validation, and the point where a compiled CSS file is a better fit than browser-side processing. It also lists checks with npx hyperframes lint, npx hyperframes validate, and npx hyperframes inspect, plus a draft render command.

If window.__tailwindReady is missing, capture can begin before styles are ready. Do not apply this setup to packages/studio: that package uses Tailwind v3 with tailwind.config.js, PostCSS, and @tailwind directives.

What it helps with

  • set up Tailwind CSS v4.2 in a HyperFrames composition
  • move theme values from tailwind.config.js to @theme
  • replace runtime-generated class names with static tokens
  • check styles before frame capture
  • choose between the browser runtime and compiled CSS

Example prompts for the agent

  • Set up Tailwind for a project created with hyperframes init --tailwind and verify that styles are ready before capture.
  • Convert this composition from v3 directives to the Tailwind v4 CSS-first format.
  • Run npx hyperframes validate, then render a proof with npx hyperframes render . --workers 1 --quality draft --output tailwind-proof.mp4.

How to install tailwind

1Skills CLI (Vercel)

npx skills add boraoztunc/skills --skill tailwind -a claude-code

2Manually: put the files in place

~/.claude/skills/tailwind/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tailwind/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about tailwind

How do I install tailwind in Claude Code?

Run npx skills add boraoztunc/skills --skill tailwind -a claude-code, then check ~/.claude/skills/tailwind/SKILL.md.

What does tailwind do?

It gives Claude Code guidance for Tailwind CSS v4.2 in HyperFrames compositions, including utility classes, CSS-first theme tokens, custom utilities, and render checks.

Can I use tailwind for packages/studio?

No. The skill targets compositions made with hyperframes init --tailwind; packages/studio uses Tailwind v3 with tailwind.config.js and PostCSS.

Source text

SKILL.md · Apache-2.0
---
name: tailwind
description: Tailwind CSS v4.2 browser-runtime patterns for HyperFrames compositions. Use when scaffolding or editing projects created with `hyperframes init --tailwind`, writing Tailwind utility classes in composition HTML, adding CSS-first Tailwind v4 theme tokens, debugging v3 vs v4 syntax, or deciding when to compile Tailwind to CSS instead of using the browser runtime.
---

# Tailwind CSS for HyperFrames

HyperFrames `init --tailwind` uses the Tailwind browser runtime pinned to `@tailwindcss/[email protected]`. Treat that as Tailwind v4, not v3.

This skill is for composition HTML generated by the CLI. It is not for `packages/studio`, which still uses Tailwind v3 internally with `tailwind.config.js`, PostCSS, and `@tailwind` directives.

## When To Use

- The user asks for Tailwind in a HyperFrames composition.
- A project was created with `hyperframes init --tailwind`.
- You see `window.__tailwindReady` in `index.html`.
- You need utility classes, CSS-first theme tokens, custom utilities, or v3-to-v4 migration guidance.
- The render has missing styles and the project is relying on the browser runtime.

## Version Contract

- Pinned runtime: `@tailwindcss/[email protected]`.
- Browser runtime script is injected by the CLI. Do not replace it with `cdn.tailwindcss.com`.
- HyperFrames waits for `window.__tailwindReady` before frame capture starts.
- The readiness shim must stay deterministic: no render-loop polling APIs, no clock-based retries, no runtime network fetches beyond the pinned Tailwind runtime script.
- For offline, locked-down, or production-stable renders, compile Tailwind to CSS and include the stylesheet directly instead of relying on the browser runtime.

## v4 Rules

Tailwind v4 is CSS-first:

```html
<style type="text/tailwindcss">
  @theme {
    --color-brand: oklch(0.68 0.2 252);
    --font-display: "Inter", sans-serif;
  }

  @utility headline-balance {
    text-wrap: balance;
    letter-spacing: 0;
  }
</style>
```

Avoid v3 setup patterns in browser-runtime compositions:

```css
/* Do not use these in Tailwind v4 browser-runtime compositions. */
@tailwind base;
@tailwind components;
@tailwind utilities;
```

Do not add a `tailwind.config.js` just to define colors, fonts, spacing, or utilities for a v4 browser-runtime composition. Use `@theme` and `@utility` in a `text/tailwindcss` style block.

If you truly need an existing JavaScript config for a compiled v4 build, load it explicitly from CSS with `@config`, then validate in the browser. Do not assume v4 auto-detects v3 config files.

## HyperFrames Composition Pattern

Keep Tailwind responsible for static layout and visual style. Keep motion timing in GSAP or another seekable adapter.

```html
<section
  class="clip absolute inset-0 grid place-items-center bg-zinc-950 text-white"
  data-start="0"
  data-duration="5"
  data-track-index="1"
>
  <div class="w-[1280px] max-w-[82vw] text-center">
    <p class="mb-6 text-xl font-medium uppercase tracking-[0.18em] text-cyan-300">
      Render-ready Tailwind
    </p>
    <h1 class="text-7xl font-black leading-none text-balance">
      Utility classes, deterministic frames.
    </h1>
  </div>
</section>
```

For repeated items, prefer class lists plus CSS custom properties over generating class names dynamically:

```html
<span class="inline-block translate-y-[calc(var(--i)*6px)] opacity-80" style="--i: 0"></span>
<span class="inline-block translate-y-[calc(var(--i)*6px)] opacity-80" style="--i: 1"></span>
<span class="inline-block translate-y-[calc(var(--i)*6px)] opacity-80" style="--i: 2"></span>
```

## Dynamic Class Safety

Tailwind's browser runtime scans the current document and generates CSS for class names it can see. Do not build render-critical class names only at seek time:

```js
// Risky: Tailwind may not see every generated class before capture.
element.className = `bg-${color}-500`;
```

Use complete class names in HTML, data attributes, or explicit CSS instead:

```html
<div data-tone="blue" class="bg-blue-500 data-[tone=rose]:bg-rose-500"></div>
```

If a generated class is unavoidable, make sure the full class token appears in a `text/tailwindcss` block before validation.

## Video-Specific Guardrails

- Use stable dimensions: `w-[...]`, `h-[...]`, `aspect-video`, `grid`, `flex`, and fixed padding for video layouts.
- Prefer transforms and opacity for animated properties.
- Keep Tailwind transitions out of render-critical timing unless a seekable runtime owns the state.
- Avoid hover, focus, scroll, viewport, or pointer variants for content that must render deterministically.
- Use explicit border colors. Tailwind v4 changed the default border behavior from v3, so `border border-white/20` is safer than bare `border`.
- Use v4 utility names: `shadow-xs`, `rounded-xs`, `outline-hidden`, `shrink-*`, and `grow-*` where those replacements apply.
- Be careful with modern CSS utilities if the output needs older browser support. Tailwind v4 targets modern browsers.

## Validation

After editing a Tailwind-enabled composition:

```bash
npx hyperframes lint
npx hyperframes validate
npx hyperframes inspect
```

For a render proof:

```bash
npx hyperframes render . --workers 1 --quality draft --output tailwind-proof.mp4
```

The validation path should show no missing-style flashes on frame 0. If styles appear in preview but not render, check that `window.__tailwindReady` exists and resolves before capture.

## Quick Debug Checklist

1. Confirm the project was scaffolded with `hyperframes init --tailwind`.
2. Confirm the script points to `@tailwindcss/[email protected]`.
3. Confirm `window.__tailwindReady` is present.
4. Replace v3 `@tailwind` directives with v4 browser-runtime CSS.
5. Move custom tokens from `tailwind.config.js` to `@theme`.
6. Replace dynamically assembled classes with complete static tokens.
7. Run `npx hyperframes validate` and render a short proof.

## Credits And References

- Tailwind CSS official v4 installation, upgrade, and compatibility docs: https://tailwindcss.com/docs
- Tailwind CSS v4 release notes: https://tailwindcss.com/blog/tailwindcss-v4
- Community Tailwind skills were reviewed for v4 gotchas and skill shape, but this skill keeps the durable contract in-repo and HyperFrames-specific.

© boraoztunc · Apache-2.0 · boraoztunc/skills

Similar skills

All skills for Frontend and UI →

tailwind by other authors comes first.

tailwind PyModel A skill for Claude Code and Codex covering Tailwind CSS v4 styling and configuration. Agents consult its 42 rules for build setups, @theme tokens, and CSS bundle tuning. CX Codex +1 671installs tailwind bobmatnyc A Tailwind CSS reference the agent reads before writing markup: utility classes, breakpoints, dark mode, config. Useful when components should follow the framework's own idioms. CX Codex +1 277installs tailwind oakoss A Tailwind CSS v4 skill for themes, components, dark mode, container queries, v3 migrations, shadcn/ui, and build troubleshooting. CX Codex +1 233installs tailwind-responsive-ui pproenca tailwind-responsive-ui — a skill for Claude and other AI editors that helps turn Tailwind CSS interfaces into layouts that work on mobile and desktop. CX Codex +1 480installs tailwind-ui-refactor pproenca tailwind-ui-refactor — a skill that refactors HTML with Tailwind utility classes: hierarchy, spacing, typography, color. Useful when you build UI without a designer on hand. CX Codex +1 474installs frontend-tailwind-best-practices sergiodxa frontend-tailwind-best-practices is a Claude Code skill with 10 Tailwind CSS rules for component styling, covering stack utilities, gap spacing, dark color schemes, and className merging. CX Codex +1 470installs tailwind-css manutej A Tailwind CSS skill covering utility classes, responsive variants, dark mode and production optimization. Handy when you build UI and want to stay in your markup. CX Codex +1 464installs Tailwind CSS taste f Tailwind CSS taste is a prompt for ChatGPT, Claude.ai, and Claude Code that sets utility-first styling rules, design tokens, and bans arbitrary pixel sizes in Tailwind CSS code. GP ChatGPT ★ 178,201repo stars hyva-compile-tailwind-css hyva-themes hyva-compile-tailwind-css builds Tailwind CSS stylesheets for Hyvä themes in Magento 2. It triggers production builds or watch mode when updated utility classes fail to render on the storefront. CX Codex +1 1,300installs

From the same set22

The whole set →

Project sponsors

Companies that keep this analytics open