agentleFS
soilmasssoilmass/motion-design-agent/skills/platform-adaptation/SKILL.md

platform-adaptation

Skill7 starsChanged 10 months agoMITView on GitHub

Adapt motion patterns for different platforms, devices, and reading directions. Use when implementing animations that need to work across mobile, desktop, RTL languages, and different OS conventions.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Forgetting RTL: - Test all horizontal animations in RTL mode

    line 128
  2. Distinctive:

    Hardcoded directions: - Use logical properties and direction multipliers

    line 130

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Platform Adaptation

Motion patterns that adapt to platform conventions, device capabilities, and internationalization requirements.

Platform-Specific Conventions

iOS / Apple

PatterniOS ConventionImplementation
Page transitionPush from righttranslateX: 100% to 0
Back navigationSlide to righttranslateX: 0 to 100%
ModalSlide from bottomtranslateY: 100% to 0
Action sheetSlide from bottomSpring physics
Pull-to-refreshRubber-band effectElastic overshoot

Android / Material

PatternAndroid ConventionImplementation
Page transitionShared axisFade + scale
Back navigationFade outFade through
ModalSlide from bottomContainer transform
FABScale from centeremphasized-decelerate
SnackbarSlide from bottomQuick ease-out

Web / Desktop

PatternDesktop ConventionImplementation
Hover statesImmediate feedback100-150ms transitions
ModalsFade + scaleCenter of viewport
TooltipsFade in with delay200ms delay, 100ms transition
DropdownsFade + slide downOrigin from trigger

RTL (Right-to-Left) Adaptation

For languages like Arabic, Hebrew, Farsi, and Urdu, horizontal animations must be mirrored.

What to Mirror

Animation TypeLTRRTL
Slide infrom leftfrom right
Slide outto rightto left
Page pushfrom rightfrom left
Arrow motionright arrowleft arrow
Progress barleft to rightright to left
Carousel swipeleft = prevleft = next

What NOT to Mirror

Animation TypeBehaviorRationale
Vertical motionSameUp/down is universal
RotationSameClockwise is universal
ScaleSameCenter-out is universal
OpacitySameFade is directionless
Z-depthSameToward/away is universal

CSS Implementation

/* Base animation (LTR) */
.slide-in {
  animation: slide-in-ltr 300ms ease-out;
}

@keyframes slide-in-ltr {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* RTL override */
[dir="rtl"] .slide-in {
  animation-name: slide-in-rtl;
}

@keyframes slide-in-rtl {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

JavaScript Direction Helper

function getDirectionMultiplier() {
  return document.dir === 'rtl' ? -1 : 1;
}

function slideIn(element, options = {}) {
  const dir = getDirectionMultiplier();
  return gsap.from(element, {
    x: (options.distance || 100) * -dir,
    opacity: 0,
    duration: 0.3,
    ease: 'power2.out'
  });
}

Device Capability Adaptation

const capabilities = {
  gpu: detectGPU(),
  memory: navigator.deviceMemory || 4,
  connection: navigator.connection?.effectiveType || '4g',
  cores: navigator.hardwareConcurrency || 4
};

function getAnimationQuality() {
  if (capabilities.memory < 2) return 'minimal';
  if (capabilities.memory < 4) return 'reduced';
  if (capabilities.gpu === 'low-end') return 'standard';
  return 'full';
}

Common Mistakes

  1. Forgetting RTL - Test all horizontal animations in RTL mode
  2. Mirroring everything - Vertical and scale should NOT mirror
  3. Hardcoded directions - Use logical properties and direction multipliers
  4. Platform mismatch - iOS users expect iOS conventions
  5. Ignoring capabilities - Low-end devices need simpler animations

Related Skills

  • transitions/ - Page transition patterns
  • accessibility/ - Reduced motion for all platforms
  • testing-patterns/ - RTL testing strategies
  • tools/ - Platform-specific tool usage

See references/ for complete Framer Motion and Remotion RTL implementations.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.