anthropic-architect
Determine the best Anthropic architecture for your project by analyzing requirements and…
This skill provides comprehensive guidance for implementing advanced SwiftUI animations, transitions, matched geometry effects, and Metal shader integration. Use when building animations, view transitions, hero animations, or GPU-accelerated effects in SwiftUI apps for iOS and
$ npx -y skills add jamesrochabrun/skills --skill swiftui-animation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/swiftui-animationContext preview
The summary Claude sees to decide when to auto-load this skill.
This skill provides comprehensive guidance for implementing advanced SwiftUI animations, transitions, matched geometry effects, and Metal shader integration. Use when building animations, view transitions, hero animations, or GPU-accelerated effects in SwiftUI apps for iOS and
name: swiftui-animation description: This skill provides comprehensive guidance for implementing advanced SwiftUI animations, transitions, matched geometry effects, and Metal shader integration. Use when building animations, view transitions, hero animations, or GPU-accelerated effects in SwiftUI apps for iOS and macOS.
Expert guidance for implementing advanced SwiftUI animations and Metal shader integration. Covers animation curves, springs, transitions, matched geometry effects, PhaseAnimator, KeyframeAnimator, and GPU-accelerated shader effects.
// Explicit animation (preferred)
withAnimation(.spring(response: 0.4, dampingFraction: 0.75)) {
isExpanded.toggle()
}
// iOS 17+ spring presets
withAnimation(.snappy) { ... } // Fast, small bounce
withAnimation(.smooth) { ... } // Gentle, no bounce
withAnimation(.bouncy) { ... } // More bounce// Basic
.transition(.opacity)
.transition(.scale)
.transition(.slide)
.transition(.move(edge: .bottom))
// Combined
.transition(.move(edge: .trailing).combined(with: .opacity))
// Asymmetric
.transition(.asymmetric(
insertion: .move(edge: .bottom),
removal: .opacity
))@Namespace var namespace
// Source view
ThumbnailView()
.matchedGeometryEffect(id: "hero", in: namespace)
// Destination view
DetailView()
.matchedGeometryEffect(id: "hero", in: namespace)// Color manipulation
.colorEffect(ShaderLibrary.invert())
// Pixel displacement
.distortionEffect(
ShaderLibrary.wave(.float(time)),
maxSampleOffset: CGSize(width: 20, height: 20)
)
// Full layer access
.layerEffect(ShaderLibrary.blur(.float(radius)), maxSampleOffset: .zero)Detailed documentation is available in `references/`:
struct ExpandableCard: View {
@State private var isExpanded = false
var body: some View {
VStack {
RoundedRectangle(cornerRadius: isExpanded ? 20 : 12)
.fill(.blue)
.frame(
width: isExpanded ? 300 : 150,
height: isExpanded ? 400 : 100
)
}
.onTapGesture {
withAnimation(.spring(response: 0.35, dampingFraction: 0.75)) {
isExpanded.toggle()
}
}
}
}ForEach(Array(items.enumerated()), id: \.element.id) { index, item in
ItemRow(item: item)
.transition(.asymmetric(
insertion: .move(edge: .trailing).combined(with: .opacity),
removal: .move(edge: .leading).combined(with: .opacity)
))
.animation(.spring().delay(Double(index) * 0.05), value: items)
}Circle()
.fill(.blue)
.frame(width: 20, height: 20)
.scaleEffect(isPulsing ? 1.2 : 1.0)
.opacity(isPulsing ? 0.6 : 1.0)
.onAppear {
withAnimation(.easeInOut(duration: 1.0).repeatForever(autoreverses: true)) {
isPulsing = true
}
}1. **Motion should be purposeful** - Don't add animation for its own sake; support the experience without overshadowing it 2. **Make motion optional** - Supplement with haptics and audio; never use motion as the only way to communicate 3. **Aim for brevity** - Brief, precise animations feel lightweight and convey information effectively 4. **Prefer explicit animations** - Use `withAnimation` over `.animation()` modifier for clarity 5. **Use spring animations** - They feel more natural and iOS-native 6. **Start with `.spring(response: 0.35, dampingFraction: 0.8)`** - Good default for most interactions 7. **Keep animations under 400ms** - Longer feels sluggish 8. **Let people cancel motion** - Don't force users to wait for animations to complete 9. **Test on device** - Simulator animation timing differs 10. **Profile shader performance** - GPU time matters for complex effects
A comprehensive plugin and marketplace for Claude Code containing 24 custom skills across engineering, Apple development, product management, design, content, trading, database, QA, educational, and AI architecture domains.
Repo: jamesrochabrun/skills
Determine the best Anthropic architecture for your project by analyzing requirements and…
Master Anthropic's prompt engineering techniques to generate new prompts or improve existing…
Design iOS apps following Apple's Human Interface Guidelines. Generate native components,…
Expert children's book illustrator guide with 2024-2025 best practices, focusing on…
Generate comprehensive content briefs for writers, ensuring clarity, alignment, and strategic…
Generate comprehensive design briefs for design projects. Use this skill when designers ask…