Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

optimising-expo-react-native-performanceoptimising expo React native 性能

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,042

周安装

43

GitHub Stars

公开资料未说明

下载量

341
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:optimising-expo-react-native-performance(optimising expo React native 性能)
来源仓库:https://github.com/tristanmanchester/agent-skills
仓库路径:skills/optimising-expo-react-native-performance
安装命令:
npx skills add https://github.com/tristanmanchester/agent-skills --skill optimising-expo-react-native-performance
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tristanmanchester/agent-skills --skill optimising-expo-react-native-performance

简介

将性能问题转化为可测量、可复现的 React Native 优化流程。

  • 适用于 Expo 管理应用的启动速度、滚动流畅度和内存控制。
  • 基于 KPI 基线定位瓶颈,输出修复计划与回归预防方案。
  • 需配合本地构建环境和设备实测数据进行验证。optimising-expo-react-native-performance 属于前端设计类 Skill,可作为该场景下的辅助能力补充。
  • 禁止在未量化指标前进行微观优化或无回滚路径修改。

SKILL.md

Summary

This skill turns “the app feels slow/janky” into a measured, repeatable, and shippable optimisation program for Expo-managed React Native apps.

Non‑negotiables:

  • Optimise against user-visible KPIs (startup/TTI, scroll FPS, navigation responsiveness, memory growth, p95 network latency).
  • Profile in production-like builds (release / profile / debugOptimized) — not in dev mode.
  • Make one change at a time, re-measure, and keep a rollback path.

When to use

Use when you need to:

  • Fix slow startup, “white screen”, or delayed time-to-interactive.
  • Fix scroll jank, dropped frames, sluggish taps, or slow transitions.
  • Reduce memory growth, crashes under pressure, or image/video bloat.
  • Reduce OTA update size, JS bundle size, or Android binary size.
  • Add regression prevention: perf budgets + CI gates + production monitoring.

When NOT to use

Don’t use this skill to:

  • Prematurely micro-optimise already-smooth screens with no KPI regression.
  • Make changes without a reproducible scenario and a baseline.
  • “Optimise” by switching libraries blindly (measure first).

Inputs

  • Repo (Expo managed or CNG/prebuild), ideally with:

- package.json - app.json / app.config.* - metro.config.js (if present) - babel.config.* - eas.json (if using EAS)

  • A concrete report of the problem:

- Device(s), OS versions, and which flow feels slow. - Steps to reproduce (or a screen name if using Expo Router).

If details are missing, infer as much as possible from the repo and propose a minimal repro script.

Outputs

Deliver both:

  1. Perf audit report (see template in assets/templates/perf-audit-report-template.md):

- KPIs + budgets - Baseline measurements (device + build type) - Root cause hypothesis + evidence - Fix plan (ordered by ROI / risk) - Before/after measurements

  1. Code changes (PR-ready) implementing the top fixes, plus:

- Updated perf budgets (if needed) - CI gate(s) for bundle/update size at minimum

Tooling assumptions

You can use:

  • Expo CLI (npx expo …), EAS CLI (eas …) where available.
  • React Native DevTools (Performance + Memory panels) for JS-level analysis.
  • Native profilers (Android Studio, Xcode Instruments) for CPU/memory/UI tracing.

You should prefer:

  • Release/profile builds for measurement.
  • Same device class and same scenario script for before/after.

The optimisation workflow (high level)

  1. Define KPIs + budgets (3–6 metrics max). Pick what users feel.
  2. Create a repeatable scenario (startup, list scroll, key navigation, etc.).
  3. Measure baseline in a production-like build.
  4. Classify the bottleneck domain:

- Startup/bundle - JS thread - UI thread - Lists/images - Memory - Network/background

  1. Apply targeted fixes (smallest change, highest ROI first).
  2. Re-measure. Keep only changes with KPI wins.
  3. Add regression control (budgets + CI gates + monitoring).

Detailed playbook

Phase 0 — Establish reality (no guesswork)

0.1 Identify versions and architecture

  • Expo SDK version, React Native version, React version.
  • New Architecture status (mandatory in newer SDKs).
  • JS engine (Hermes/JSC/V8), OTA updates usage (expo-updates).
  • Major perf-sensitive libs: navigation (Expo Router/React Navigation), lists (FlashList), animation (Reanimated), images (expo-image).

0.2 Choose KPIs (pick 3–6) Suggested defaults:

  • Cold start: time-to-first-render and/or time-to-interactive
  • Scroll: dropped frames / FPS on the heaviest list
  • Navigation: p95 screen transition time for a representative flow
  • Memory: steady-state RSS after repeating a navigation loop 5–10×
  • Network: p95 API latency on a key endpoint

Record budgets as numbers (not “fast”). See references/00-principles-and-kpis.md.

0.3 Choose build type for measuring

  • Prefer store-equivalent Release.
  • If you need debuggability, use Android “profileable” builds, iOS Instruments, or Expo’s debugOptimized where applicable.

Phase 1 — Baseline measurement (release-build discipline)

1.1 Baseline checklist (must pass)

  • Dev mode off.
  • No remote JS debugging.
  • Same device, same OS version, same network conditions.
  • Warm vs cold start explicitly noted.

1.2 Capture traces and numbers

  • React Native DevTools:

- Performance trace (JS execution + React tracks + network events) - Heap snapshot (if memory suspected)

  • Native tools:

- Android Studio System Trace for jank attribution - Xcode Instruments (Time Profiler / Allocations / Leaks)

Store raw artefacts (trace files, screenshots) alongside your report.

Phase 2 — Decide the bottleneck domain

Use this decision rubric:

  • Startup slow: long splash, white screen, slow first render → startup/bundle.
  • Taps lag / transitions slow but scrolling OK → JS thread or navigation.
  • Scroll stutters even with little JS work → UI thread or list/render cost.
  • Memory climbs over time → leak / image/video pressure.
  • Everything waits on API → network/caching.

Phase 3 — Apply high-ROI fixes by domain

A) Startup & bundle

Do in this order:

  1. Stop doing work before first paint

- Gate only critical assets (fonts, tiny config) and hide splash ASAP.

  1. Confirm Hermes

- Make it explicit in app config if necessary. - If you use OTA updates, ensure runtime compatibility when engine/bytecode changes.

  1. Shrink JS evaluation

- Prefer ESM imports, avoid breaking tree shaking. - Consider Metro inlineRequires (validate side effects!).

  1. Control OTA payloads

- Configure update asset inclusion/exclusion and verify assets.

  1. Android size knobs (measure trade-offs)

- Enable R8 minify + resource shrinking. - Treat bundle compression as a measured toggle (smaller APK vs slower startup).

See references/02-startup-bundle-ota.md.

B) JS thread stalls (renders + computation)

High ROI:

  1. Remove production console.*.
  2. Defer heavy work with InteractionManager / requestAnimationFrame.
  3. Reduce re-renders:

- Stabilise props, split context, memoise hot rows. - Consider React Compiler (branch rollout + profiling + easy rollback).

See references/03-rendering-js-ui.md.

C) UI thread / rendering / animations

High ROI:

  1. Prefer native-driven transitions (native stack / react-native-screens).
  2. Avoid expensive UI operations on animated frames:

- Alpha compositing, heavy shadows, animating image size.

  1. Use native-driver animations where possible; for complex gestures prefer Reanimated worklets.

See references/03-rendering-js-ui.md.

D) Lists, images, and media

High ROI:

  1. Fix list fundamentals:

- Stable keys, avoid re-render storms, tune render window. - Add getItemLayout when item heights are known.

  1. If still janky: evaluate FlashList for large/complex feeds.
  2. Move image-heavy UIs to expo-image with caching + placeholders.
  3. For replay-heavy video: use expo-video caching with a storage policy.

See references/04-lists-images-media.md.

E) Memory leaks / pressure

High ROI:

  1. Reproduce with a navigation stress loop.
  2. Take JS heap snapshots (before/after) to spot retained graphs.
  3. If JS heap stable but RSS grows: switch to native allocation tools.

See references/01-profiling-toolchain.md.

F) Network & background work

High ROI:

  1. Prevent refetch storms: cache + dedupe + prefetch.
  2. Use platform-appropriate background scheduling (best effort) for sync.

See references/05-network-background.md.

Phase 4 — Regression control (the “next level”)

Minimum viable regression control:

  • Budget file committed (bundle size + a few KPI thresholds).
  • CI gate that fails on obvious regressions (bundle/update size growth).
  • Production monitoring (crash + perf traces) with symbolication.

See references/06-ci-regression.md.

Common pitfalls (things this skill forbids)

  • Benchmarking in dev mode and trusting the results.
  • Making 5 optimisations at once, then not knowing which mattered.
  • “Fixing” a symptom (e.g. bigger splash delay) instead of root cause (slow JS eval).
  • Turning on size flags (bundle compression, aggressive shrinking) without measuring startup and runtime.

Fast checklist

  • KPIs chosen (3–6) + budgets written down
  • Baseline measured in production-like build
  • Bottleneck domain identified with evidence
  • One fix at a time + before/after numbers
  • At least one regression gate added (bundle/update size)
  • Monitoring configured (crash + perf)

References

Start here:

  • references/00-principles-and-kpis.md
  • references/01-profiling-toolchain.md
  • references/02-startup-bundle-ota.md
  • references/03-rendering-js-ui.md
  • references/04-lists-images-media.md
  • references/06-ci-regression.md

External links: see references/resources.md.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.99%
按下载量换算136

Claude

27.96%
按下载量换算95

Cursor

19.48%
按下载量换算66

Gemini CLI

9.35%
按下载量换算32

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills