css-development-create-component
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when creating new styled components or adding new CSS classes. Triggers on "create component", "new button", "new card", "add…
Об этом скилле
CSS Development: Create Component
Overview
Guides you through creating new CSS components following established patterns:
- Semantic class naming
- Tailwind utility composition via
@apply - Dark mode support by default
- Test coverage (static CSS + component rendering)
- Composition over creation (reuse existing classes)
This is a sub-skill of css-development - typically invoked automatically via the main skill.
When This Skill Applies
Use when:
- Creating a new styled component (button, card, form field, etc.)
- Adding new semantic CSS classes to components.css
- Building reusable UI patterns
- Need to ensure dark mode support and test coverage
Pattern Reference
This skill follows the patterns documented in the main css-development skill. Key patterns:
Semantic naming: .button-primary not .btn-blue
Tailwind composition: Use @apply to compose utilities
Dark mode: Include dark: variants by default
Composition first: Check if existing classes can be combined
Test coverage: Static CSS tests + component rendering tests
Workflow
When this skill is invoked, create a TodoWrite checklist and work through it step-by-step.
Announce Usage
First, announce that you're using this skill:
"I'm using the css-development:create-component skill to guide creating this new CSS component."
Create TodoWrite Checklist
Use the TodoWrite tool to create this checklist:
Creating CSS Component:
- [ ] Survey existing components (read components.css)
- [ ] Check if composition solves it (can existing classes combine?)
- [ ] Identify component type (atom/molecule/organism if new class needed)
- [ ] Choose semantic name (follow existing naming patterns)
- [ ] Write component class (use @apply, include dark: variants)
- [ ] Create markup integration (show React/HTML usage)
- [ ] Write static CSS test (verify class exists)
- [ ] Write component rendering test (verify className application)
- [ ] Document component (add usage comment)
Step-by-Step Details
Step 1: Survey Existing Components
Action: Use the Read tool to read styles/components.css
Purpose: Understand what already exists to ensure consistency and identify reuse opportunities
What to look for:
- Similar components that could be composed
- Existing naming patterns to follow
- Common patterns (button variants, card styles, etc.)
Mark as in_progress before starting, mark as completed when done.
Step 2: Check if Composition Solves It
Action: Analyze if combining existing classes achieves the goal
Examples:
- Want a "primary button with icon"? → Combine
.button-primary+ spacing utilities - Want a "card with shadow"? → Use
.cardif it exists, add utility class if needed - Want a "highlighted badge"? → Combine
.badge+ color utilities
YAGNI principle: Only create a new class if composition doesn't work or creates excessive duplication in markup.
Decision:
- If composition works: Document the combination and SKIP remaining steps (no new class needed)
- If new class needed: Continue to Step 3
Mark as completed when decision is made.
Step 3: Identify Component Type
Action: Determine atomic design level (if creating new class)
Atoms - Basic building blocks:
- Single-purpose elements
- Examples:
.button,.input,.badge,.spinner,.link
Molecules - Composed components:
- Combine multiple atoms
- Examples:
.card,.form-field,.empty-state,.alert
Organisms - Complex components:
- Multiple molecules + atoms
- Examples:
.page-layout,.navigation,.session-card,.conversation-timeline
Why this matters: Helps scope complexity and dependencies
Mark as completed when type is identified.
Step 4: Choose Semantic Name
Action: Choose a descriptive, semantic class name following existing patterns
Naming patterns from reference codebase:
- Base + variant:
.button-primary,.button-secondary,.button-danger - Component + sub-element:
.card-title,.card-description,.form-field - Context + component:
.session-card,.marketing-hero,.dashboard-layout - State modifiers:
.session-card-active,.button-disabled
Anti-patterns (avoid):
- Utility names:
.btn-blue,.card-sm,.text-big - Abbreviations:
.btn,.hdr,.desc - Generic:
.component,.item,.thing
Validation: Name should clearly indicate purpose and fit existing patterns
Mark as completed when name is chosen.
Step 5: Write Component Class
Action: Create the CSS class in styles/components.css using Edit tool
Template:
/* [Component name] - [Brief description]
Usage: <[element] className="[class-name]">[content]</[element]> */
.[class-name] {
@apply [background-utilities] [dark-variants];
@apply [spacing-utilities];
@apply [typography-utilities];
@apply [transition-utilities];
}
**Required el
Установить css-development-create-component в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл css-development-create-component?
This skill should be used when creating new styled components or adding new CSS classes. Triggers on "create component", "new button", "new card", "add styles", "style component", "build UI element". Guides semantic naming, Tailwind composition, dark mode support, and test coverage.
Как установить скилл css-development-create-component?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл css-development-create-component запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic