react-native-cursor-rules — скилл для Claude Code: правила React
Набор правил React Native для ИИ-агента: TypeScript, функциональные компоненты, оптимизация ререндеров и FlatList. Пригодится, когда агент пишет код для мобильного приложения.
npx skills add Mindrally/skills --skill react-native-cursor-rules -a claude-codeЧто делает react-native-cursor-rules
Скилл подкладывает агенту свод правил по React Native: как писать типизированный TypeScript, какие соглашения об именах держать, как организовать файлы по фичам. Внутри — разделы про код-стиль, нейминг, TypeScript, производительность, стилизацию и общие практики.
По производительности правила конкретные: меньше useEffect и useState в рендере, React.memo() для компонентов со статичными пропсами, у FlatList — removeClippedSubviews, maxToRenderPerBatch, windowSize и getItemLayout для одинаковых по высоте элементов. Анонимные функции в renderItem и обработчиках не приветствуются, потому что они ломают мемоизацию. Стили — через StyleSheet.create() или Styled Components, картинки советует оптимизировать через react-native-fast-image.
Правила написаны под конкретный стек: TypeScript со строгим режимом в tsconfig.json, функциональные компоненты вместо классов, React Navigation для навигации и диплинков, Expo с EAS Build и OTA-обновлениями. Если у вас классовые компоненты или голый JavaScript, часть советов мимо. Ставится одной командой через npx skills add.
Какие задачи решает
- писать типизированные компоненты на TypeScript без
any - убрать лишние ререндеры через
React.memo()и мемоизацию - настроить FlatList так, чтобы длинные списки не тормозили
- разложить файлы по фичам, а не по типам
- договориться об именах компонентов, переменных и папок
Примеры запросов агенту
- добавь экран профиля на React Native с типами для пропсов
- почему этот FlatList лагает при скролле — проверь по правилам скилла
- отрефактори компонент: вынеси стили в StyleSheet.create и убери анонимные функции
Как установить react-native-cursor-rules
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a claude-code2Вручную: положить файлы
~/.claude/skills/react-native-cursor-rules/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/react-native-cursor-rules/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a codex2Вручную: положить файлы
.agents/skills/react-native-cursor-rules/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a cursor2Вручную: положить файлы
.cursor/skills/react-native-cursor-rules/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills react-native-cursor-rules2Вручную: положить файлы
.github/skills/react-native-cursor-rules/SKILL.md1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a gemini-cli2Командой платформы
gemini skills install https://github.com/Mindrally/skills --path react-native-cursor-rulesВручную: положить файлы
.devin/skills/react-native-cursor-rules/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора168
Похожие
Рядом в теме «Мобильная разработка»
Всё по теме «Мобильная разработка» →Вопросы о react-native-cursor-rules
Как установить react-native-cursor-rules в Claude?
Выполните npx skills add Mindrally/skills --skill react-native-cursor-rules -a claude-code. Файл скилла окажется по пути ~/.claude/skills/react-native-cursor-rules/SKILL.md.
Что делает react-native-cursor-rules?
Задаёт агенту правила разработки на React Native: типизация, функциональные компоненты и хуки, нейминг, оптимизация производительности и стилизация.
С какими платформами работает этот скилл?
Кроме Claude есть установка для Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode — у каждой своя команда и свой путь к файлу скилла.
Исходный текст
SKILL.md · Apache-2.0
--- name: react-native-cursor-rules description: React Native development best practices for TypeScript, functional components, performance optimization, and styling guidelines. metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # React Native Cursor Rules Expert guidelines for React Native development by Will Sims, focusing on type-safe TypeScript code, performance optimization, and maintainable component architecture. ## Code Style and Structure - Write concise, type-safe TypeScript code - Use functional components and hooks instead of class components - Ensure components are modular, reusable, and maintainable - Organize files by feature, grouping related components, hooks, and styles ## Naming Conventions - Use camelCase for variables and functions (e.g., `isFetchingData`, `handleUserInput`) - Use PascalCase for components (e.g., `UserProfile`, `ChatScreen`) - Directory names should be lowercase and hyphenated (e.g., `user-profile`, `chat-screen`) ## TypeScript Usage - Use TypeScript for all components, favoring interfaces for props and state - Enable strict typing in `tsconfig.json` - Avoid `any` type; strive for precise types - Utilize `React.FC` for defining functional components with props ## Performance Optimization - Minimize `useEffect`, `useState`, and heavy computations in render methods - Use `React.memo()` for components with static props to prevent unnecessary re-renders - Optimize FlatLists with the following props: - `removeClippedSubviews` - `maxToRenderPerBatch` - `windowSize` - Use `getItemLayout` for consistent-sized FlatList items - Avoid anonymous functions in `renderItem` or event handlers ## UI and Styling - Use consistent styling via `StyleSheet.create()` or Styled Components - Ensure responsive design for different screen sizes and orientations - Optimize images using `react-native-fast-image` ## Best Practices - Follow React Native's threading model for smooth performance - Utilize Expo's EAS Build and Over-The-Air updates - Use React Navigation for navigation and deep linking
© Mindrally · Apache-2.0 · Mindrally/skills