Skills Agentes

Argent React Native Optimization

Optimiza una app React Native perfilando primero para encontrar cuellos de botella reales y luego revisando problemas mecánicos. Es el punto de entrada para todo trabajo de rendimiento; delega en argent-react-native-profiler para medir.

Oficial
Estrellas
2.2k

en todo el repo

Actividad
59

0–100, la ruta de este skill

Actualizado
hace 14 días

último commit aquí

Commits
1

últimos 90 días

Contexto
1.3k tok

77 tok en reposo

Paquete
4 archivos

12 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

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

Se instala solo en este repositorio.

Qué hace

  • Ejecuta un pipeline de 4 fases: sweep de lint, sweep semántico, perfilado visual y verificación de regresiones
  • Delega sub-agentes por archivo (fase 1) y por ítem de checklist (fase 2) para arreglar problemas mecánicos y de memoización
  • Mide con react-profiler-start/stop/analyze y native-profiler-analyze antes de aplicar cualquier fix
  • Aplica un fix a la vez, valida con debugger-evaluate y vuelve a medir para confirmar mejora, regresión o nulo cambio
  • Evita proponer useCallback/useMemo/React.memo si el React Compiler ya está activo, salvo bail-out confirmado

Úsalo cuando

  • La app se siente lenta o el usuario pide optimizarla
  • Hay que arreglar re-renders, reducir jank o mejorar el arranque

No lo uses cuando

    Qué lo activa

    Di cualquiera de estas frases y el agente debería cargar este skill.

    • La app va lenta, optimízala
    • Reduce los re-renders innecesarios en esta pantalla
    • Mejora el tiempo de arranque de la app React Native

    SKILL.md

    En inglés

    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 scanreact-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-stopreact-profiler-analyze.
    • Inspectreact-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 a flow (argent-create-flow 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 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 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 flow breaks after a fix (e.g., UI layout changed), follow argent-create-flow skill to repair the flow 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.

    Reproducido de software-mansion/argent bajo licencia Apache-2.0. Leer esta página en markdown.

    Archivos

    4 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.

    Detalles

    Licencia
    Apache-2.0
    Recursos incluidos
    referencias
    Código fuente
    Ver SKILL.md

    Etiquetas

    Más de software-mansion/argent

    Este repo incluye 16 skills. Si instalas uno, normalmente ya tienes los demás.

    Crea, graba, edita, repite o repara flujos YAML reutilizables de Argent. Úsalo para grabar/repetir un recorrido de dispositivo, montar perfiles o comparaciones A/B, o antes de repetir tres o más interacciones.

    Costo de contexto al activarse
    1k tok
    Tamaño del paquete
    4 archivos
    Última actualización
    ayer
    Oficialtesting qa

    Interactúa con un simulador iOS, un emulador Android o una app Chromium (CDP) con las herramientas MCP de argent: toques, gestos, scroll, texto, botones físicos, lanzar apps, abrir URLs, capturas y esperas de elementos.

    Costo de contexto al activarse
    7.3k tok
    Tamaño del paquete
    2 archivos
    Última actualización
    ayer
    Oficialtesting qa

    Prueba de forma autónoma la interfaz de una app (iOS o Android) con bucles de interactuar-capturar-verificar usando las herramientas MCP de argent, para flujos de UI, login, navegación o pruebas end-to-end.

    Costo de contexto al activarse
    2.7k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 14 días
    Oficialtesting qa

    Depura un runtime JS vía CDP con las herramientas de debugger de argent. La vía principal es React Native por Metro (iOS/Android/Vega); un subconjunto también controla el renderer de una app Chromium (CDP).

    Costo de contexto al activarse
    3.4k tok
    Tamaño del paquete
    3 archivos
    Última actualización
    hace 14 días
    Oficialherramientas desarrollo

    Crea tests E2E de regresión QA reproducibles como flujos Argent a partir de casos de prueba, tickets o criterios de aceptación, con configuración determinista y dos pasadas consecutivas exitosas. Cubre iOS, Android, Chromium y Vega.

    Costo de contexto al activarse
    3.1k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    ayer
    Oficialtesting qa

    Flujos paso a paso para desarrollar o depurar apps React Native en simulador iOS o emulador Android. Úsalo para arrancar la app, depurar Metro, arreglar builds, diagnosticar errores en tiempo de ejecución o ejecutar tests.

    Costo de contexto al activarse
    5.2k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 14 días
    Oficialherramientas desarrollo

    Skills relacionados

    Configura y conecta un emulador Android con las herramientas MCP de argent. Úsalo al iniciar una sesión en Android, arrancar un emulador, obtener el serial de un dispositivo o antes de interactuar con la UI.

    Costo de contexto al activarse
    820 tok
    Tamaño del paquete
    1 archivo
    Última actualización
    el mes pasado
    Oficialherramientas desarrollo

    Configura y conecta un simulador iOS con las herramientas MCP de argent. Úsalo al iniciar una sesión, arrancar un simulador iOS, obtener un UDID o antes de cualquier interacción con el simulador.

    Costo de contexto al activarse
    194 tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 3 meses
    Oficialherramientas desarrollo

    Depura un runtime JS vía CDP con las herramientas de debugger de argent. La vía principal es React Native por Metro (iOS/Android/Vega); un subconjunto también controla el renderer de una app Chromium (CDP).

    Costo de contexto al activarse
    3.4k tok
    Tamaño del paquete
    3 archivos
    Última actualización
    hace 14 días
    Oficialherramientas desarrollo