[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M70GG8VPNGZY6A6RWEGYS2AA":3,"skill-same:01M70GG8VPNGZY6A6RWEGYS2AA":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":6,"ownerHtmlUrl":69,"ownerBlogUrl":6,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M70GG8VPNGZY6A6RWEGYS2AA","motion-advanced",null,"Advanced motion patterns for React \u002F Next.js — drag & drop, gestures, text animations, SVG path drawing, custom hooks, imperative sequences (useAnimate), loaders, and the full API decision tree. Requires motion-foundations. Use when building drag and drop, gestures, text or SVG animation, or imperative animation sequences in React or Next.js.","mdnaimul22\u002Fhuman-skills","mdnaimul22","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F64520358?v=4","01M70FH95MH2H796Q01TYSFZ03","Naimul","01M70FH96798CQR4YHA13F17GA",3,"MIT","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Faffaan-m_ECC\u002Fmotion-advanced\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"motion advanced","advanced","motion","next","sequences","when","path","tree","foundations","full","drop","frontend","svg animation","patterns","hooks","decision","text","Animation","api","react","2026-11-10 10:12:30",false,"---\nname: motion-advanced\ndescription: Advanced motion patterns for React \u002F Next.js — drag & drop, gestures, text animations, SVG path drawing, custom hooks, imperative sequences (useAnimate), loaders, and the full API decision tree. Requires motion-foundations. Use when building drag and drop, gestures, text or SVG animation, or imperative animation sequences in React or Next.js.\ntags: [motion, animation, advanced, gestures, svg]\ncategory: frontend\nauthor: jeff\nmetadata:\n  version: 1.0.0\n---\n\n# Motion Advanced\n\nComplex, interactive, and physics-based animation patterns.\nRequires `motion-foundations` to be set up first.\nUse these when `motion-patterns` is not enough.\n\n## When to Activate\n\n- Building drag-to-dismiss sheets, swipe gestures, or reorderable lists\n- Animating text word-by-word, character-by-character, or as a live counter\n- Drawing SVG paths, morphing icons, or animating circular progress\n- Writing a custom animation hook (`useScrollReveal`, magnetic button, cursor follower)\n- Sequencing multi-step animations imperatively with `useAnimate`\n- Building spinners, shimmer skeletons, pulse indicators, or loading button states\n\n## Outputs\n\nThis skill produces:\n\n- Drag interactions: draggable cards, drag-to-dismiss sheets, `Reorder.Group` lists\n- Gesture hooks: swipe detection, long press, pinch outline\n- Text animation components: word reveal, character typewriter, number counter\n- SVG animation: path draw-on, icon morph, stroke progress ring\n- Custom hooks: `useScrollReveal`, `useHoverScale`, `useNavigationDirection`, `useInViewOnce`\n- Imperative sequences via `useAnimate` with interrupt-safe `async\u002Fawait`\n- Loader components: spinner, shimmer, pulse dot, progress bar, button loading state\n\n## Principles\n\n- Physics-based motion (`useSpring`, `springs.*`) always feels more natural than duration-based for direct manipulation.\n- `useMotionValue` + `useTransform` computes derived values without triggering re-renders.\n- `useAnimate` sequences are imperative and interrupt-safe — calling `animate()` mid-flight cancels the previous animation automatically.\n- Motion values (`useMotionValue`, `useSpring`) are SSR-safe and do not cause hydration errors.\n\n## Rules\n\n1. **Drag interactions must be tested on touch devices**, not just mouse. `drag` prop works on both but feel and threshold differ.\n2. **Infinite animations must pause when `document.visibilityState === \"hidden\"`.** Background tabs must not consume GPU\u002FCPU.\n3. **Swipe threshold must be explicit.** Never infer intent from velocity alone; combine `offset` + `velocity` checks.\n4. **`useAnimate` scope ref must be attached to a mounted DOM element.** Calling `animate()` before mount throws silently.\n5. **Motion values must not be recreated on render.** `useMotionValue(0)` inside a component body is correct; `new MotionValue(0)` in a render is not.\n6. **All token values are imported from `motion-foundations`.** No inline numbers.\n7. **Custom hooks must handle cleanup.** Every `window.addEventListener` needs a matching `removeEventListener` in the `useEffect` return.\n8. **SVG morphing requires equal path command counts.** Paths with different command structures snap instead of interpolating.\n\n## Decision Guidance\n\n### Choosing the right advanced API\n\n| Scenario | API |\n| ------------------------------ | -------------------------------- |\n| Drag with physics on release | `drag` + `dragTransition: springs.release` |\n| Ordered drag-to-reorder list | `Reorder.Group` + `Reorder.Item` |\n| Dismiss on drag offset | `drag=\"y\"` + `onDragEnd` offset check |\n| Swipe left\u002Fright | `drag=\"x\"` + `onDragEnd` offset check |\n| Long press | `useLongPress` hook |\n| Value smoothed over time | `useSpring` |\n| Value derived from another | `useTransform` |\n| Multi-step sequence | `useAnimate` with `async\u002Fawait` |\n| One-shot imperative animation | `animate()` from `motion` |\n| Text entering word by word | Stagger on `inline-block` spans |\n| SVG drawing on | `pathLength` 0 → 1 |\n| SVG morph | `d` attribute tween (equal commands) |\n| Circular progress | `strokeDashoffset` tween |\n\n### When to use `useSpring` vs a spring transition\n\n| | `useSpring` | `transition: springs.*` |\n| -------------- | ---------------------------------------- | ----------------------- |\n| Use for | Cursor follower, pointer-tracked values | Discrete state changes |\n| Updates | Continuous, on every frame | Triggered by state change |\n| Interrupt | Smooth — physics picks up from velocity | Restarts from current value |\n\n## Core Concepts\n\n### useMotionValue + useTransform\n\nReactive computation without re-renders:\n\n```tsx\nconst x = useMotionValue(0)\nconst opacity = useTransform(x, [-200, 0, 200], [0, 1, 0])\n\u002F\u002F opacity updates every frame as x changes — no setState, no re-render\n```\n\n### useAnimate\n\nReturns `[scope, animate]`. The scope ref must be attached to a DOM element.\n`animate()` calls are interrupt-safe — calling mid-flight cancels the previous run.\n\n```tsx\nconst [scope, animate] = useAnimate()\n\nasync function play() {\n  await animate(\".step-1\", { opacity: 1 }, { duration: 0.3 })\n  await animate(\".step-2\", { x: 0 },       { duration: 0.4 })\n        animate(\".step-3\", { scale: 1 },    { duration: 0.25 })  \u002F\u002F fire and forget\n}\n\nreturn \u003Cdiv ref={scope}>...\u003C\u002Fdiv>\n```\n\n## Code Examples\n\n### Draggable card\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\nimport { springs, motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\n\u003Cmotion.div\n  drag\n  dragConstraints={{ left: -100, right: 100, top: -100, bottom: 100 }}\n  dragElastic={0.1}\n  whileDrag={{\n    scale: motionTokens.scale.pop,\n    boxShadow: \"0 16px 40px rgba(0,0,0,0.2)\",\n  }}\n  dragTransition={springs.release}\n\u002F>\n```\n\n### Drag-to-dismiss sheet\n\n```tsx\n\"use client\"\nimport { motion, useMotionValue, useTransform } from \"motion\u002Freact\"\n\nexport function BottomSheet({ onClose }: { onClose: () => void }) {\n  const y = useMotionValue(0)\n  const opacity = useTransform(y, [0, 200], [1, 0])\n\n  return (\n    \u003Cmotion.div\n      drag=\"y\"\n      dragConstraints={{ top: 0 }}\n      style={{ y, opacity }}\n      onDragEnd={(_, info) => {\n        \u002F\u002F Rule 3: combine offset + velocity\n        if (info.offset.y > 120 || info.velocity.y > 500) onClose()\n      }}\n    \u002F>\n  )\n}\n```\n\n### Reorderable list\n\n```tsx\n\"use client\"\nimport { Reorder } from \"motion\u002Freact\"\n\nexport function SortableList() {\n  const [items, setItems] = useState(initialItems)\n  return (\n    \u003CReorder.Group axis=\"y\" values={items} onReorder={setItems}>\n      {items.map((item) => (\n        \u003CReorder.Item key={item.id} value={item}>\n          {item.label}\n        \u003C\u002FReorder.Item>\n      ))}\n    \u003C\u002FReorder.Group>\n  )\n}\n```\n\n### Swipe detection\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\n\nconst OFFSET_THRESHOLD  = 50\nconst VELOCITY_THRESHOLD = 300\n\n\u003Cmotion.div\n  drag=\"x\"\n  dragConstraints={{ left: 0, right: 0 }}\n  onDragEnd={(_, info) => {\n    const swipedRight = info.offset.x > OFFSET_THRESHOLD  || info.velocity.x > VELOCITY_THRESHOLD\n    const swipedLeft  = info.offset.x \u003C -OFFSET_THRESHOLD || info.velocity.x \u003C -VELOCITY_THRESHOLD\n    if (swipedRight) onSwipeRight()\n    if (swipedLeft)  onSwipeLeft()\n  }}\n\u002F>\n```\n\n### Long press hook\n\n```tsx\nimport { useRef } from \"react\"\n\nexport function useLongPress(callback: () => void, ms = 600) {\n  const timerRef = useRef\u003CReturnType\u003Ctypeof setTimeout>>()\n  return {\n    onPointerDown:  () => { timerRef.current = setTimeout(callback, ms) },\n    onPointerUp:    () => clearTimeout(timerRef.current),\n    onPointerLeave: () => clearTimeout(timerRef.current),\n  }\n}\n```\n\n### Word-by-word reveal\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\nimport { springs } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function AnimatedText({ text }: { text: string }) {\n  return (\n    \u003Cmotion.p\n      variants={{ visible: { transition: { staggerChildren: 0.05 } } }}\n      initial=\"hidden\"\n      animate=\"visible\"\n    >\n      {text.split(\" \").map((word, i) => (\n        \u003Cmotion.span\n          key={i}\n          className=\"inline-block mr-1\"\n          variants={{\n            hidden:  { opacity: 0, y: 12 },\n            visible: { opacity: 1, y: 0, transition: springs.gentle },\n          }}\n        >\n          {word}\n        \u003C\u002Fmotion.span>\n      ))}\n    \u003C\u002Fmotion.p>\n  )\n}\n```\n\n### Number counter\n\n```tsx\n\"use client\"\nimport { useRef, useEffect } from \"react\"\nimport { animate } from \"motion\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function Counter({ to }: { to: number }) {\n  const nodeRef = useRef\u003CHTMLSpanElement>(null)\n\n  useEffect(() => {\n    const controls = animate(0, to, {\n      duration: motionTokens.duration.crawl,\n      ease: motionTokens.easing.smooth,\n      onUpdate: (v) => {\n        if (nodeRef.current) nodeRef.current.textContent = Math.round(v).toString()\n      },\n    })\n    return controls.stop   \u002F\u002F Rule 7: cleanup\n  }, [to])\n\n  return \u003Cspan ref={nodeRef} \u002F>\n}\n```\n\n### SVG path draw-on\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\n\u003Cmotion.path\n  d=\"M 0 100 Q 50 0 100 100\"\n  initial={{ pathLength: 0, opacity: 0 }}\n  animate={{ pathLength: 1, opacity: 1 }}\n  transition={{ duration: motionTokens.duration.slow, ease: motionTokens.easing.smooth }}\n\u002F>\n```\n\n### Stroke progress ring\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nconst CIRCUMFERENCE = 2 * Math.PI * 40   \u002F\u002F r=40\n\nexport function ProgressRing({ progress }: { progress: number }) {\n  return (\n    \u003Csvg width=\"100\" height=\"100\" viewBox=\"0 0 100 100\">\n      \u003Ccircle cx=\"50\" cy=\"50\" r=\"40\" fill=\"none\" stroke=\"#e5e7eb\" strokeWidth=\"8\" \u002F>\n      \u003Cmotion.circle\n        cx=\"50\" cy=\"50\" r=\"40\"\n        fill=\"none\" stroke=\"#6366f1\" strokeWidth=\"8\"\n        strokeLinecap=\"round\"\n        strokeDasharray={CIRCUMFERENCE}\n        animate={{ strokeDashoffset: CIRCUMFERENCE - (progress \u002F 100) * CIRCUMFERENCE }}\n        transition={{ duration: motionTokens.duration.normal, ease: motionTokens.easing.smooth }}\n        style={{ rotate: -90, transformOrigin: \"center\" }}\n      \u002F>\n    \u003C\u002Fsvg>\n  )\n}\n```\n\n### useScrollReveal hook\n\n```tsx\n\"use client\"\nimport { useRef } from \"react\"\nimport { useScroll, useTransform } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function useScrollReveal() {\n  const ref = useRef(null)\n  const { scrollYProgress } = useScroll({ target: ref, offset: [\"start end\", \"end start\"] })\n  const opacity = useTransform(scrollYProgress, [0, 0.3], [0, 1])\n  const y       = useTransform(scrollYProgress, [0, 0.3], [motionTokens.distance.lg, 0])\n  return { ref, style: { opacity, y } }\n}\n\n\u002F\u002F Usage\nconst { ref, style } = useScrollReveal()\n\u003Cmotion.section ref={ref} style={style} \u002F>\n```\n\n### Cursor follower\n\n```tsx\n\"use client\"\nimport { useEffect } from \"react\"\nimport { motion, useMotionValue, useSpring } from \"motion\u002Freact\"\nimport { springs } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function CursorFollower() {\n  const x = useMotionValue(-100)\n  const y = useMotionValue(-100)\n  const sx = useSpring(x, springs.gentle)\n  const sy = useSpring(y, springs.gentle)\n\n  useEffect(() => {\n    const move = (e: MouseEvent) => { x.set(e.clientX); y.set(e.clientY) }\n    window.addEventListener(\"mousemove\", move)\n    return () => window.removeEventListener(\"mousemove\", move)   \u002F\u002F Rule 7\n  }, [])\n\n  return (\n    \u003Cmotion.div\n      className=\"fixed top-0 left-0 w-6 h-6 rounded-full bg-indigo-500\n                 pointer-events-none -translate-x-1\u002F2 -translate-y-1\u002F2 z-50\"\n      style={{ x: sx, y: sy }}\n    \u002F>\n  )\n}\n```\n\n### Shimmer skeleton\n\n```tsx\n\"use client\"\nimport { useEffect } from \"react\"\nimport { motion, useAnimation } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function ShimmerSkeleton({ className = \"\" }: { className?: string }) {\n  const controls = useAnimation()\n\n  useEffect(() => {\n    const play = () =>\n      controls.start({\n        x: [\"-100%\", \"100%\"],\n        transition: {\n          repeat: Infinity,\n          duration: motionTokens.duration.crawl,\n          ease: motionTokens.easing.linear,\n        },\n      })\n\n    const handleVisibility = () => {\n      if (document.visibilityState === \"hidden\") controls.stop()\n      else void play()\n    }\n\n    void play()\n    document.addEventListener(\"visibilitychange\", handleVisibility)\n    return () => {\n      controls.stop()\n      document.removeEventListener(\"visibilitychange\", handleVisibility)\n    }\n  }, [controls])\n\n  return (\n    \u003Cdiv className={`relative overflow-hidden bg-gray-200 rounded ${className}`}>\n      \u003Cmotion.div\n        className=\"absolute inset-0 bg-gradient-to-r from-transparent via-white\u002F60 to-transparent\"\n        initial={{ x: \"-100%\" }}\n        animate={controls}\n      \u002F>\n    \u003C\u002Fdiv>\n  )\n}\n```\n\n### Button loading state\n\n```tsx\n\"use client\"\nimport { motion, AnimatePresence } from \"motion\u002Freact\"\nimport { motionTokens, springs } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function LoadingButton({\n  loading,\n  label,\n  onClick,\n}: {\n  loading: boolean\n  label: string\n  onClick: () => void\n}) {\n  return (\n    \u003Cmotion.button\n      onClick={onClick}\n      animate={{ opacity: loading ? 0.7 : 1 }}\n      whileTap={loading ? {} : { scale: motionTokens.scale.press }}\n      transition={springs.snappy}\n      disabled={loading}\n    >\n      \u003CAnimatePresence mode=\"wait\">\n        {loading ? (\n          \u003Cmotion.span\n            key=\"loading\"\n            initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}\n            transition={{ duration: motionTokens.duration.fast }}\n          >\n            …\n          \u003C\u002Fmotion.span>\n        ) : (\n          \u003Cmotion.span\n            key=\"label\"\n            initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}\n            transition={{ duration: motionTokens.duration.fast }}\n          >\n            {label}\n          \u003C\u002Fmotion.span>\n        )}\n      \u003C\u002FAnimatePresence>\n    \u003C\u002Fmotion.button>\n  )\n}\n```\n\n### Infinite animation with visibility pause\n\n```tsx\n\"use client\"\nimport { useEffect } from \"react\"\nimport { motion, useAnimation } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function PulseDot() {\n  const controls = useAnimation()\n\n  useEffect(() => {\n    const pulse = () =>\n      controls.start({\n        scale: [1, 1.4, 1],\n        opacity: [1, 0.6, 1],\n        transition: { repeat: Infinity, duration: motionTokens.duration.crawl },\n      })\n\n    \u002F\u002F Rule 2: pause when tab is hidden\n    const handleVisibility = () => {\n      if (document.visibilityState === \"hidden\") controls.stop()\n      else void pulse()\n    }\n\n    void pulse()\n    document.addEventListener(\"visibilitychange\", handleVisibility)\n    \u002F\u002F Rule 7: stop controls and remove listeners on unmount.\n    return () => {\n      controls.stop()\n      document.removeEventListener(\"visibilitychange\", handleVisibility)\n    }\n  }, [controls])\n\n  return \u003Cmotion.span className=\"w-2 h-2 rounded-full bg-green-400\" animate={controls} \u002F>\n}\n```\n\n## End-to-End Example\n\nDrag-to-dismiss sheet with shimmer content, loading state, and reduced motion\nsupport — combining `useMotionValue`, `useTransform`, `useSafeMotion`,\n`AnimatePresence`, and tokens from `motion-foundations`:\n\n```tsx\n\"use client\"\nimport { useState } from \"react\"\nimport { motion, AnimatePresence, useMotionValue, useTransform } from \"motion\u002Freact\"\nimport { springs, motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\nimport { useSafeMotion } from \"@\u002Fhooks\u002Fuse-reduced-motion\"\nimport { ShimmerSkeleton } from \".\u002Fshimmer-skeleton\"\n\nexport function DismissibleSheet({\n  isOpen,\n  onClose,\n  loading,\n  children,\n}: {\n  isOpen: boolean\n  onClose: () => void\n  loading: boolean\n  children: React.ReactNode\n}) {\n  const safe = useSafeMotion(motionTokens.distance.xl)\n  const y = useMotionValue(0)\n  const opacity = useTransform(y, [0, 200], [1, 0])\n\n  return (\n    \u003CAnimatePresence>\n      {isOpen && (\n        \u003C>\n          {\u002F* Backdrop *\u002F}\n          \u003Cmotion.div\n            key=\"backdrop\"\n            className=\"fixed inset-0 bg-black\u002F40\"\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{ opacity: 0 }}\n            onClick={onClose}\n          \u002F>\n\n          {\u002F* Sheet — drag-to-dismiss *\u002F}\n          \u003Cmotion.div\n            key=\"sheet\"\n            className=\"fixed bottom-0 inset-x-0 rounded-t-2xl bg-white p-6\"\n            drag=\"y\"\n            dragConstraints={{ top: 0 }}\n            style={{ y, opacity }}\n            onDragEnd={(_, info) => {\n              if (info.offset.y > 120 || info.velocity.y > 500) onClose()\n            }}\n            initial={safe.initial}\n            animate={safe.animate}\n            exit={safe.exit}\n            transition={springs.gentle}\n          >\n            {loading ? (\n              \u003Cdiv className=\"space-y-3\">\n                \u003CShimmerSkeleton className=\"h-4 w-3\u002F4\" \u002F>\n                \u003CShimmerSkeleton className=\"h-4 w-1\u002F2\" \u002F>\n                \u003CShimmerSkeleton className=\"h-20 w-full\" \u002F>\n              \u003C\u002Fdiv>\n            ) : children}\n          \u003C\u002Fmotion.div>\n        \u003C\u002F>\n      )}\n    \u003C\u002FAnimatePresence>\n  )\n}\n```\n\n## Constraints \u002F Non-Goals\n\nThis skill does **not** cover:\n\n- Token and spring definitions → see `motion-foundations`\n- Standard UI patterns (button, modal, stagger, page transitions) → see `motion-patterns`\n- CSS-only animations or Tailwind `animate-*` without `motion\u002Freact`\n- Canvas or WebGL-based animation (Three.js, Pixi, etc.)\n- Full drag-and-drop systems with external state managers (dnd-kit, react-beautiful-dnd)\n- Game-loop or frame-by-frame animation\n\n## Anti-Patterns\n\n| Anti-pattern | Rule violated | Fix |\n| ---------------------------------------------- | ------- | ------------------------------------------------ |\n| `drag` tested only on desktop | Rule 1 | Test on touch emulator and real device |\n| `animate={{ repeat: Infinity }}` with no pause | Rule 2 | Add `visibilitychange` listener |\n| `onDragEnd` checking only offset, not velocity | Rule 3 | Check both `info.offset` and `info.velocity` |\n| `animate(scope, ...)` before `useEffect` | Rule 4 | Call `animate()` only after mount |\n| `const x = new MotionValue(0)` in render | Rule 5 | Use `const x = useMotionValue(0)` |\n| `transition={{ duration: 1.2 }}` inline | Rule 6 | Use `motionTokens.duration.crawl` |\n| `useEffect` without cleanup | Rule 7 | Return `removeEventListener` \u002F `controls.stop` |\n| SVG morph between paths with different commands | Rule 8 | Normalize path commands before animating |\n\n## Related Skills\n\n- **`motion-foundations`** — defines all tokens, springs, `useSafeMotion`, and SSR guards imported here. Must be set up before using this skill.\n- **`motion-patterns`** — handles standard UI patterns (button, modal, stagger, page transitions, scroll reveals). Use it before reaching for the advanced patterns here.\n","# Motion Advanced\n\nComplex, interactive, and physics-based animation patterns.\nRequires `motion-foundations` to be set up first.\nUse these when `motion-patterns` is not enough.\n\n## When to Activate\n\n- Building drag-to-dismiss sheets, swipe gestures, or reorderable lists\n- Animating text word-by-word, character-by-character, or as a live counter\n- Drawing SVG paths, morphing icons, or animating circular progress\n- Writing a custom animation hook (`useScrollReveal`, magnetic button, cursor follower)\n- Sequencing multi-step animations imperatively with `useAnimate`\n- Building spinners, shimmer skeletons, pulse indicators, or loading button states\n\n## Outputs\n\nThis skill produces:\n\n- Drag interactions: draggable cards, drag-to-dismiss sheets, `Reorder.Group` lists\n- Gesture hooks: swipe detection, long press, pinch outline\n- Text animation components: word reveal, character typewriter, number counter\n- SVG animation: path draw-on, icon morph, stroke progress ring\n- Custom hooks: `useScrollReveal`, `useHoverScale`, `useNavigationDirection`, `useInViewOnce`\n- Imperative sequences via `useAnimate` with interrupt-safe `async\u002Fawait`\n- Loader components: spinner, shimmer, pulse dot, progress bar, button loading state\n\n## Principles\n\n- Physics-based motion (`useSpring`, `springs.*`) always feels more natural than duration-based for direct manipulation.\n- `useMotionValue` + `useTransform` computes derived values without triggering re-renders.\n- `useAnimate` sequences are imperative and interrupt-safe — calling `animate()` mid-flight cancels the previous animation automatically.\n- Motion values (`useMotionValue`, `useSpring`) are SSR-safe and do not cause hydration errors.\n\n## Rules\n\n1. **Drag interactions must be tested on touch devices**, not just mouse. `drag` prop works on both but feel and threshold differ.\n2. **Infinite animations must pause when `document.visibilityState === \"hidden\"`.** Background tabs must not consume GPU\u002FCPU.\n3. **Swipe threshold must be explicit.** Never infer intent from velocity alone; combine `offset` + `velocity` checks.\n4. **`useAnimate` scope ref must be attached to a mounted DOM element.** Calling `animate()` before mount throws silently.\n5. **Motion values must not be recreated on render.** `useMotionValue(0)` inside a component body is correct; `new MotionValue(0)` in a render is not.\n6. **All token values are imported from `motion-foundations`.** No inline numbers.\n7. **Custom hooks must handle cleanup.** Every `window.addEventListener` needs a matching `removeEventListener` in the `useEffect` return.\n8. **SVG morphing requires equal path command counts.** Paths with different command structures snap instead of interpolating.\n\n## Decision Guidance\n\n### Choosing the right advanced API\n\n| Scenario | API |\n| ------------------------------ | -------------------------------- |\n| Drag with physics on release | `drag` + `dragTransition: springs.release` |\n| Ordered drag-to-reorder list | `Reorder.Group` + `Reorder.Item` |\n| Dismiss on drag offset | `drag=\"y\"` + `onDragEnd` offset check |\n| Swipe left\u002Fright | `drag=\"x\"` + `onDragEnd` offset check |\n| Long press | `useLongPress` hook |\n| Value smoothed over time | `useSpring` |\n| Value derived from another | `useTransform` |\n| Multi-step sequence | `useAnimate` with `async\u002Fawait` |\n| One-shot imperative animation | `animate()` from `motion` |\n| Text entering word by word | Stagger on `inline-block` spans |\n| SVG drawing on | `pathLength` 0 → 1 |\n| SVG morph | `d` attribute tween (equal commands) |\n| Circular progress | `strokeDashoffset` tween |\n\n### When to use `useSpring` vs a spring transition\n\n| | `useSpring` | `transition: springs.*` |\n| -------------- | ---------------------------------------- | ----------------------- |\n| Use for | Cursor follower, pointer-tracked values | Discrete state changes |\n| Updates | Continuous, on every frame | Triggered by state change |\n| Interrupt | Smooth — physics picks up from velocity | Restarts from current value |\n\n## Core Concepts\n\n### useMotionValue + useTransform\n\nReactive computation without re-renders:\n\n```tsx\nconst x = useMotionValue(0)\nconst opacity = useTransform(x, [-200, 0, 200], [0, 1, 0])\n\u002F\u002F opacity updates every frame as x changes — no setState, no re-render\n```\n\n### useAnimate\n\nReturns `[scope, animate]`. The scope ref must be attached to a DOM element.\n`animate()` calls are interrupt-safe — calling mid-flight cancels the previous run.\n\n```tsx\nconst [scope, animate] = useAnimate()\n\nasync function play() {\n  await animate(\".step-1\", { opacity: 1 }, { duration: 0.3 })\n  await animate(\".step-2\", { x: 0 },       { duration: 0.4 })\n        animate(\".step-3\", { scale: 1 },    { duration: 0.25 })  \u002F\u002F fire and forget\n}\n\nreturn \u003Cdiv ref={scope}>...\u003C\u002Fdiv>\n```\n\n## Code Examples\n\n### Draggable card\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\nimport { springs, motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\n\u003Cmotion.div\n  drag\n  dragConstraints={{ left: -100, right: 100, top: -100, bottom: 100 }}\n  dragElastic={0.1}\n  whileDrag={{\n    scale: motionTokens.scale.pop,\n    boxShadow: \"0 16px 40px rgba(0,0,0,0.2)\",\n  }}\n  dragTransition={springs.release}\n\u002F>\n```\n\n### Drag-to-dismiss sheet\n\n```tsx\n\"use client\"\nimport { motion, useMotionValue, useTransform } from \"motion\u002Freact\"\n\nexport function BottomSheet({ onClose }: { onClose: () => void }) {\n  const y = useMotionValue(0)\n  const opacity = useTransform(y, [0, 200], [1, 0])\n\n  return (\n    \u003Cmotion.div\n      drag=\"y\"\n      dragConstraints={{ top: 0 }}\n      style={{ y, opacity }}\n      onDragEnd={(_, info) => {\n        \u002F\u002F Rule 3: combine offset + velocity\n        if (info.offset.y > 120 || info.velocity.y > 500) onClose()\n      }}\n    \u002F>\n  )\n}\n```\n\n### Reorderable list\n\n```tsx\n\"use client\"\nimport { Reorder } from \"motion\u002Freact\"\n\nexport function SortableList() {\n  const [items, setItems] = useState(initialItems)\n  return (\n    \u003CReorder.Group axis=\"y\" values={items} onReorder={setItems}>\n      {items.map((item) => (\n        \u003CReorder.Item key={item.id} value={item}>\n          {item.label}\n        \u003C\u002FReorder.Item>\n      ))}\n    \u003C\u002FReorder.Group>\n  )\n}\n```\n\n### Swipe detection\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\n\nconst OFFSET_THRESHOLD  = 50\nconst VELOCITY_THRESHOLD = 300\n\n\u003Cmotion.div\n  drag=\"x\"\n  dragConstraints={{ left: 0, right: 0 }}\n  onDragEnd={(_, info) => {\n    const swipedRight = info.offset.x > OFFSET_THRESHOLD  || info.velocity.x > VELOCITY_THRESHOLD\n    const swipedLeft  = info.offset.x \u003C -OFFSET_THRESHOLD || info.velocity.x \u003C -VELOCITY_THRESHOLD\n    if (swipedRight) onSwipeRight()\n    if (swipedLeft)  onSwipeLeft()\n  }}\n\u002F>\n```\n\n### Long press hook\n\n```tsx\nimport { useRef } from \"react\"\n\nexport function useLongPress(callback: () => void, ms = 600) {\n  const timerRef = useRef\u003CReturnType\u003Ctypeof setTimeout>>()\n  return {\n    onPointerDown:  () => { timerRef.current = setTimeout(callback, ms) },\n    onPointerUp:    () => clearTimeout(timerRef.current),\n    onPointerLeave: () => clearTimeout(timerRef.current),\n  }\n}\n```\n\n### Word-by-word reveal\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\nimport { springs } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function AnimatedText({ text }: { text: string }) {\n  return (\n    \u003Cmotion.p\n      variants={{ visible: { transition: { staggerChildren: 0.05 } } }}\n      initial=\"hidden\"\n      animate=\"visible\"\n    >\n      {text.split(\" \").map((word, i) => (\n        \u003Cmotion.span\n          key={i}\n          className=\"inline-block mr-1\"\n          variants={{\n            hidden:  { opacity: 0, y: 12 },\n            visible: { opacity: 1, y: 0, transition: springs.gentle },\n          }}\n        >\n          {word}\n        \u003C\u002Fmotion.span>\n      ))}\n    \u003C\u002Fmotion.p>\n  )\n}\n```\n\n### Number counter\n\n```tsx\n\"use client\"\nimport { useRef, useEffect } from \"react\"\nimport { animate } from \"motion\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function Counter({ to }: { to: number }) {\n  const nodeRef = useRef\u003CHTMLSpanElement>(null)\n\n  useEffect(() => {\n    const controls = animate(0, to, {\n      duration: motionTokens.duration.crawl,\n      ease: motionTokens.easing.smooth,\n      onUpdate: (v) => {\n        if (nodeRef.current) nodeRef.current.textContent = Math.round(v).toString()\n      },\n    })\n    return controls.stop   \u002F\u002F Rule 7: cleanup\n  }, [to])\n\n  return \u003Cspan ref={nodeRef} \u002F>\n}\n```\n\n### SVG path draw-on\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\n\u003Cmotion.path\n  d=\"M 0 100 Q 50 0 100 100\"\n  initial={{ pathLength: 0, opacity: 0 }}\n  animate={{ pathLength: 1, opacity: 1 }}\n  transition={{ duration: motionTokens.duration.slow, ease: motionTokens.easing.smooth }}\n\u002F>\n```\n\n### Stroke progress ring\n\n```tsx\n\"use client\"\nimport { motion } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nconst CIRCUMFERENCE = 2 * Math.PI * 40   \u002F\u002F r=40\n\nexport function ProgressRing({ progress }: { progress: number }) {\n  return (\n    \u003Csvg width=\"100\" height=\"100\" viewBox=\"0 0 100 100\">\n      \u003Ccircle cx=\"50\" cy=\"50\" r=\"40\" fill=\"none\" stroke=\"#e5e7eb\" strokeWidth=\"8\" \u002F>\n      \u003Cmotion.circle\n        cx=\"50\" cy=\"50\" r=\"40\"\n        fill=\"none\" stroke=\"#6366f1\" strokeWidth=\"8\"\n        strokeLinecap=\"round\"\n        strokeDasharray={CIRCUMFERENCE}\n        animate={{ strokeDashoffset: CIRCUMFERENCE - (progress \u002F 100) * CIRCUMFERENCE }}\n        transition={{ duration: motionTokens.duration.normal, ease: motionTokens.easing.smooth }}\n        style={{ rotate: -90, transformOrigin: \"center\" }}\n      \u002F>\n    \u003C\u002Fsvg>\n  )\n}\n```\n\n### useScrollReveal hook\n\n```tsx\n\"use client\"\nimport { useRef } from \"react\"\nimport { useScroll, useTransform } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function useScrollReveal() {\n  const ref = useRef(null)\n  const { scrollYProgress } = useScroll({ target: ref, offset: [\"start end\", \"end start\"] })\n  const opacity = useTransform(scrollYProgress, [0, 0.3], [0, 1])\n  const y       = useTransform(scrollYProgress, [0, 0.3], [motionTokens.distance.lg, 0])\n  return { ref, style: { opacity, y } }\n}\n\n\u002F\u002F Usage\nconst { ref, style } = useScrollReveal()\n\u003Cmotion.section ref={ref} style={style} \u002F>\n```\n\n### Cursor follower\n\n```tsx\n\"use client\"\nimport { useEffect } from \"react\"\nimport { motion, useMotionValue, useSpring } from \"motion\u002Freact\"\nimport { springs } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function CursorFollower() {\n  const x = useMotionValue(-100)\n  const y = useMotionValue(-100)\n  const sx = useSpring(x, springs.gentle)\n  const sy = useSpring(y, springs.gentle)\n\n  useEffect(() => {\n    const move = (e: MouseEvent) => { x.set(e.clientX); y.set(e.clientY) }\n    window.addEventListener(\"mousemove\", move)\n    return () => window.removeEventListener(\"mousemove\", move)   \u002F\u002F Rule 7\n  }, [])\n\n  return (\n    \u003Cmotion.div\n      className=\"fixed top-0 left-0 w-6 h-6 rounded-full bg-indigo-500\n                 pointer-events-none -translate-x-1\u002F2 -translate-y-1\u002F2 z-50\"\n      style={{ x: sx, y: sy }}\n    \u002F>\n  )\n}\n```\n\n### Shimmer skeleton\n\n```tsx\n\"use client\"\nimport { useEffect } from \"react\"\nimport { motion, useAnimation } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function ShimmerSkeleton({ className = \"\" }: { className?: string }) {\n  const controls = useAnimation()\n\n  useEffect(() => {\n    const play = () =>\n      controls.start({\n        x: [\"-100%\", \"100%\"],\n        transition: {\n          repeat: Infinity,\n          duration: motionTokens.duration.crawl,\n          ease: motionTokens.easing.linear,\n        },\n      })\n\n    const handleVisibility = () => {\n      if (document.visibilityState === \"hidden\") controls.stop()\n      else void play()\n    }\n\n    void play()\n    document.addEventListener(\"visibilitychange\", handleVisibility)\n    return () => {\n      controls.stop()\n      document.removeEventListener(\"visibilitychange\", handleVisibility)\n    }\n  }, [controls])\n\n  return (\n    \u003Cdiv className={`relative overflow-hidden bg-gray-200 rounded ${className}`}>\n      \u003Cmotion.div\n        className=\"absolute inset-0 bg-gradient-to-r from-transparent via-white\u002F60 to-transparent\"\n        initial={{ x: \"-100%\" }}\n        animate={controls}\n      \u002F>\n    \u003C\u002Fdiv>\n  )\n}\n```\n\n### Button loading state\n\n```tsx\n\"use client\"\nimport { motion, AnimatePresence } from \"motion\u002Freact\"\nimport { motionTokens, springs } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function LoadingButton({\n  loading,\n  label,\n  onClick,\n}: {\n  loading: boolean\n  label: string\n  onClick: () => void\n}) {\n  return (\n    \u003Cmotion.button\n      onClick={onClick}\n      animate={{ opacity: loading ? 0.7 : 1 }}\n      whileTap={loading ? {} : { scale: motionTokens.scale.press }}\n      transition={springs.snappy}\n      disabled={loading}\n    >\n      \u003CAnimatePresence mode=\"wait\">\n        {loading ? (\n          \u003Cmotion.span\n            key=\"loading\"\n            initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}\n            transition={{ duration: motionTokens.duration.fast }}\n          >\n            …\n          \u003C\u002Fmotion.span>\n        ) : (\n          \u003Cmotion.span\n            key=\"label\"\n            initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}\n            transition={{ duration: motionTokens.duration.fast }}\n          >\n            {label}\n          \u003C\u002Fmotion.span>\n        )}\n      \u003C\u002FAnimatePresence>\n    \u003C\u002Fmotion.button>\n  )\n}\n```\n\n### Infinite animation with visibility pause\n\n```tsx\n\"use client\"\nimport { useEffect } from \"react\"\nimport { motion, useAnimation } from \"motion\u002Freact\"\nimport { motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\n\nexport function PulseDot() {\n  const controls = useAnimation()\n\n  useEffect(() => {\n    const pulse = () =>\n      controls.start({\n        scale: [1, 1.4, 1],\n        opacity: [1, 0.6, 1],\n        transition: { repeat: Infinity, duration: motionTokens.duration.crawl },\n      })\n\n    \u002F\u002F Rule 2: pause when tab is hidden\n    const handleVisibility = () => {\n      if (document.visibilityState === \"hidden\") controls.stop()\n      else void pulse()\n    }\n\n    void pulse()\n    document.addEventListener(\"visibilitychange\", handleVisibility)\n    \u002F\u002F Rule 7: stop controls and remove listeners on unmount.\n    return () => {\n      controls.stop()\n      document.removeEventListener(\"visibilitychange\", handleVisibility)\n    }\n  }, [controls])\n\n  return \u003Cmotion.span className=\"w-2 h-2 rounded-full bg-green-400\" animate={controls} \u002F>\n}\n```\n\n## End-to-End Example\n\nDrag-to-dismiss sheet with shimmer content, loading state, and reduced motion\nsupport — combining `useMotionValue`, `useTransform`, `useSafeMotion`,\n`AnimatePresence`, and tokens from `motion-foundations`:\n\n```tsx\n\"use client\"\nimport { useState } from \"react\"\nimport { motion, AnimatePresence, useMotionValue, useTransform } from \"motion\u002Freact\"\nimport { springs, motionTokens } from \"@\u002Flib\u002Fmotion-tokens\"\nimport { useSafeMotion } from \"@\u002Fhooks\u002Fuse-reduced-motion\"\nimport { ShimmerSkeleton } from \".\u002Fshimmer-skeleton\"\n\nexport function DismissibleSheet({\n  isOpen,\n  onClose,\n  loading,\n  children,\n}: {\n  isOpen: boolean\n  onClose: () => void\n  loading: boolean\n  children: React.ReactNode\n}) {\n  const safe = useSafeMotion(motionTokens.distance.xl)\n  const y = useMotionValue(0)\n  const opacity = useTransform(y, [0, 200], [1, 0])\n\n  return (\n    \u003CAnimatePresence>\n      {isOpen && (\n        \u003C>\n          {\u002F* Backdrop *\u002F}\n          \u003Cmotion.div\n            key=\"backdrop\"\n            className=\"fixed inset-0 bg-black\u002F40\"\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{ opacity: 0 }}\n            onClick={onClose}\n          \u002F>\n\n          {\u002F* Sheet — drag-to-dismiss *\u002F}\n          \u003Cmotion.div\n            key=\"sheet\"\n            className=\"fixed bottom-0 inset-x-0 rounded-t-2xl bg-white p-6\"\n            drag=\"y\"\n            dragConstraints={{ top: 0 }}\n            style={{ y, opacity }}\n            onDragEnd={(_, info) => {\n              if (info.offset.y > 120 || info.velocity.y > 500) onClose()\n            }}\n            initial={safe.initial}\n            animate={safe.animate}\n            exit={safe.exit}\n            transition={springs.gentle}\n          >\n            {loading ? (\n              \u003Cdiv className=\"space-y-3\">\n                \u003CShimmerSkeleton className=\"h-4 w-3\u002F4\" \u002F>\n                \u003CShimmerSkeleton className=\"h-4 w-1\u002F2\" \u002F>\n                \u003CShimmerSkeleton className=\"h-20 w-full\" \u002F>\n              \u003C\u002Fdiv>\n            ) : children}\n          \u003C\u002Fmotion.div>\n        \u003C\u002F>\n      )}\n    \u003C\u002FAnimatePresence>\n  )\n}\n```\n\n## Constraints \u002F Non-Goals\n\nThis skill does **not** cover:\n\n- Token and spring definitions → see `motion-foundations`\n- Standard UI patterns (button, modal, stagger, page transitions) → see `motion-patterns`\n- CSS-only animations or Tailwind `animate-*` without `motion\u002Freact`\n- Canvas or WebGL-based animation (Three.js, Pixi, etc.)\n- Full drag-and-drop systems with external state managers (dnd-kit, react-beautiful-dnd)\n- Game-loop or frame-by-frame animation\n\n## Anti-Patterns\n\n| Anti-pattern | Rule violated | Fix |\n| ---------------------------------------------- | ------- | ------------------------------------------------ |\n| `drag` tested only on desktop | Rule 1 | Test on touch emulator and real device |\n| `animate={{ repeat: Infinity }}` with no pause | Rule 2 | Add `visibilitychange` listener |\n| `onDragEnd` checking only offset, not velocity | Rule 3 | Check both `info.offset` and `info.velocity` |\n| `animate(scope, ...)` before `useEffect` | Rule 4 | Call `animate()` only after mount |\n| `const x = new MotionValue(0)` in render | Rule 5 | Use `const x = useMotionValue(0)` |\n| `transition={{ duration: 1.2 }}` inline | Rule 6 | Use `motionTokens.duration.crawl` |\n| `useEffect` without cleanup | Rule 7 | Return `removeEventListener` \u002F `controls.stop` |\n| SVG morph between paths with different commands | Rule 8 | Normalize path commands before animating |\n\n## Related Skills\n\n- **`motion-foundations`** — defines all tokens, springs, `useSafeMotion`, and SSR guards imported here. Must be set up before using this skill.\n- **`motion-patterns`** — handles standard UI patterns (button, modal, stagger, page transitions, scroll reveals). Use it before reaching for the advanced patterns here.\n",{"name":5,"tags":57,"author":61,"category":43,"metadata":62,"description":7},[34,58,33,59,60],"animation","gestures","svg","jeff",{"version":63},"1.0.0","main","74715deacdc69119d739f38916f8ee4f0f979ebf","skills\u002Fstorage\u002Faffaan-m_ECC\u002Fmotion-advanced",0,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills","https:\u002F\u002Fgithub.com\u002Fmdnaimul22","AI Agents Workflows Automation | Specializing in Python, FastAPI, MCP Agents & Custom ERP.","2026-11-11 21:16:57",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add mdnaimul22\u002Fhuman-skills --skill motion-advanced",{"tool":78,"command":79},"bunx","bunx skills add mdnaimul22\u002Fhuman-skills --skill motion-advanced",{"tool":81,"command":82},"pnpm","pnpm dlx skills add mdnaimul22\u002Fhuman-skills --skill motion-advanced","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Faffaan-m_ECC\u002Fmotion-advanced\u002FSKILL.md",true,[],[87,95,103,110,117,124],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":94},"01M767791C1KRP2ZRW2Z73VZ5Q","system-lifecycle-designer","Universal architectural methodology for designing granular, atomic, and sub-atomic lifecycles and end-to-end workflows for single functionality integrations across any domain (daemons, batch jobs, request transactions, resource pools). Provides patterns for deterministic identity, pre-commit validation, differential reconciliation, sticky leasing, state machines, transactional persistence, and closed-loop feedback.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fsystem-lifecycle-designer\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":102},"01M748ABPN5F1FANHH6HKZQMXT","style-sampling","Make a new episode in a proven video style - Collage Explainer, Finance Explainer, Animated Science Explainer, 3D Brand Explainer, 3D True Crime - on the person's topic. Use for \"an episode of\", \"in the style of\", \"sample this style\", 「用这个风格做一集」. One video to copy is reverse-any-video.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fheygen-com_hyperframes\u002Fstyle-sampling\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":102},"01M748A59V04PKW4HA0XQ81FGP","reverse-any-video","Rebuild any video file as an editable HyperFrames project - motion graphics, talking heads, live action or AI-generated footage - checked against the original frame by frame. Use to reverse, recreate, remake, replicate or copy a video, or 「复刻这个视频」「照着这个视频做一个」.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fheygen-com_hyperframes\u002Freverse-any-video\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":102},"01M7487T50P55CSXMWXZ0G9KRG","typescript-patterns","TypeScript patterns for strict, type-safe, maintainable code in modern TypeScript and JavaScript applications. Covers strict compiler configuration, type design, narrowing, discriminated unions, generics, async and error handling, module boundaries, dependency hygiene, and type-level testing. Use when writing or reviewing TypeScript or JavaScript code.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Faffaan-m_ECC\u002Ftypescript-patterns\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":102},"01M7487ERZRGPC5NJ75077Y238","test-collaboration","Inventory and govern a project's test assets. Connect requirements, business rules, risks, bugs, and cross-boundary contracts to stable TEST-IDs and executable evidence in the repository's existing test registry or TESTS.md. Use for test inventory, test gap analysis, unit\u002Fintegration\u002Fcontract\u002FE2E\u002Fsmoke classification, bug-to-test regression protection, consumer\u002Fprovider contract testing, test-necessity review, and pre-delivery evidence review.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Faffaan-m_ECC\u002Ftest-collaboration\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":102},"01M748721J3GKR2WS6K0QWFC35","story-lifecycle","Manage a file-based epic → story → sprint development loop without requiring an external project management tool. Creates and tracks epics, breaks them into user stories, assigns them to sprints, and drives implementation story by story. Use when starting a new feature initiative or when the team has no Jira\u002FLinear\u002FTaiga but needs structured delivery tracking.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Faffaan-m_ECC\u002Fstory-lifecycle\u002FSKILL.md",[],[]]