Agent skill

Swiftui Animation

by jamesrochabrun in jamesrochabrun/skills

This skill provides comprehensive guidance for implementing advanced SwiftUI animations, transitions, matched geometry effects, and Metal shader integration.

MITAuto-check passedMobile

Install Swiftui Animation

skills CLI
$ npx skills add jamesrochabrun/skills --skill swiftui-animation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jamesrochabrun/skills swiftui-animation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jamesrochabrun/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/swiftui-animation .claude/skills/swiftui-animation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swiftui-animation
GitHub stars
216
Used in
1 other repo
Token cost
~1.6k tokens
SKILL.md length
404 words
Files
5 (incl. references)
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

This skill provides comprehensive guidance for implementing advanced SwiftUI animations, transitions, matched geometry effects, and Metal shader integration.

  • Works in 10 steps: Motion should be purposeful - Don't add… → Make motion optional - Supplement with… → Aim for brevity - Brief, precise… → …
  • Building animations
  • SKILL.md covers When to Use This Skill, Quick Reference, Reference Materials and Common Patterns, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swiftui Animation is an agent skill from jamesrochabrun/skills. 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.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/animations.md`, `references/metal-shaders.md` and `references/motion-guidelines.md`).

It sits in Mobile, covering iOS development. It works with SwiftUI, iOS and macOS. The licence is MIT.

When your agent uses it

  • Building animations
  • View transitions
  • Hero animations
  • GPU-accelerated effects in SwiftUI apps for iOS and macOS

Example prompts

  • “/swiftui-animation”

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit 2482c17. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are swift).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swiftui Animation loads about 1.6k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 76 tokens; SKILL.md has 404 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jamesrochabrun/skills at commit 2482c17, republished under its MIT licence (© jamesrochabrun). 404 words, ~1,554 tokens.

Download SKILL.mdSave it as .claude/skills/swiftui-animation/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
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.

SwiftUI Animation Expert

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.

When to Use This Skill

  • Understanding motion design principles and when to use animation
  • Making animations accessible and platform-appropriate
  • Implementing animations in SwiftUI (springs, easing, keyframes)
  • Creating view transitions (fade, slide, scale, custom)
  • Building hero animations with matchedGeometryEffect
  • Adding GPU-accelerated effects with Metal shaders
  • Optimizing animation performance
  • Creating multi-phase orchestrated animations

Quick Reference

Animation Basics
swift
// 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
Common Transitions
swift
// 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
))
Matched Geometry Effect
swift
@Namespace var namespace

// Source view
ThumbnailView()
    .matchedGeometryEffect(id: "hero", in: namespace)

// Destination view
DetailView()
    .matchedGeometryEffect(id: "hero", in: namespace)
Metal Shader Effects (iOS 17+)
swift
// 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)

Reference Materials

Detailed documentation is available in references/:

  • motion-guidelines.md - HIG Motion design principles

    • Purpose-driven motion philosophy
    • Accessibility requirements
    • Platform-specific considerations (iOS, visionOS, watchOS)
    • Animation anti-patterns to avoid
  • animations.md - Complete animation API guide

    • Implicit vs explicit animations
    • Spring parameters and presets
    • Animation modifiers (speed, delay, repeat)
    • PhaseAnimator for multi-step sequences
    • KeyframeAnimator for property-specific timelines
    • Custom animatable properties
  • transitions.md - View transition guide

    • Built-in transitions (opacity, scale, slide, move)
    • Combined and asymmetric transitions
    • Matched geometry effect implementation
    • Hero animation patterns
    • Content transitions (iOS 17+)
    • Custom transition creation
  • metal-shaders.md - GPU shader integration

    • SwiftUI shader modifiers (colorEffect, distortionEffect, layerEffect)
    • Writing Metal shader functions
    • Embedding MTKView with UIViewRepresentable
    • Cross-platform Metal integration (iOS/macOS)
    • Performance considerations

Common Patterns

Expandable Card
swift
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()
            }
        }
    }
}
List Item Appearance
swift
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)
}
Pulsing Indicator
swift
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
        }
    }
Show full SKILL.md (194 more words)Show less

Best Practices

  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

Troubleshooting

Animation not working
  • Ensure state change is wrapped in withAnimation
  • Check that the property is animatable
  • Verify the view is actually changing
Matched geometry jumps
  • Both views must use the same ID and namespace
  • Use explicit withAnimation when toggling
  • Check zIndex for proper layering
Shader not appearing
  • Verify .metal file is added to target
  • Check shader function signature matches expected format
  • Ensure maxSampleOffset is set correctly for distortion effects

© jamesrochabrun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/swiftui-animation of jamesrochabrun/skills.

  • SKILL.md
  • references/animations.md
  • references/metal-shaders.md
  • references/motion-guidelines.md
  • references/transitions.md

Open the folder on GitHubat commit 2482c17

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in jamesrochabrun/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Swiftui Animation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swiftui Animation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swiftui Animation this skilljamesrochabrun/skills2161 repos~1.6kAutomated safety check: PassMIT
Swiftui Expert Skillomarshahine/HomeClaw1754 repos~2.8kAutomated safety check: PassMIT
Hig Project Contextraintree-technology/hig-doctor1435 repos~1.2kAutomated safety check: PassMIT
Swiftui Expert SkillEslzzyl/Pixiv-SwiftUI1111 repos~2.9kAutomated safety check: PassAGPL-3.0
Hig Components Contentraintree-technology/hig-doctor1435 repos~1.3kAutomated safety check: PassMIT
SwiftUI Design SkillWholiver/swiftui-design-skill213—~2.8kAutomated safety check: PassMIT

Similar skills

  • Swiftui Expert Skill

    omarshahine/HomeClaw

    A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management, view composition, performance, Liquid Glass adoption, or Instruments .trace…

    175 GitHub starsUsed in 4 repos~2.8k tokens
    MobileAuto-check passed
  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    143 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Swiftui Expert Skill

    Eslzzyl/Pixiv-SwiftUI

    A skill your agent uses when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state and @Observable data flow, view composition, resizable layouts, safe areas, display…

    111 GitHub starsUsed in 1 repo~2.9k tokens
    MobileAuto-check passed
  • Hig Components Content

    raintree-technology/hig-doctor

    Apple Human Interface Guidelines for content display components.

    143 GitHub starsUsed in 5 repos~1.3k tokens
    MobileAuto-check passed
  • SwiftUI Design Skill

    Wholiver/swiftui-design-skill

    Guides the agent to design distinctive SwiftUI interfaces for iOS and macOS, with six anti-generic rules, a design direction workflow and a five-dimension review.

    213 GitHub stars~2.8k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Swiftui Backports

    shaps80/SwiftUIBackports

    Find SwiftUIBackports replacements for SwiftUI APIs unavailable on a project deployment target.

    1.1k GitHub stars~604 tokensUpdated 3 mo ago
    MobileAuto-check passed

More from jamesrochabrun/skills

All 23 skills in this repo
  • Prd Generator

    jamesrochabrun/skills

    Generate comprehensive Product Requirements Documents (PRDs) for product managers.

    216 GitHub starsUsed in 2 repos~3.8k tokens
    Auto-check passed
  • Technical Launch Planner

    jamesrochabrun/skills

    Plan and execute technical product launches for developer tools, APIs, and technical products.

    216 GitHub starsUsed in 1 repo~3.8k tokens
    Auto-check passed
  • Design Brief Generator

    jamesrochabrun/skills

    Generate comprehensive design briefs for design projects. An agent skill from jamesrochabrun/skills.

    216 GitHub stars~3.3k tokensUpdated 8 mo ago
    Auto-check passed
  • Git Worktrees

    jamesrochabrun/skills

    Manage Git worktrees for parallel Claude Code development. An agent skill from jamesrochabrun/skills.

    216 GitHub stars~4.2k tokensUpdated 8 mo ago
    Auto-check passed
  • Content Brief Generator

    jamesrochabrun/skills

    Generate comprehensive content briefs for writers, ensuring clarity, alignment, and strategic content creation across all formats.

    216 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • LLM Router

    jamesrochabrun/skills

    This skill should be used when users want to route LLM requests to different AI providers (OpenAI, Grok/xAI, Groq, DeepSeek, OpenRouter) using SwiftOpenAI-CLI.

    216 GitHub stars~3.3k tokensUpdated 8 mo ago
    Auto-check passed

Works with

Categories

Questions about Swiftui Animation

What does Swiftui Animation do?

This skill provides comprehensive guidance for implementing advanced SwiftUI animations, transitions, matched geometry effects, and Metal shader integration. Swiftui Animation is an agent skill from jamesrochabrun/skills. This skill provides comprehensive guidance for implementing advanced SwiftUI animations, transitions, matched geometry effects, and Metal shader integration.

When should I use Swiftui Animation?

Swiftui Animation fits situations like: building animations; view transitions; hero animations; GPU-accelerated effects in SwiftUI apps for iOS and macOS.

How do I install Swiftui Animation in Claude Code?

Run `npx skills add jamesrochabrun/skills --skill swiftui-animation -a claude-code`. Or copy the skill folder (skills/swiftui-animation in jamesrochabrun/skills) into .claude/skills/swiftui-animation in your project. Claude Code loads it when a task matches its description.

How do I install Swiftui Animation in Codex?

Run `npx skills add jamesrochabrun/skills --skill swiftui-animation -a codex`. Or copy the skill folder (skills/swiftui-animation in jamesrochabrun/skills) into .agents/skills/swiftui-animation in your project. Codex loads it when a task matches its description.

Can I use Swiftui Animation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jamesrochabrun/skills --skill swiftui-animation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swiftui-animation, .gemini/skills/swiftui-animation, .github/skills/swiftui-animation and .opencode/skills/swiftui-animation in your project.

What does Swiftui Animation need to run?

SKILL.md names no scripts, command-line tools or credentials: Swiftui Animation is instructions for the agent only.

Does Swiftui Animation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Swiftui Animation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Swiftui Animation use?

Swiftui Animation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swiftui Animation use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 16k tokens, read only when the agent opens those files.

What are the alternatives to Swiftui Animation?

Skills that share tags, products or a category with Swiftui Animation: Swiftui Expert Skill (omarshahine/HomeClaw, 175 stars), Hig Project Context (raintree-technology/hig-doctor, 143 stars), Swiftui Expert Skill (Eslzzyl/Pixiv-SwiftUI, 111 stars) and Hig Components Content (raintree-technology/hig-doctor, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swiftui Animation?

jamesrochabrun (a GitHub user) maintains it in jamesrochabrun/skills, which has 216 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on January 14, 2026.

Source: jamesrochabrun/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.