muratcakmak/shipwright/animation

Claude Code and agent skill by muratcakmak/shipwright

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Create performant 60fps animations using Reanimated 3 and Gesture Handler. Covers spring physics, gesture composition, shared element transitions, and layout animations. Auto-runs /verify-flow to record and validate smoothness.

Install

npx vskill@latest install muratcakmak/shipwright/animation

SKILL.md

The same SKILL.md was published earlier as muratcakmak/shipwright/animation.

Animation

Create performant animations for this React Native app.

Animation: $ARGUMENTS

MANDATORY PREPARATION

  1. Read Shipwright Context from CLAUDE.md
  2. Verify dependencies in package.json:
  • react-native-reanimated (v3+)
  • react-native-gesture-handler
  1. Check `babel.config.js` has the Reanimated plugin:

``js plugins: ['react-native-reanimated/plugin'] // Must be last ``

CORE RULES

ALWAYS use Reanimated worklets (UI thread)
tsx
// GOOD — runs on UI thread at 60fps
const animatedStyle = useAnimatedStyle(() => ({
transform: [{ translateY: offset.value }],
opacity: interpolate(offset.value, [0, 100], [1, 0]),
}));
// BAD — runs on JS thread, causes jank
const animatedStyle = { transform: [{ translateY: jsValue }] };
ALWAYS prefer spring over timing for interactive animations
tsx
// Natural feel — use for user-driven animations
offset.value = withSpring(targetValue, {
damping: 15,
stiffness: 150,
mass: 1,
});
// Precise timing — use for non-interactive transitions
opacity.value = withTiming(1, { duration: 200, easing: Easing.out(Easing.cubic) });
NEVER animate on JS thread

The JS thread handles business logic. Animations on it compete for resources and cause frame drops. Every animation must use useAnimatedStyle, useAnimatedProps, or withTiming/withSpring from Reanimated.

GESTURE HANDLER COMPOSITION

Basic Gesture
tsx
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
import Animated, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
function DraggableCard() {
const translateX = useSharedValue(0);
const translateY = useSharedValue(0);
const savedOffset = useSharedValue({ x: 0, y: 0 });
const panGesture = Gesture.Pan()
.onStart(() => {
savedOffset.value = { x: translateX.value, y: translateY.value };
})
.onUpdate((event) => {
translateX.value = savedOffset.value.x + event.translationX;
translateY.value = savedOffset.value.y + event.translationY;
})
.onEnd(() => {
translateX.value = withSpring(0);
translateY.value = withSpring(0);
});
const animatedStyle = useAnimatedStyle(() => ({
transform: [
{ translateX: translateX.value },
{ translateY: translateY.value },
],
}));
return (
<GestureDetector gesture={panGesture}>
<Animated.View style={[styles.card, animatedStyle]} />
</GestureDetector>
);
}
Composed Gestures
tsx
// Simultaneous: pinch + rotate at the same time
const composed = Gesture.Simultaneous(pinchGesture, rotationGesture);
// Exclusive: tap OR long press (first recognized wins)
const exclusive = Gesture.Exclusive(longPressGesture, tapGesture);
// Race: first to activate wins, others cancelled
const race = Gesture.Race(swipeGesture, panGesture);

COMMON ANIMATION PATTERNS

Shared Element Transition
tsx
import Animated, { SharedTransition } from 'react-native-reanimated';
// In source screen
<Animated.Image sharedTransitionTag={`image-${item.id}`} source={item.image} />
// In destination screen (same tag)
<Animated.Image sharedTransitionTag={`image-${item.id}`} source={item.image} />
Layout Animations (Entering/Exiting)
tsx
import Animated, { FadeIn, FadeOut, SlideInRight, Layout } from 'react-native-reanimated';
<Animated.View
entering={FadeIn.duration(300)}
exiting={FadeOut.duration(200)}
layout={Layout.springify()}
>
Scroll-Driven Animation
tsx
const scrollHandler = useAnimatedScrollHandler({
onScroll: (event) => {
scrollY.value = event.contentOffset.y;
},
});
const headerStyle = useAnimatedStyle(() => ({
height: interpolate(scrollY.value, [0, 100], [200, 60], Extrapolation.CLAMP),
opacity: interpolate(scrollY.value, [0, 100], [1, 0.8], Extrapolation.CLAMP),
}));
<Animated.ScrollView onScroll={scrollHandler} scrollEventThrottle={16}>
Bottom Sheet
tsx
const translateY = useSharedValue(SHEET_MAX_HEIGHT);
const context = useSharedValue(0);
const panGesture = Gesture.Pan()
.onStart(() => { context.value = translateY.value; })
.onUpdate((event) => {
translateY.value = Math.max(
context.value + event.translationY,
SHEET_MIN_HEIGHT
);
})
.onEnd((event) => {
// Snap to closest detent
const snapPoints = [SHEET_MIN_HEIGHT, SHEET_MID_HEIGHT, SHEET_MAX_HEIGHT];
const closest = snapPoints.reduce((prev, curr) =>
Math.abs(curr - translateY.value) < Math.abs(prev - translateY.value) ? curr : prev
);
translateY.value = withSpring(closest, { damping: 20 });
});

SPRING PHYSICS GUIDE

FeelDampingStiffnessMass
Snappy (buttons)203000.5
Bouncy (playful)81501
Smooth (transitions)151501
Heavy (dragging)201002
Gentle (fading)25801

AFTER IMPLEMENTATION

Once animation is implemented, run verification:

Tell the user: "Animation implemented. Running /verify-flow to record and validate smoothness."

Then invoke the verify-flow skill to record a video of the animation and verify it plays at 60fps.

CHECKLIST

  • [ ] All animations use Reanimated worklets (UI thread)
  • [ ] Interactive animations use spring physics
  • [ ] Gestures use Gesture Handler v2 API (Gesture.Pan(), etc.)
  • [ ] scrollEventThrottle={16} set on animated scroll views
  • [ ] No setTimeout used for animation sequencing
  • [ ] No LayoutAnimation used for interactive elements
  • [ ] /verify-flow run to validate smoothness

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/muratcakmak/shipwright/animation/badge)](https://verified-skill.com/skills/muratcakmak/shipwright/animation)

Something wrong with this skill or its page? Tell us.