/haptics
Use when adding haptic feedback for user confirmations (button presses, toggles, purchases), error notifications, or custom tactile patterns (Core Haptics). Covers UIFeedbackGenerator and CHHapticEngine patterns.
$ npx -y skills add johnrogers/claude-swift-engineering --skill haptics --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/haptics
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when adding haptic feedback for user confirmations (button presses, toggles, purchases), error notifications, or custom tactile patterns (Core Haptics). Covers UIFeedbackGenerator and CHHapticEngine patterns.
SKILL.md
haptics.SKILL.mdname: haptics
description: Use when adding haptic feedback for user confirmations (button presses, toggles, purchases), error notifications, or custom tactile patterns (Core Haptics). Covers UIFeedbackGenerator and CHHapticEngine patterns.
Haptics
Haptic feedback provides tactile confirmation of user actions and system events. When designed thoughtfully, haptics transform interfaces from functional to delightful.
Overview
Haptics should enhance interactions, not dominate them. The core principle: haptic feedback is like sound design—every haptic should have purpose (confirmation, error, warning), timing (immediate or delayed), and restraint (less is more).
Reference Loading Guide
**ALWAYS load reference files if there is even a small chance the content may be required.** It's better to have the context than to miss a pattern or make a mistake.
| Reference | Load When | |-----------|-----------| | **[UIFeedbackGenerator](references/uifeedbackgenerator.md)** | Using simple impact/selection/notification haptics | | **[Core Haptics](references/core-haptics.md)** | Creating custom patterns with CHHapticEngine | | **[AHAP Patterns](references/ahap-patterns.md)** | Working with Apple Haptic Audio Pattern files | | **[Design Principles](references/design-principles.md)** | Applying Causality, Harmony, Utility framework |
Core Workflow
1. **Choose complexity level**: Simple (UIFeedbackGenerator) vs Custom (Core Haptics) 2. **For simple haptics**: Use UIImpactFeedbackGenerator, UISelectionFeedbackGenerator, or UINotificationFeedbackGenerator 3. **For custom patterns**: Create CHHapticEngine, define CHHapticEvents, build CHHapticPattern 4. **Prepare before triggering**: Call `prepare()` to reduce latency 5. **Apply design principles**: Ensure Causality (timing), Harmony (multimodal), Utility (meaningful)
System Requirements
- **iOS 10+** for UIFeedbackGenerator
- **iOS 13+** for Core Haptics (CHHapticEngine)
- **iPhone 8+** for Core Haptics hardware support
- **Physical device required** - haptics cannot be tested in Simulator
Common Mistakes
1. **Haptic feedback on every action** — Every button doesn't need haptics. Reserve haptics for critical confirmations (purchase, delete, settings change). Over-haptics are annoying and drain battery.
2. **Triggering haptics on main thread blocks** — Long haptic patterns can freeze UI briefly. Use background threads or async for Core Haptics `prepare()` calls to prevent jank.
3. **Haptic without audio/visual feedback** — Relying ONLY on haptics means deaf or deaf-blind users miss feedback. Always pair haptics with sound or visual response.
4. **Ignoring haptic settings** — Some users disable haptics system-wide. Check `UIFeedbackGenerator.isHapticFeedbackEnabled` before triggering. Graceful degradation is required.
5. **AHAP file errors silently** — Invalid AHAP files fail silently without errors. Test with Xcode's haptic designer and validate file syntax before shipping.
6. **Forgetting battery impact** — Continuous haptic patterns (progress bars, loading states) drain battery fast. Use haptics for state changes only, not ongoing feedback.
Read more
name: haptics description: Use when adding haptic feedback for user confirmations (button presses, toggles, purchases), error notifications, or custom tactile patterns (Core Haptics). Covers UIFeedbackGenerator and CHHapticEngine patterns.
Haptics
Haptic feedback provides tactile confirmation of user actions and system events. When designed thoughtfully, haptics transform interfaces from functional to delightful.
Overview
Haptics should enhance interactions, not dominate them. The core principle: haptic feedback is like sound design—every haptic should have purpose (confirmation, error, warning), timing (immediate or delayed), and restraint (less is more).
Reference Loading Guide
**ALWAYS load reference files if there is even a small chance the content may be required.** It's better to have the context than to miss a pattern or make a mistake.
| Reference | Load When | |-----------|-----------| | **[UIFeedbackGenerator](references/uifeedbackgenerator.md)** | Using simple impact/selection/notification haptics | | **[Core Haptics](references/core-haptics.md)** | Creating custom patterns with CHHapticEngine | | **[AHAP Patterns](references/ahap-patterns.md)** | Working with Apple Haptic Audio Pattern files | | **[Design Principles](references/design-principles.md)** | Applying Causality, Harmony, Utility framework |
Core Workflow
1. **Choose complexity level**: Simple (UIFeedbackGenerator) vs Custom (Core Haptics) 2. **For simple haptics**: Use UIImpactFeedbackGenerator, UISelectionFeedbackGenerator, or UINotificationFeedbackGenerator 3. **For custom patterns**: Create CHHapticEngine, define CHHapticEvents, build CHHapticPattern 4. **Prepare before triggering**: Call `prepare()` to reduce latency 5. **Apply design principles**: Ensure Causality (timing), Harmony (multimodal), Utility (meaningful)
System Requirements
- **iOS 10+** for UIFeedbackGenerator
- **iOS 13+** for Core Haptics (CHHapticEngine)
- **iPhone 8+** for Core Haptics hardware support
- **Physical device required** - haptics cannot be tested in Simulator
Common Mistakes
1. **Haptic feedback on every action** — Every button doesn't need haptics. Reserve haptics for critical confirmations (purchase, delete, settings change). Over-haptics are annoying and drain battery.
2. **Triggering haptics on main thread blocks** — Long haptic patterns can freeze UI briefly. Use background threads or async for Core Haptics `prepare()` calls to prevent jank.
3. **Haptic without audio/visual feedback** — Relying ONLY on haptics means deaf or deaf-blind users miss feedback. Always pair haptics with sound or visual response.
4. **Ignoring haptic settings** — Some users disable haptics system-wide. Check `UIFeedbackGenerator.isHapticFeedbackEnabled` before triggering. Graceful degradation is required.
5. **AHAP file errors silently** — Invalid AHAP files fail silently without errors. Test with Xcode's haptic designer and validate file syntax before shipping.
6. **Forgetting battery impact** — Continuous haptic patterns (progress bars, loading states) drain battery fast. Use haptics for state changes only, not ongoing feedback.
Claude Code plugin marketplace for modern Swift/SwiftUI development A specialized AI toolkit for building professional iOS/macOS features with modern Swift 6.2, TCA (The Composable Architecture), and SwiftUI.
Other skills on claude-swift-engineering.
- /composable-architecture
Use when building features with TCA (The Composable Architecture), structuring reducers, managing state, handling effects, navigation, or testing TCA features. Covers @Reducer, Store, Effect, TestStore, reducer composition, and TCA patterns.
Open skill - /foundation-models
Use when implementing on-device AI with Apple's Foundation Models framework (iOS 26+), building summarization/extraction/classification features, or using @Generable for type-safe structured output.
Open skill - /generating-swift-package-docs
Use when encountering unfamiliar import statements, exploring dependency APIs, or when user asks "what's import X" or "what does X do". Generates on-demand API documentation for Swift package dependencies.
Open skill - /grdb
Use when writing raw SQL with GRDB, complex joins across 4+ tables, window functions, ValueObservation for reactive queries, or dropping down from SQLiteData for performance. Direct SQLite access for iOS/macOS with type-safe queries and migrations.
Open skill - /ios-26-platform
Use when implementing iOS 26 features (Liquid Glass, new SwiftUI APIs, WebView, Chart3D), deploying iOS 26+ apps, or supporting backward compatibility with iOS 17/18.
Open skill - /ios-hig
Use when designing iOS interfaces, implementing accessibility (VoiceOver, Dynamic Type), handling dark mode, ensuring adequate touch targets, providing animation/haptic feedback, or requesting user permissions. Apple Human Interface Guidelines for iOS compliance.
Open skill

