Communitygithub.com

Asymmetric-al/core

Implementa animaciones suaves y accesibles con motion/react (Framer Motion) en React. Úsalo al añadir animaciones, gestos o transiciones de diseño con motion, AnimatePresence, useScroll y APIs relacionadas. Requiere un límite 'use client'; no es para componentes estrictamente renderizados en servidor ni cuando no se necesiten animaciones.

¿Qué es core?

Esta habilidad proporciona pautas y ejemplos para implementar animaciones accesibles y de alto rendimiento con motion/react (Framer Motion) en React. Es útil para desarrolladores que desean añadir animaciones de entrada/salida, gestos y transiciones de diseño de manera controlada y respetando las preferencias de movimiento reducido del usuario. La habilidad cubre la creación de componentes cliente con 'use client', el uso de AnimatePresence para animaciones de entrada/salida y layout para transiciones de diseño, y la optimización del rendimiento mediante LazyMotion. También incluye listas de verificación y ejemplos mínimos de código que demuestran buenas prácticas, como el uso de useReducedMotion para adaptarse a las preferencias de accesibilidad.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Asymmetric-al/core/tree/HEAD/.agents/skills/motion

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Motion (Framer Motion) — Skill

Nombre: motion Propósito: Implementar animaciones suaves y accesibles con motion/react en React. Usa esta habilidad siempre que añadas animaciones, gestos o transiciones de diseño.

Aplica cuando: Usas motion/react (motion, AnimatePresence, useScroll, etc.). No usar cuando: No se necesitan animaciones o el componente se renderiza estrictamente en servidor.

Reglas

  • Límite solo cliente: Motion requiere 'use client'; mantén las islas de cliente pequeñas.
  • Empieza simple: Comienza con opacidad/traslación antes de añadir física de resortes.
  • Usa la herramienta adecuada: AnimatePresence para entrada/salida, layout para diseño, whileHover/whileTap para gestos.
  • Respeta el movimiento reducido: Usa useReducedMotion().
  • Disciplina de tamaño: Usa LazyMotion para superficies de motion grandes.

Flujo de trabajo

  1. Identifica el propósito de UX (retroalimentación, transición, foco).
  2. Añade el límite 'use client' más pequeño.
  3. Implementa correctamente las transiciones de entrada/salida o diseño.
  4. Respeta las preferencias de movimiento reducido.
  5. Verifica el rendimiento y el tamaño del paquete.

Listas de verificación

Lista de verificación de implementación

  • 'use client' solo donde sea necesario
  • Comportamiento de movimiento reducido definido
  • AnimatePresence envuelve la UI condicional
  • Las transiciones de diseño usan layout

Lista de verificación de revisión

  • Las animaciones no se vuelven a ejecutar en cada renderizado
  • El código de motion no expande innecesariamente el árbol de cliente

Ejemplos mínimos

Entrada/salida

"use client";

import { AnimatePresence, motion } from "motion/react";

export function Toast({
  open,
  children,
}: {
  open: boolean;
  children: React.ReactNode;
}) {
  return (
    <AnimatePresence>
      {open ? (
        <motion.div
          initial={{ opacity: 0, y: 8 }}
          animate={{ opacity: 1, y: 0 }}
          exit={{ opacity: 0, y: 8 }}
          transition={{ duration: 0.18 }}
        >
          {children}
        </motion.div>
      ) : null}
    </AnimatePresence>
  );
}

Animación de diseño

"use client";

import { motion } from "motion/react";

export function Expander({ open }: { open: boolean }) {
  return (
    <motion.div layout className="overflow-hidden rounded-md border p-3">
      <div className="font-medium">Título</div>
      {open ? <div className="mt-2 text-sm">Más contenido...</div> : null}
    </motion.div>
  );
}

Movimiento reducido

"use client";

import { motion, useReducedMotion } from "motion/react";

export function FadeIn({ children }: { children: React.ReactNode }) {
  const reduce = useReducedMotion();
  return (
    <motion.div
      initial={reduce ? false : { opacity: 0, y: 6 }}
      animate={reduce ? { opacity: 1 } : { opacity: 1, y: 0 }}
      transition={{ duration: 0.2 }}
    >
      {children}
    </motion.div>
  );
}

Errores comunes / dificultades

  • Desmontar sin AnimatePresence (las animaciones de salida nunca se ejecutan)
  • Animar diseño sin layout
  • Poner Motion en un árbol de cliente enorme
  • Animar listas grandes sin virtualización

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

Asymmetric-al/core

Build animations for Expo and React Native only, using Reanimated, Gesture Handler, Expo Router, and expo-haptics. Use when the target runtime is an Expo or React Native app. Do not use it for Core Next.js web motion; use `animate` for web. Only runs when explicitly invoked; it does not trigger on its own.

Asymmetric-al/core

Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations. Only runs when explicitly invoked; it does not trigger on its own.

Asymmetric-al/core

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

Asymmetric-al/core

Inspect a Core UI or code surface for a small number of justified motion opportunities and explicitly identify what should remain static. Use when asked what should animate, where motion would improve feedback or comprehension, how to make an interface feel more alive without over-animating it, or whether a proposed animation is worth adding. Read-only; do not use to review or fix existing motion code or to implement animations.

Asymmetric-al/core

Survey a codebase's animation and motion code as a senior motion advisor, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper models) to execute. Read-only on source code — it plans improvements, it does not apply them. Use when the user asks to "improve the animations", "audit the motion", "make this app feel better", or wants a roadmap of animation fixes rather than a review of a single diff.

Asymmetric-al/core

Best practices for Remotion - Video creation in React

Asymmetric-al/core

Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.

Skills relacionados