Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill react-native-cursor-rules -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/react-native-cursor-rules/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/react-native-cursor-rules/

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

Similar skills

Everything for Mobile →

From the same set168

langchain-development Gives your agent a rulebook for LangChain and LangGraph work in Python: chain composition, agents, memory, RAG. Useful once a Python LLM project outgrows one file. CX Codex +1 681installs apollo-graphql A skill that gives the agent rules for Apollo Client work: queries, mutations, fragments, caching and optimistic updates in React GraphQL apps. CX Codex +1 677installs monorepo-tamagui Gives your agent a rulebook for cross-platform monorepos built on Tamagui, Turbo, Next.js, Expo and Supabase. Useful when web and mobile apps share one repo. CX Codex +1 677installs swiftui-development A rule pack that keeps your coding agent on MVVM, modern state management and Swift 6 concurrency when it writes SwiftUI. CX Codex +1 676installs netlify-development A skill that gives your agent Netlify build and deploy rules: serverless and edge functions, Blobs, Image CDN, build config. Useful when it writes functions or edits netlify.toml. CX Codex +1 665installs viewcomfy-api-rules Guides an agent through wiring the ViewComfy API into a Python and FastAPI web app: flatten workflow params, call the endpoint, save the returned files. CX Codex +1 663installs salesforce-development A skill that gives your agent Salesforce coding rules: Apex, triggers, Lightning Web Components, SOQL and metadata. Useful when you build on the platform and want the agent to respect its limits. CX Codex +1 659installs graphql-development A skill that gives the agent GraphQL guidelines: schema design, type-safe clients, React and Next.js integration. Useful when it writes resolvers and queries. CX Codex +1 661installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor