core-animation-layer-workflow

A guide for using Core Animation and CALayer trees to render and animate Apple-platform interfaces. It covers layer-backed AppKit and UIKit views and bridges to SwiftUI when needed.

In plain words
What is it for?
Use it for CALayer trees, shape, gradient, text, emitter, replicator, tiled, and transform layers, custom layer subclasses, animation timing, animation bugs, and layer-backed rendering diagnosis.
Why use it?
It clarifies ownership between views and layers and helps explain timing, implicit versus explicit animation, model versus presentation state, hit testing, scaling, and performance.

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/gaelic-ghost/socket/core-animation-layer-workflow
Any agent
npx skills add gaelic-ghost/socket --skill core-animation-layer-workflow
Clone the repo
git clone --depth 1 https://github.com/gaelic-ghost/socket

Made for: Claude Code, Codex.

Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,802 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.00143 $0.01802
Opus 5 $0.00072 $0.00901
Sonnet 5 $0.00029 $0.00360
Haiku 4.5 $0.00014 $0.00180

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

Security

Grade A, and why

core-animation-layer-workflow 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.

plugins/apple-dev-skills/skills/core-animation-layer-workflow/SKILL.md · 135 lines

How it starts

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

Core Animation Layer Workflow

Purpose

Use this skill to decide when Core Animation is the right layer-backed rendering or animation surface, then guide implementation, repair, and validation without confusing layer ownership with SwiftUI, AppKit, or UIKit view ownership.

It is not the default path for ordinary SwiftUI motion, AppKit/UIKit control animation, app architecture, or Xcode execution.

When To Use

  • Use this skill when the task mentions Core Animation, QuartzCore, CALayer, CAAnimation, CABasicAnimation, CAKeyframeAnimation, CAAnimationGroup, CATransaction, CAMediaTiming, presentationLayer, modelLayer, or layer trees.
  • Use this skill when the task mentions layer-backed AppKit views, wantsLayer, UIView.layer, layerClass, custom CALayer subclasses, shape layers, gradient layers, text layers, tiled layers, emitter layers, replicator layers, or transform layers.
  • Use this skill when the work needs model-layer versus presentation-layer reasoning, implicit-animation repair, explicit-animation timing, hit-testing during animation, layer-content scaling, or layer-backed performance diagnosis.
  • Recommend swiftui-animation-workflow when SwiftUI-native state animation, transitions, phase/keyframe animation, or reduce-motion behavior is enough.
  • Recommend appkit-app-architecture-workflow or swiftui-app-architecture-workflow when the real issue is ownership, view structure, scene structure, or lifecycle.
  • Recommend xcode-build-run-workflow when the next step is build, preview, simulator, screenshot, runtime diagnostics, Instruments handoff, or project-file validation.

Single-Path Workflow

  1. Classify the layer job:
    • view backing layer
    • custom layer drawing
    • implicit property animation
    • explicit CAAnimation
    • layer tree composition
    • model/presentation mismatch
    • layer bridge from SwiftUI, AppKit, or UIKit
    • performance or rendering artifact diagnosis
  2. Apply the Apple docs gate:
    • read the relevant Apple documentation first
    • state the documented behavior being relied on before recommending implementation
    • if Apple docs and the current code disagree, stop and surface the conflict
    • if no relevant Apple docs can be found, say that explicitly before proceeding
  3. Decide whether Core Animation is justified:
    • stay in SwiftUI, AppKit, or UIKit when their animation helpers cover the behavior clearly
    • use Core Animation when the task needs layer tree composition, presentation-layer inspection, custom layer subclasses, specialized layer types, or lower-level timing
    • consider SpriteKit, SceneKit, Metal, AVFoundation, or Canvas when the task is really game, 3D, GPU rendering, video, or SwiftUI drawing work
  4. Choose the layer ownership boundary:
    • UIKit view backing layer
    • AppKit layer-backed view
    • standalone sublayer tree owned by a view/controller/representable
    • custom layer class with explicit inputs
    • SwiftUI bridge via representable or hosting boundary
  5. Choose the animation path:
    • implicit animation through property changes and transactions
    • explicit animation object when timing, repeat, key path, fill behavior, or presentation continuity requires it
    • disabled actions when layout or data updates must not animate
    • framework-level animation when Core Animation is unnecessary
  6. Check model and presentation behavior:
    • update the model layer to the intended final value
    • use presentation layer only for in-flight visual state, hit testing, or diagnostics
    • avoid leaving animations that visually finish but snap because the model layer was not updated
  7. Return one recommendation path with:
    • the layer ownership boundary
    • chosen layer or animation primitive
    • documented behavior relied on
    • artifact, timing, or performance risk
    • validation or handoff step

Read the full file on GitHub · 135 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 135 lines · 143 tokens per session scan A 7810c8d852e7

Subscribe to this mod's changes

core-animation-layer-workflow is a skill published in the GitHub repository gaelic-ghost/socket (7 stars, last pushed 6d ago), licensed Apache-2.0. It adds 143 tokens to every session and 1,802 once invoked, about $0.0007 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

baocut

BaoCut-only operator for the installed bcut CLI and .bcut projects. Implicitly trigger only when the request explicitly names BaoCut or bcut, targets a .bcut project or BaoCut Subtitle Studio, or continues a BaoCut workflow already established in the conversation. Do not trigger solely for generic audio or video…

JimLiu/baocut · 160 tokens

use-gemini-web

Use the user's logged-in Gemini Web session as an untrusted auxiliary model when its public YouTube audio/visual understanding, public-URL context, or an independent second analysis materially helps Codex answer or verify a request. Use for one or multiple public videos, follow-up questions, cross-checking, or a fresh…

andrewLi1994/gemini-web-bridge · 110 tokens

apple-music-player

Play random songs or specific tracks in Music.app from the local Music library. Use when a user asks to play a random song by artist, random track from an album, random track from a playlist, or a specific track by name (optionally with artist).

IvanCampos/agents · 57 tokens

ffmpeg-video-editor-h265

Generate FFmpeg commands from natural language video editing requests - cut, trim, convert, compress, change aspect ratio, extract audio, and more.

IvanCampos/agents · 36 tokens

swift-concurrency-pro

Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls. Use when reading, writing, or reviewing Swift concurrency code.

jacklandrin/OnlySwitch · 35 tokens

swiftui-pro

Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projects.

jacklandrin/OnlySwitch · 36 tokens