One-click install
npx skills add https://github.com/FilenCloudDienste/filen-ts --skill typescript-react-perf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-react-perf
Source: https://github.com/FilenCloudDienste/filen-ts/tree/main/.claude/skills/typescript-react-perf
Command: npx skills add https://github.com/FilenCloudDienste/filen-ts --skill typescript-react-perf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents performance regressions in hot TypeScript/React/React Native code by enforcing allocation- and monomorphism-friendly patterns and project-specific React Compiler rules.

Core Features & Use Cases

  • Zero-waste TypeScript code: keeps object shapes monomorphic, avoids hidden-class mutations, and reduces unnecessary allocations in tight loops.
  • Correct data structures: recommends Map/Set for O(1) lookup, typed arrays for numeric data, and avoids costly patterns like Array.shift().
  • React performance aligned to this project: discourages manual memo/useMemo/useCallback when React Compiler is enabled, enforces stable keys, and avoids inline objects in JSX.
  • React Native / Hermes guidance: favors Reanimated worklets, gesture-handler usage, FlashList for large lists, and avoids generators/Proxy on Hermes for speed.
  • Common anti-pattern prevention: covers prop mutation, unstable keys, inline allocations in JSX, and hot-path inefficiencies.

Quick Start

Use this skill when reviewing or writing TypeScript, React, or React Native code that runs frequently and must stay fast.

Frequently Asked Questions about typescript-react-perf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize React Native performance on the Hermes engine?

To optimize React Native performance on Hermes, avoid generators and Proxy constructs, use Reanimated worklets for UI-thread tasks, and rely on FlashList for large list rendering.

Do I need useMemo and useCallback when using the React Compiler?

When using the React Compiler, you should avoid manual memoization with useMemo and useCallback unless truly necessary, as the compiler handles optimizations automatically.

How do I prevent hidden class mutations in TypeScript hot paths?

To prevent hidden class mutations in TypeScript hot paths, maintain monomorphic object shapes, avoid dynamic property additions, and minimize unnecessary allocations in tight loops.

What is the best way to handle large lists in React Native?

The best way to handle large lists in React Native is using FlashList, paired with stable keys and non-inline JSX objects to enforce React Compiler constraints and avoid rendering bottlenecks.

Why does using Array.shift cause performance issues in TypeScript?

Using Array.shift causes performance issues because it triggers costly array re-indexing, whereas using Map or Set for O(1) lookups and typed arrays for numeric data maintains allocation efficiency.

What are common React anti-patterns that cause inline allocation inefficiencies?

Common React anti-patterns causing inline allocation inefficiencies include inline objects in JSX, prop mutations, and unstable keys, which disrupt monomorphic shapes and trigger unnecessary re-renders.