swiftui-gestures — Claude Code skill: what it does, how to install
Guides gesture implementation in SwiftUI, from tap and drag recognition to multi-gesture composition and conflict handling.
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a claude-codeWhat swiftui-gestures does
This skill provides instructions for implementing and reviewing SwiftUI gestures under modern Swift 6.3 patterns. It details basic gestures like TapGesture and LongPressGesture, alongside continuous interactions using DragGesture, MagnifyGesture, and RotateGesture.
It guides gesture composition using .simultaneously(with:), .sequenced(before:), and .exclusively(before:). For transient animations, it enforces @GestureState to automatically reset values once a touch interaction finishes.
Layouts, lists, and broader state architecture are outside its boundary and require separate skills. It targets modern APIs starting with iOS 17, replacing deprecated types like MagnificationGesture.
What it helps with
- combine zoom and rotation gestures simultaneously on a view
- chain a long press before starting a drag interaction
- migrate deprecated MagnificationGesture to MagnifyGesture
- manage transient interaction offsets with @GestureState
Example prompts for the agent
- Combine pinch-to-zoom and rotation gestures on an image using simultaneously
- Implement a drag gesture that only activates after a successful long press
- Update this view from MagnificationGesture to iOS 17 MagnifyGesture with @GestureState
How to install swiftui-gestures
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a claude-code2Manually: put the files in place
~/.claude/skills/swiftui-gestures/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swiftui-gestures/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a codex2Manually: put the files in place
.agents/skills/swiftui-gestures/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a cursor2Manually: put the files in place
.cursor/skills/swiftui-gestures/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills swiftui-gestures2Manually: put the files in place
.github/skills/swiftui-gestures/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/swiftui-gesturesManually: put the files in place
.devin/skills/swiftui-gestures/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swiftui-gestures
How to install swiftui-gestures in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill swiftui-gestures -a claude-code. This adds the gesture guidelines to your agent environment.
What does the swiftui-gestures skill do?
It guides AI assistants in writing and debugging SwiftUI gesture logic. It covers gesture composition, hit-testing priority, and state binding.
When should @GestureState be used instead of @State?
Use @GestureState for temporary values that must automatically reset when the gesture finishes. For persistent transformations like final offsets, store the result in @State.