本文へ移動
cccskills
無料GitHub で公開

tailwind

Use when writing or reviewing any CSS class, changing colors, modifying globals.css, or when hardcoded colors or inline styles are detected.

日本語の概要は準備中です。原文の説明を表示しています。

holger1411/astrodeckスター 80(GitHub 80 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(2)

  • SKILL.md3.0 KB
  • LEARNINGS.md734 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Tailwind CSS Skill

Canonical Sources

This skill references the following globals — read them BEFORE starting work:

  • system/globals/colors.md — OKLCH palette, token table, color semantics
  • system/globals/effects.md — Border radius, shadows, card pattern

Domain

Tailwind v4 Expertise, @theme Directive, OKLCH, Utilities, Dark Mode

KPIs

MetricTargetMeasurement
Hardcoded Colors0npm run check:kpis
Inline Styles0npm run check:kpis
tailwind.config.mjsmust not existnpm run check:kpis

npm run check:kpis (.claude/scripts/check-kpis.mjs) is the single source of truth for these checks — do not re-implement them with ad-hoc greps. The convention guard hook additionally warns when a change introduces hardcoded colors or inline styles.

Rules

Tailwind v4 Setup

AstroDeck uses Tailwind CSS v4 via @tailwindcss/vite (NOT @astrojs/tailwind).

  • No tailwind.config.mjs — config lives in CSS
  • @theme directive for token registration
  • .dark class for dark mode overrides

@theme vs .dark

/* Token registration (Tailwind recognizes these as utilities) */
@theme {
  --color-primary: oklch(11.2% 0.0079 286.75);
  --color-primary-foreground: oklch(100% 0 0);
}

/* Dark mode overrides (only change values, no new tokens) */
.dark {
  --color-primary: oklch(100% 0 0);
  --color-primary-foreground: oklch(11.41% 0.0079 286.75);
}

Dark Mode Pattern

Do NOT control colors with dark: prefix. Use CSS variables that automatically override in .dark:

<!-- Wrong -->
<div class="bg-white dark:bg-gray-900 text-black dark:text-white">

<!-- Correct -->
<div class="bg-background text-foreground">

Utility Patterns

/* Responsive (mobile-first) */
text-base md:text-lg lg:text-xl

/* Hover/Focus states */
hover:bg-primary/90 focus:ring-2 focus:ring-ring

/* Transitions */
transition-colors duration-200

/* Dark mode (automatic via CSS variables) */
bg-background text-foreground  /* works in both modes */

Non-Negotiable

These rules always apply — even under time pressure, even for "just a quick fix":

  • No hardcoded colors. bg-blue-500 is never "just temporary" — it gets forgotten and breaks on the next theme change.
  • No inline styles. Not even "just for this special case." Tailwind utilities cover everything.
  • OKLCH only. "HSL is more readable" is not an argument — the entire design system is based on OKLCH. Mixing destroys color consistency.
  • No tailwind.config.mjs. Not even "because a package expects it." Config lives in CSS via @theme.
  • No @astrojs/tailwind. AstroDeck uses @tailwindcss/vite. The old integration is incompatible with Tailwind v4.

Before Applying

Read LEARNINGS.md in this directory to avoid known anti-patterns.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Use when creating or modifying any UI element visible to the user, reviewing HTML markup, adding interactive elements, or when Lighthouse Accessibility drops below 90.

日本語の概要は準備中です。原文の説明を表示しています。

holger1411/astrodeck802026年9月5日 更新

astro

無料

Use when creating or modifying .astro/.tsx files, configuring astro.config.mjs, working with Content Collections, or when TypeScript or build errors occur.

日本語の概要は準備中です。原文の説明を表示しています。

holger1411/astrodeck802026年9月5日 更新

Use when creating or editing pages, blog posts, or content files, adding meta tags, or when Lighthouse SEO drops below 90.

日本語の概要は準備中です。原文の説明を表示しています。

holger1411/astrodeck802026年9月5日 更新

qa

無料

Use when completing any task (final validation step), running audits, preparing for deployment, or when ESLint/TypeScript/build errors occur.

日本語の概要は準備中です。原文の説明を表示しています。

holger1411/astrodeck802026年9月5日 更新

readme

無料

Use when starting work on an AstroDeck project, needing to understand the project structure, or looking up available components, sections, and layouts.

日本語の概要は準備中です。原文の説明を表示しています。

holger1411/astrodeck802026年9月5日 更新

ui-design

無料

Use when creating or modifying any visible UI element, adjusting spacing or typography, reviewing visual consistency, or when Lighthouse Performance drops below 90.

日本語の概要は準備中です。原文の説明を表示しています。

holger1411/astrodeck802026年9月5日 更新

holger1411 のスキルをすべて見る

このスキルの問題を報告する