animations

A guide for implementing and debugging interface animations, including movement, timing, transitions, and keyframes.

In plain words
What is it for?
Use it when building or fixing animations in SwiftUI, especially transitions, spring effects, scrolling items, and phase or keyframe animations.
Why use it?
It helps prevent animated content from spilling outside its container and avoids inefficient rendering choices.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/moasq/ios-dev-agent/animations
Any agent
npx skills add moasq/ios-dev-agent --skill animations
Clone the repo
git clone --depth 1 https://github.com/moasq/ios-dev-agent

Made for: Claude Code, Codex.

Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 706 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.00706
Opus 5 $0.00014 $0.00353
Sonnet 5 $0.00005 $0.00141
Haiku 4.5 $0.00003 $0.00071

Measured 2d ago against content hash 23225c70c592, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

animations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/animations/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Animation Safety

Use this guide when implementing or debugging animations.

Containment (CRITICAL)

Animated content inside a container MUST NOT overflow its parent. Apply on the PARENT:

CardContainer {
    AnimatedContent()
        .transition(.scale.combined(with: .opacity))
}
.compositingGroup()
.clipped()
  • .compositingGroup() flattens child layers into one pass
  • .clipped() clips to parent frame
  • Together they guarantee zero visual overflow during any animation phase
  • Do NOT use .drawingGroup() — rasterizes via Metal, wastes memory
  • Do NOT rely on .scaleEffect(1) hack — fragile and undocumented

When to Apply

  • Any view with .transition() inside a sized container
  • Spring/bouncy animations that may overshoot bounds
  • Phase/keyframe animations that scale or offset children
  • ScrollView items with animated insertion/removal

When NOT Needed

  • Full-screen views with no parent boundary
  • Opacity-only animations
  • System navigation transitions

Modifier Order

// CORRECT — animation AFTER layout, containment on parent
VStack {
    content
        .offset(y: animating ? -20 : 0)
        .opacity(animating ? 0 : 1)
        .animation(.spring(duration: 0.4), value: animating)
}
.compositingGroup()
.clipped()

Prefer GPU Transforms

Use .scaleEffect, .offset, .rotationEffect, .opacity — GPU-accelerated, no layout pass. Avoid animating .frame, .padding, .font — triggers full layout recalculation.

Timing Curves

Curve Use Case
.spring(duration: 0.3) Default for most UI
.spring(duration: 0.4, bounce: 0.3) Playful emphasis
.easeInOut(duration: 0.25) Subtle transitions
.bouncy Intentional delight only

Keep durations under 0.5s for responsive feel.

Animation Scope

// CORRECT — scoped to specific value
.animation(.easeInOut(duration: 0.2), value: isSelected)

// WRONG — unscoped, animates everything
.animation(.easeInOut)
  • Bind .animation to a specific value — NEVER use without value parameter
  • Use withAnimation for user-triggered changes
  • Use .animation(_:value:) for derived/computed changes

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 99 lines · 27 tokens per session scan A 23225c70c592

Subscribe to this mod's changes

animations is a skill published in the GitHub repository moasq/ios-dev-agent (4 stars, last pushed 3mo ago), licensed MIT. It adds 27 tokens to every session and 706 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

design-guide

Paperclip UI design system guide for building consistent, reusable frontend components. Use when creating new UI components, modifying existing ones, adding pages or features to the frontend, styling UI elements, or when you need to understand the design language and conventions. Covers: component creation, design…

paperclipai/paperclip · 105 tokens

Shade ShadCN install

Guardrails for running pnpm dlx shadcn@latest add in Shade — never overwrite existing components, fresh branch first, swap raw colours for semantic tokens after integrating. Trigger when the user proposes a shadcn add, or when a fresh ShadCN-shaped file lands in apps/shade/src/components/ui.

TryGhost/Ghost · 72 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

material-ui-tailwind

Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.

mui/material-ui · 67 tokens

author-component

Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable…

dotnet/skills · 148 tokens

obsidian-layout-adjustment

Workflow for working with the user on changing how Obsidian looks using CSS snippets. Use this whenever the user asks to restyle Obsidian, tune a vault's visual layout, adjust tabs, sidebars, note surfaces, properties, backlinks, graph panes, file explorer rows, icons, links, shadows, active states, or CSS snippets.…

Ar9av/obsidian-wiki · 115 tokens