← スキル一覧に戻る

react-classlist
by ahkohd
dotfiles
⭐ 4🍴 0📅 2026年1月18日
SKILL.md
name: react-classlist description: Organize long or disorganized className attributes in React components into semantic groups using cn() or className
React ClassName Organizer
Organize className attributes in React components for readability and maintainability.
When to trigger
Refactor className when:
- Single-line className exceeds 80-100 characters
- Disorganized
cn()orclassList()calls exist - User explicitly requests className organization
Instructions
-
Choose utility function:
- Use
cn()if already imported in the file - Otherwise, use standard
className
- Use
-
Break into multiple lines:
- Each line should be semantically grouped
- Lines should not exceed ~80 characters
- Keep responsive modifiers with their base class
-
Group classes in this order:
- Layout (flex, grid, position type)
- Spacing (gap, padding, margin)
- Sizing (width, height, min/max)
- Display & visibility
- Typography (font, text-*)
- Colors & backgrounds
- Borders & effects
- Positioning values (top, left, z-index)
- Transitions & animations
- Responsive variants (keep with base class)
-
Format:
// Before: className="overflow-y-auto max-h-[50vh] md:max-h-auto flex-col gap-4 md:gap-2 pt-2 w-full md:w-auto" // After: className=cn( 'flex-col gap-4 md:gap-2 pt-2', 'w-full md:w-auto max-h-[50vh] md:max-h-auto', 'overflow-y-auto scrollbar-hide' ) -
Keep together:
- Responsive modifiers with base:
'w-full md:w-auto' - Related utilities:
'flex items-center justify-between'
- Responsive modifiers with base:
Tool access
allowed-tools:
- Read
- Edit
- Grep
Notes
- Preserve all existing classes
- Maintain semantic grouping over strict alphabetical order
- Each line should be readable and cohesive
スコア
総合スコア
45/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です

