agentleFS
youhei-ushioyouhei-ushio/dotclaude-public/skills/global/tailwind-enforcement/SKILL.md

tailwind-enforcement

Skill1 starsChanged 2 months agoMITView on GitHub

HTML / テンプレート / JSX / Vue SFC / Blade / Livewire コンポーネント等、 UI 要素を編集するとき。style 属性を書こうとしているとき。スタイル指定のたびに参照。

The file

Files
SKILL.md

Tailwind CSS 必須ルール

HTML 要素のスタイル指定は必ず Tailwind CSS の class 属性を使う。 style 属性によるインラインスタイルは禁止。

例

NG:

<div style="background-color: #3b82f6; padding: 16px; color: white;">

OK:

<div class="bg-blue-500 p-4 text-white">

例外(style 属性が許可される場合)

動的な色表示

DB から取得した色値を直接表示する場合のみ:

<div style="background-color: {{ $category['color_code'] }}"></div>

Tailwind では表現不可能な動的スタイル

計算値や外部 API からの値をそのまま CSS に流す必要がある場合のみ。

適用対象

  • すべての HTML / テンプレートファイル(Blade / JSX / Vue SFC / ERB 等)
  • 既存コードの修正時も必ず適用

理由

  • デザインシステムの一貫性
  • メンテナンス性
  • レスポンシブ対応の統一
  • パフォーマンス最適化

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.