К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

argent-react-native-optimization — скилл для Claude Code: запуск

Скилл выявляет узкие места в React Native через замеры и очищает код от механических проблем. Запускается при лагах интерфейса, долгом старте или частых лишних рендерах.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add software-mansion/argent --skill argent-react-native-optimization -a claude-code
Открыть на GitHub

Что делает argent-react-native-optimization

Скилл делит работу на четыре фазы: проверку линтером, семантический аудит, профилирование и контроль регрессий. В первых двух фазах агент распределяет задачи на субагентов по файлам и чек-листам. Все замеры выполняет только главный агент. Субагентам доступ к физическому устройству или симулятору запрещён.

Для замеров скилл подключает argent-react-native-profiler. Он проверяет частоту рендеров через react-profiler-renders и исследует дерево компонентов. Оптимизация наугад здесь запрещена правилами. Если анализатор видит включённый React Compiler, скилл блокирует предложения добавить useCallback или useMemo, пока отсутствие кеша не подтвердится в дереве fiber.

Архитектурные правки проверяются строго по одной. Агент тестирует изменения через debugger-evaluate, проходит экраны через argent-device-interact и проверяет debugger-log-registry на наличие ошибок. Если замер не показывает чистого выигрыша в целевой метрике, изменение немедленно откатывается.

Какие задачи решает

  • устранить просадки кадров и долгий запуск приложения
  • найти горячие компоненты с избыточными повторными рендерами
  • исправить механические ошибки стилей и ключей в списках
  • проверить экраны приложения на сбои и ошибки после правок

Примеры запросов агенту

  • Приложение на React Native тормозит при скролле ленты, оптимизируй его.
  • Запусти аудит производительности экранов оформления заказа.
  • Найди причину частых ререндеров в компоненте профиля.

Как установить argent-react-native-optimization

1Через Skills CLI (Vercel)

npx skills add software-mansion/argent --skill argent-react-native-optimization -a claude-code

2Вручную: положить файлы

~/.claude/skills/argent-react-native-optimization/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/argent-react-native-optimization/

Из того же набора5

Весь набор →

Похожие

dogfood callstack Организует исследовательское тестирование мобильных приложений на iOS и Android через agent-device. Находит баги интерфейса и ошибки сценариев в рантайме. Claude Code CX Codex Cursor +1 11 200установок cmux-architecture manaflow-ai Скилл задаёт правила разделения кода cmux на пакеты Swift, инверсии зависимостей и многопоточности Swift 6. Помогает переносить модули без циклических связей. Claude Code CX Codex Cursor +1 4 800установок apple-hig nexu-io Подключает базу Apple Human Interface Guidelines для iOS, macOS, visionOS, watchOS и tvOS к агенту при проектировании интерфейсов. Claude Code CX Codex Cursor +1 3 200установок vercel-react-native-skills vercel Набор правил по React Native и Expo для ИИ-агента: списки, анимации, навигация. Пригодится, когда агент правит мобильный код и надо, чтобы он делал это одинаково. Claude Code CX Codex Cursor +1 253 900установок animate-expo emilkowalski Создаёт мобильные анимации для React Native и Expo на базе Reanimated и Gesture Handler. Помогает избежать просадок кадров на реальных устройствах. Claude Code CX Codex Cursor +1 135 900установок mobile-native emilkowalski Убирает мелочи, из-за которых веб-приложение на телефоне выдаёт себя: залипающий hover, вспышку при тапе, ошибку с 100vh. Claude Code CX Codex Cursor +1 84 500установок aso coreyhaines31 Анализирует страницы приложений в App Store и Google Play по правилам поисковой оптимизации. Находит слабые места в метаданных, графике и конверсии. Claude Code CX Codex Cursor +1 74 900установок swiftui-pro Paul Hudson Проверяет SwiftUI-код на устаревшие API, ошибки в структуре и проблемы доступности. Пригодится для ревью и доработки проектов на SwiftUI. Claude Code CX Codex Cursor +1 35 000установок

Вопросы о argent-react-native-optimization

Как установить argent-react-native-optimization в Claude Code?

Выполните команду npx skills add software-mansion/argent --skill argent-react-native-optimization -a claude-code.

Что делает скилл argent-react-native-optimization?

Он проводит аудит производительности React Native в четыре фазы: находит механические проблемы линтером, проверяет списки и контексты, замеряет метрики в профилировщике и подтверждает отсутствие сбоев на экранах.

Как скилл работает, если в проекте включён React Compiler?

Если профилировщик сообщает reactCompilerEnabled: true, скилл запрещает предлагать useCallback, useMemo или React.memo, если только в дереве fiber не подтверждено отсутствие useMemoCache.

Исходный текст

SKILL.md · Apache-2.0
---
name: argent-react-native-optimization
description: Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues. Entry-point for all performance work. Use when the app feels slow, user asks to optimize, fix re-renders, reduce jank, or improve startup. Delegates to argent-react-native-profiler for measurement.
---

## Rules

- Do not apply shotgun optimizations. Measure first, define what "good enough" looks like (target metric + threshold), fix the top offender, re-measure honestly.
- **Quick scan**: `react-profiler-renders` for a live render count table. Identifies hot components instantly.
- **Deep measure**: load `argent-react-native-profiler` skill. `react-profiler-start` → interact → `react-profiler-stop` → `react-profiler-analyze`.
- **Inspect**: `react-profiler-component-source` per finding. `react-profiler-fiber-tree` to trace component ancestry and render cost.
- **Verify correctness** - before fixing, recollect information from steps above and make a logical conclusion whether the approach is worth undertaking.
- **Fix**: apply one fix. Validate with `debugger-evaluate` before committing.
- **Re-measure**: report whether the target metric improved, regressed, or stayed flat. Check for regressions in other areas. If no net benefit or unacceptable tradeoffs, revert.
- **Profile for discovery, not only verification.** Use the profiler to find issues static analysis missed, not only to confirm fixes.
- **One fix per cycle for architectural changes.** Mechanical batch fixes (inline styles, index keys) can be grouped; re-profile once after the batch. When the measurement involves device interaction, record it as an e2e test (`argent-create-e2e` skill) before the first run so all subsequent cycles replay identical steps.
- **React Compiler**: if `react-profiler-analyze` reports `reactCompilerEnabled: true`, do NOT propose `useCallback`/`useMemo`/`React.memo` unless you confirmed compiler bail-out via `react-profiler-fiber-tree` (absent `useMemoCache`).
- **Sub-agents**: Phases 1–2 dispatch sub-agents: one per file for lint results, one per checklist item for semantic. Sub-agents CANNOT touch the device - all profiling and E2E verification must happen in the main agent.

## Pipeline

**Lint and semantic sweeps catch deterministic issues cheaply. Profiling finds runtime bottlenecks that static analysis misses. Do both.**

Copy this checklist into your TODO list:

```
Optimization Progress:
- [ ] Phase 1: Lint sweep (deterministic: catch mechanical issues without a running app)
- [ ] Phase 2: Semantic sweep (judgment: memoization, lists, animations, etc.)
- [ ] Phase 3: Baseline profile (find real bottlenecks, fix top offenders)
- [ ] Phase 4: Verify no regressions (crashes, errors, red screens)
```

### Phase 1: Lint sweep

Run ESLint once at the project root with a comprehensive RN performance ruleset. Dispatch sub-agents to fix results: one per file.
See [references/lint-rules.md](references/lint-rules.md) for ruleset and procedure.

### Phase 2: Semantic sweep

Review each area requiring judgment: memoization, list rendering, animations, async patterns, effect cleanup, state hygiene, context architecture. Dispatch one sub-agent per checklist item.
See [references/semantic-checklist.md](references/semantic-checklist.md) for full checklist.

### Phase 3: Visual profiling

1. Load `argent-react-native-profiler` skill, start dual profiling
2. Exercise key user flows (navigate screens the user specified, or all major flows)
3. Analyze with `react-profiler-analyze` + `native-profiler-analyze` + `profiler-combined-report`
4. Cross-reference profiling results with Phase 1–2 findings
5. Fix highest-impact issues. Re-profile after architectural changes; batch mechanical fixes. If a recorded e2e test breaks after a fix (e.g., UI layout changed), follow `argent-create-e2e` skill to repair the e2e test rather than silently discarding it.

### Phase 4: Verify no regressions

Navigate every screen and UI flow within scope, confirm each renders without errors. If no scope was specified, verify the entire app: cover all reachable screens via `argent-device-interact`. Use `debugger-log-registry` to check for runtime errors (if it returns `status: "not_connected"` there is no log file; follow its `guidance` to reconnect first) and take screenshots to check for red/yellow error screens. Check for regressions introduced by fixes (e.g., fewer re-renders but higher CPU, or new jank in a different screen). Main agent only.

## App-wide optimization

1. **Phase 1**: run lint centrally (one command), dispatch sub-agents to fix per-file in parallel
2. **Phase 2**: one sub-agent per checklist item for semantic sweep
3. **Phase 3**: main agent profiles top offending screens; fixes architectural issues top-down
4. **Phase 4**: main agent navigates all screens to verify nothing crashes

After the entire run, run lint again to verify no new issues were introduced with your changes.
This also helps ensure you haven't missed any issues which could've been fixed.

© software-mansion · Apache-2.0 · software-mansion/argent

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой