react-component-dev
БесплатноБез исполняемых скриптовНе проверенReact/TypeScript component development guidelines for Gemini-Subtitle-Pro. Use when creating components, pages, modals, forms, or working with TailwindCSS…
от corvo007★ 850 звёзд на GitHubОб этом скилле
React Component Development Guidelines
Purpose
Establish consistency and best practices for React components in Gemini-Subtitle-Pro using React 19, TypeScript 5.8, and TailwindCSS 4.
When to Use This Skill
Automatically activates when working on:
- Creating or modifying React components
- Building pages, modals, dialogs, forms
- Styling with TailwindCSS
- Working with React hooks
- Implementing state management
- Performance optimization
Quick Start
New Component Checklist
- Location: Place in
src/components/[feature]/ - TypeScript: Define proper props interface
- Styling: Use TailwindCSS with
clsxandtw-merge - Path Aliases: Use
@components/*,@hooks/*, etc. - State: Use appropriate state pattern (local, context, etc.)
- i18n: Use
useTranslationfor all user-facing text
Component Architecture
File Organization
src/components/
├── common/ # Shared components (Button, Modal, etc.)
├── layout/ # Layout components (Header, Sidebar, etc.)
├── subtitle/ # Subtitle-related components
├── settings/ # Settings components
├── workspace/ # Workspace components
└── [feature]/ # Feature-specific components
Naming Conventions
- Components:
PascalCase-SubtitleEditor.tsx - Hooks:
camelCasewithuseprefix -useSubtitleParser.ts - Utils:
camelCase-formatTimestamp.ts
Core Principles
1. Always Use Path Aliases
// ❌ NEVER: Relative paths
import { Button } from '../../components/common/Button';
// ✅ ALWAYS: Path aliases
import { Button } from '@components/common/Button';
import { useWorkspace } from '@hooks/useWorkspace';
import { SubtitleEntry } from '@types/subtitle';
2. Define Props Interface
// ✅ ALWAYS: Clear prop types
interface SubtitleEditorProps {
entries: SubtitleEntry[];
onUpdate: (index: number, entry: SubtitleEntry) => void;
isReadOnly?: boolean;
}
export function SubtitleEditor({ entries, onUpdate, isReadOnly = false }: SubtitleEditorProps) {
// ...
}
3. Use TailwindCSS with clsx
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
// ✅ Conditional classes
<div className={twMerge(clsx(
'rounded-lg p-4',
isActive && 'bg-blue-500 text-white',
isDisabled && 'opacity-50 cursor-not-allowed'
))}>
4. Use i18n for All Text
import { useTranslation } from 'react-i18next';
export function SettingsPanel() {
const { t } = useTranslation();
return (
<h1>{t('settings.title')}</h1>
);
}
Resource Files
For detailed guidelines, see the resources directory:
- component-patterns.md - Component design patterns
- styling-guide.md - TailwindCSS styling patterns
- hooks-patterns.md - Custom hooks patterns
- performance.md - Performance optimization
Установить react-component-dev в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл react-component-dev?
React/TypeScript component development guidelines for Gemini-Subtitle-Pro. Use when creating components, pages, modals, forms, or working with TailwindCSS, hooks, and React 19 patterns. Covers component architecture, styling with Tailwind, state management, performance optimization, and accessibility.
Как установить скилл react-component-dev?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл react-component-dev запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic