agentleFS
MindrallyMindrally/skills/react-native-cursor-rules/SKILL.md

react-native-cursor-rules

Skill275 starsChanged 52 days agoApache-2.0View on GitHub

React Native development best practices for TypeScript, functional components, performance optimization, and styling guidelines.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write concise, type-safe TypeScript code

    line 15
  2. Distinctive:

    Use functional components and hooks instead of class components

    line 16
  3. Distinctive:

    Ensure components are modular, reusable, and maintainable

    line 17
  4. Very specific:

    Use camelCase for variables and functions (e.g., isFetchingData, handleUserInput)

    line 22
  5. Very specific:

    Use PascalCase for components (e.g., UserProfile, ChatScreen)

    line 23
  6. Distinctive:

    Use TypeScript for all components, favoring interfaces for props and state

    line 28
  7. Very specific:

    Avoid any type; strive for precise types

    line 30
  8. Very specific:

    Use React.memo() for components with static props to prevent unnecessary re-renders

    line 36
  9. Very specific:

    Use getItemLayout for consistent-sized FlatList items

    line 41
  10. Very specific:

    Avoid anonymous functions in renderItem or event handlers

    line 42
  11. Very specific:

    Use consistent styling via StyleSheet.create() or Styled Components

    line 46
  12. Distinctive:

    Ensure responsive design for different screen sizes and orientations

    line 47
  13. Distinctive:

    Follow React Native's threading model for smooth performance

    line 52
  14. Distinctive:

    Use React Navigation for navigation and deep linking

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.