haptics
Skill0 starsChanged 2 months agoMITView on GitHub
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.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- moasq/ios-dev-agenttheir own version, first seen May 26, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- moasq/ios-dev-agent★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- animateSkill
- composable-architectureSkill
- find-animation-opportunitiesSkill
- generating-swift-package-docsSkill
- improve-animationsSkill
- ios-26-platformSkill
- ios-higSkill
- ios-simulator-skillSkill
- localizationSkill
- review-animationsSkill
- spm-build-analysisSkill
- storekitSkill
- swift-concurrencySkill
- swift-dataSkill
- swift-diagnosticsSkill
- swift-networkingSkill
- swift-styleSkill
- swift-testingSkill
- swiftuiSkill
- write-swiftSkill
- xcode-buildSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
For simple haptics: Use UIImpactFeedbackGenerator, UISelectionFeedbackGenerator, or UINotificationFeedbackGenerator
- Distinctive: line 29
For custom patterns: Create CHHapticEngine, define CHHapticEvents, build CHHapticPattern
- Very specific: line 30
Prepare before triggering: Call prepare() to reduce latency
- Distinctive: line 31
Apply design principles: Ensure Causality (timing), Harmony (multimodal), Utility (meaningful)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 | Using simple impact/selection/notification haptics |
| Core Haptics | Creating custom patterns with CHHapticEngine |
| AHAP Patterns | Working with Apple Haptic Audio Pattern files |
| Design Principles | Applying Causality, Harmony, Utility framework |
Core Workflow
- Choose complexity level: Simple (UIFeedbackGenerator) vs Custom (Core Haptics)
- For simple haptics: Use UIImpactFeedbackGenerator, UISelectionFeedbackGenerator, or UINotificationFeedbackGenerator
- For custom patterns: Create CHHapticEngine, define CHHapticEvents, build CHHapticPattern
- Prepare before triggering: Call
prepare()to reduce latency - 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
- 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.
- 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. - 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.
- Ignoring haptic settings — Some users disable haptics system-wide. Check
UIFeedbackGenerator.isHapticFeedbackEnabledbefore triggering. Graceful degradation is required. - AHAP file errors silently — Invalid AHAP files fail silently without errors. Test with Xcode's haptic designer and validate file syntax before shipping.
- Forgetting battery impact — Continuous haptic patterns (progress bars, loading states) drain battery fast. Use haptics for state changes only, not ongoing feedback.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

