react-native-cursor-rules — Claude Code skill: React Native rules
A rule set that tells your coding agent how to write React Native: typed TypeScript, functional components, fewer re-renders, tuned FlatLists.
npx skills add Mindrally/skills --skill react-native-cursor-rules -a claude-codeWhat react-native-cursor-rules does
The skill hands your agent a written set of React Native conventions: type-safe TypeScript, functional components and hooks over classes, files grouped by feature rather than by type. It covers code style, naming, TypeScript usage, performance, styling and general practice.
The performance section is the concrete part. Keep useEffect, useState and heavy work out of render, wrap components with static props in React.memo(), and tune FlatList with removeClippedSubviews, maxToRenderPerBatch, windowSize and getItemLayout when rows share a height. Anonymous functions in renderItem or event handlers are called out as a problem, since they defeat memoization. Styling goes through StyleSheet.create() or Styled Components, and images are meant to be optimized with react-native-fast-image.
These rules assume a specific stack: strict TypeScript in tsconfig.json, functional components, React Navigation for navigation and deep linking, Expo with EAS Build and over-the-air updates. On a class-component or plain-JavaScript codebase a good chunk of the advice won't apply. Install is one command through npx skills add.
What it helps with
- write typed components without falling back to
any - cut unnecessary re-renders with
React.memo()and memoized callbacks - tune a FlatList so long lists scroll without stutter
- group files by feature instead of by file type
- settle naming for components, variables and directories
Example prompts for the agent
- add a profile screen in React Native with typed props
- why does this FlatList stutter while scrolling — check it against the skill rules
- refactor this component: move styles into StyleSheet.create and drop the anonymous handlers
How to install react-native-cursor-rules
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a claude-code2Manually: put the files in place
~/.claude/skills/react-native-cursor-rules/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/react-native-cursor-rules/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a codex2Manually: put the files in place
.agents/skills/react-native-cursor-rules/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a cursor2Manually: put the files in place
.cursor/skills/react-native-cursor-rules/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills react-native-cursor-rules2Manually: put the files in place
.github/skills/react-native-cursor-rules/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path react-native-cursor-rulesManually: put the files in place
.devin/skills/react-native-cursor-rules/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill react-native-cursor-rules -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about react-native-cursor-rules
How do I install react-native-cursor-rules in Claude?
Run npx skills add Mindrally/skills --skill react-native-cursor-rules -a claude-code. The skill lands at ~/.claude/skills/react-native-cursor-rules/SKILL.md.
What does react-native-cursor-rules do?
It gives the agent React Native development rules: TypeScript typing, functional components and hooks, naming conventions, performance work and styling.
Which platforms can install this skill?
Besides Claude, there are install paths for Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode, each with its own command and skill file location.
Source text
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