kmshdev/claude-swift-toolkit/swiftui-effects-api
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "add blur effect", "apply shadow", "adjust opacity/brightness", "use blend modes", "create visual effects", or needs SwiftUI visual effects API reference. Provides view modifiers (blur, shadow, opacity), VisualEffect protocol, blend modes, and Canvas drawing.
Install
npx vskill@latest install kmshdev/claude-swift-toolkit/swiftui-effects-apiSKILL.md
Visual Effects API Reference
Lifecycle Position
Phase 3 API Reference — load during implementation when adding visual effects. Dispatched from autonomous-ui-workflow Phase 2 research table.
View Modifiers
| Modifier | Purpose | |
|---|---|---|
.blur(radius:opaque:) | Gaussian blur | |
.opacity(_:) | Transparency (0-1) | |
.brightness(_:) | Brighten | |
.contrast(_:) | Adjust contrast | |
.saturation(_:) | Adjust saturation | |
.grayscale(_:) | Grayscale | |
.hueRotation(_:) | Rotate hue by angle | |
.colorInvert() | Invert colors | |
.colorMultiply(_:) | Multiply by color | |
.luminanceToAlpha() | Luminance to alpha | |
.shadow(color:radius:x:y:) | Drop shadow |
VisualEffect (Geometry-Safe)
Methods: .blur(), .opacity(), .brightness(), .contrast(), .saturation(), .grayscale(), .hueRotation(), .colorEffect(shader:), .distortionEffect(shader:), .layerEffect(shader:)
Blend Modes
Darken: .darken, .multiply, .colorBurn, .plusDarker Lighten: .lighten, .screen, .colorDodge, .plusLighter Contrast: .overlay, .softLight, .hardLight Mix: .hue, .saturation, .color, .luminosity
Canvas (Immediate Mode)
When to Use Which
| Need | Use | |
|---|---|---|
| Frosted glass look | .ultraThinMaterial (see swiftui-material-api) or .blur(radius:) on background | |
| Drop shadow on card/element | .shadow(color:radius:x:y:) | |
| Inner glow/shadow | overlay with blurred shape | |
| Complex custom drawing | Canvas { context, size in } with drawingGroup() | |
| Animated visual effect | .visualEffect { content, proxy in } for geometry-aware transforms | |
| GPU shader effects | .colorEffect(), .distortionEffect(), .layerEffect() | |
| Compositing/blending | .blendMode(.overlay), .compositingGroup() |
Performance Cost Ranking
- Blur at radius > 20 is expensive — avoid in ScrollView rows
- Shadow on every list cell adds up — consider
drawingGroup()for complex cells - Canvas is faster than equivalent modifier stacks for 10+ shapes
- Always use
drawingGroup()before Metal shader modifiers
Common Mistakes
.blur(radius: 50)on every list row — kills scroll performance. Use sparingly or cache- Shadow on every cell without
drawingGroup()— each shadow is a separate render pass - Canvas without
drawingGroup()— doesn't rasterize to offscreen buffer, loses performance benefit .visualEffectwith layout-changing transforms — only use for visual transforms (scale, offset, opacity), not frame changes- Applying
.blendMode()without.compositingGroup()— blend mode leaks to parent unless grouped
Before (incorrect):
After (correct):
Before (incorrect):
After (correct):
Checklist
- [ ] No blur in ScrollView/List row views (or explicitly justified)
- [ ] Canvas views use
drawingGroup()for complex drawing - [ ]
visualEffectonly uses visual transforms (not layout) - [ ]
.compositingGroup()wraps views using.blendMode() - [ ] Metal shader effects gated with
#availablecheck
Cross-References
swiftui-material-api— material backgrounds (preferred over manual blur for frosted glass)swiftui-colors-api— colors used in gradients and Canvas drawingapple-liquid-glass-design— Liquid Glass effects (separate from standard SwiftUI effects)
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
- SKILL.md in the repositoryCheckingplugins/apple-design-system/skills/swiftui-effects-api/SKILL.md
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
[](https://verified-skill.com/skills/kmshdev/claude-swift-toolkit/swiftui-effects-api)