hci-ios-swiftui
Applies human-computer interaction and accessibility principles to iOS apps built with SwiftUI or UIKit, following Apple's Human Interface Guidelines. Use whenever the user builds, reviews or fixes iOS or iPadOS UI and cares about VoiceOver, accessibilityLabel, Dynamic Type, 44 p
Install
npx skills add https://github.com/MehranQadirian/skills/tree/main/hci/hci-ios-swiftui
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install mehranqadirian-skills@llmmart
git clone https://github.com/MehranQadirian/skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole mehranqadirian/skills collection as a plugin from our marketplace. Git is the plain clone.
README
hci-ios-swiftui
A Claude skill that applies HCI and accessibility principles to iOS apps in SwiftUI and UIKit, following Apple's Human Interface Guidelines.
What it does
- Lints Swift code for missing accessibility labels, fixed fonts,
onTapGesturemisuse, small tap frames, physical left and right layout, truncating line limits and project gaps - Gives guidelines for VoiceOver, Dynamic Type, accessibility settings, feedback, forms, navigation, RTL and testing
- Explains each rule by its user impact
Try it
Make this SwiftUI view work with VoiceOver and Dynamic Type.
Review my settings screen against the Human Interface Guidelines.
My layout breaks at the largest text size. Fix it.
Install
Claude.ai: zip this folder, then go to Settings > Capabilities > Skills > Upload.
Claude Code:
cp -r hci/hci-ios-swiftui ~/.claude/skills/
Structure
hci-ios-swiftui/
├── SKILL.md skill instructions for Claude
├── scripts/lint_swift_hci.py Swift linter
└── references/ios-guidelines.md guidelines
Skill manifest
hci-ios-swiftui
Make an iOS app feel native and work for everyone: VoiceOver that reads the right thing, text that scales with Dynamic Type, comfortable targets and layouts that mirror in RTL. Builds on hci-foundations.
hci-ios-swiftui/
├── SKILL.md
├── scripts/
│ └── lint_swift_hci.py static checks for Swift files
└── references/
└── ios-guidelines.md VoiceOver, targets, Dynamic Type, settings, feedback, forms, navigation, RTL, tests
When to use
- Writing or reviewing SwiftUI views and UIKit screens
- Fixing VoiceOver issues or Accessibility Inspector findings
- Supporting Dynamic Type, Reduce Motion, Increase Contrast, dark mode and Persian or Arabic
- Choosing patterns for feedback, destructive actions, forms and navigation
Workflow
- Understand the screen: users, the key task, devices (iPhone, iPad), languages, SwiftUI or UIKit.
- Lint:
python3 scripts/lint_swift_hci.py Sources/(a file or a folder). It reports images without labels, fixed font sizes that ignore Dynamic Type,.onTapGestureinstead ofButton, small tap frames, left and right instead of leading and trailing,lineLimit(1)truncation, UIKit text alignment, and project gaps (localization, reduce motion). Add--strictto fail on warnings. - Fix in order: VoiceOver names and traits first, then Dynamic Type and tap targets, then feedback and forms, then settings such as Reduce Motion and contrast.
- Check against the principles: visibility of status, error prevention (keyboard types, confirmation dialogs, Undo), consistency with Apple's patterns (NavigationStack, tab bar, system sheets), recognition over recall. Cite the heuristic when explaining a change.
- Add checks: Xcode previews with large Dynamic Type, dark mode and RTL, and
performAccessibilityAudit()in UI tests. - Verify by hand and say what remains: VoiceOver and Voice Control through the key task, the largest accessibility text size, Reduce Motion, Increase Contrast, RTL. A linter cannot judge contrast, focus order or real speech output.
- Report findings, changes and open checks.
Rules
- Use
Button,Toggleand other system controls for interactive elements; if custom, add traits and a label - Every meaningful image has a label; decorative images are hidden from VoiceOver
- Use text styles and
@ScaledMetric; never hardcode sizes that ignore Dynamic Type - Tap targets are at least 44 by 44 pt with
contentShapefor the full area - Use
.leadingand.trailing; mirror only directional symbols - Honor Reduce Motion, Reduce Transparency, Increase Contrast and Differentiate Without Color
- Prefer Undo to confirmation; name the object in destructive dialogs
- Never claim accessibility from a quiet linter; state what was tested
What to report back
| Field | Content |
|---|---|
| Findings | rule, file and line, severity, user impact |
| Changes | what changed and the principle or HIG guidance it serves |
| Checks added | previews, accessibility audit |
| Manual checks left | VoiceOver, Dynamic Type at the largest size, RTL, Reduce Motion |
Related skills
hci-foundations: principles and evaluation reportshci-rtl-localization: right-to-left and multilingual detailshci-microcopy: wording for buttons, errors and empty stateshci-usability-testing: validate with real usershci-react-native,hci-flutter,hci-android-native: other mobile stacks
Files (skills)
-
references
-
ios-guidelines.md 5.4 KB
Loading…
-
-
scripts
-
lint_swift_hci.py 6 KB
Loading…
-
-
README.md 1.1 KB
# hci-ios-swiftui A [Claude skill](../../README.md) that applies HCI and accessibility principles to iOS apps in SwiftUI and UIKit, following Apple's Human Interface Guidelines. ## What it does - Lints Swift code for missing accessibility labels, fixed fonts, `onTapGesture` misuse, small tap frames, physical left and right layout, truncating line limits and project gaps - Gives guidelines for VoiceOver, Dynamic Type, accessibility settings, feedback, forms, navigation, RTL and testing - Explains each rule by its user impact ## Try it > Make this SwiftUI view work with VoiceOver and Dynamic Type. > Review my settings screen against the Human Interface Guidelines. > My layout breaks at the largest text size. Fix it. ## Install **Claude.ai:** zip this folder, then go to Settings > Capabilities > Skills > Upload. **Claude Code:** ```bash cp -r hci/hci-ios-swiftui ~/.claude/skills/ ``` ## Structure ``` hci-ios-swiftui/ ├── SKILL.md skill instructions for Claude ├── scripts/lint_swift_hci.py Swift linter └── references/ios-guidelines.md guidelines ``` -
SKILL.md 4 KB
--- name: hci-ios-swiftui description: Applies human-computer interaction and accessibility principles to iOS apps built with SwiftUI or UIKit, following Apple's Human Interface Guidelines. Use whenever the user builds, reviews or fixes iOS or iPadOS UI and cares about VoiceOver, accessibilityLabel, Dynamic Type, 44 pt touch targets, Reduce Motion, dark mode, forms and keyboards, haptics and feedback, navigation conventions or right-to-left languages, even if they only say "make my SwiftUI view more accessible". Lints Swift code with a script and fixes issues. --- # hci-ios-swiftui Make an iOS app feel native and work for everyone: VoiceOver that reads the right thing, text that scales with Dynamic Type, comfortable targets and layouts that mirror in RTL. Builds on `hci-foundations`. ``` hci-ios-swiftui/ ├── SKILL.md ├── scripts/ │ └── lint_swift_hci.py static checks for Swift files └── references/ └── ios-guidelines.md VoiceOver, targets, Dynamic Type, settings, feedback, forms, navigation, RTL, tests ``` ## When to use - Writing or reviewing SwiftUI views and UIKit screens - Fixing VoiceOver issues or Accessibility Inspector findings - Supporting Dynamic Type, Reduce Motion, Increase Contrast, dark mode and Persian or Arabic - Choosing patterns for feedback, destructive actions, forms and navigation ## Workflow 1. **Understand the screen**: users, the key task, devices (iPhone, iPad), languages, SwiftUI or UIKit. 2. **Lint**: `python3 scripts/lint_swift_hci.py Sources/` (a file or a folder). It reports images without labels, fixed font sizes that ignore Dynamic Type, `.onTapGesture` instead of `Button`, small tap frames, left and right instead of leading and trailing, `lineLimit(1)` truncation, UIKit text alignment, and project gaps (localization, reduce motion). Add `--strict` to fail on warnings. 3. **Fix in order**: VoiceOver names and traits first, then Dynamic Type and tap targets, then feedback and forms, then settings such as Reduce Motion and contrast. 4. **Check against the principles**: visibility of status, error prevention (keyboard types, confirmation dialogs, Undo), consistency with Apple's patterns (NavigationStack, tab bar, system sheets), recognition over recall. Cite the heuristic when explaining a change. 5. **Add checks**: Xcode previews with large Dynamic Type, dark mode and RTL, and `performAccessibilityAudit()` in UI tests. 6. **Verify by hand** and say what remains: VoiceOver and Voice Control through the key task, the largest accessibility text size, Reduce Motion, Increase Contrast, RTL. A linter cannot judge contrast, focus order or real speech output. 7. **Report** findings, changes and open checks. ## Rules - Use `Button`, `Toggle` and other system controls for interactive elements; if custom, add traits and a label - Every meaningful image has a label; decorative images are hidden from VoiceOver - Use text styles and `@ScaledMetric`; never hardcode sizes that ignore Dynamic Type - Tap targets are at least 44 by 44 pt with `contentShape` for the full area - Use `.leading` and `.trailing`; mirror only directional symbols - Honor Reduce Motion, Reduce Transparency, Increase Contrast and Differentiate Without Color - Prefer Undo to confirmation; name the object in destructive dialogs - Never claim accessibility from a quiet linter; state what was tested ## What to report back | Field | Content | |-------|---------| | Findings | rule, file and line, severity, user impact | | Changes | what changed and the principle or HIG guidance it serves | | Checks added | previews, accessibility audit | | Manual checks left | VoiceOver, Dynamic Type at the largest size, RTL, Reduce Motion | ## Related skills - `hci-foundations`: principles and evaluation reports - `hci-rtl-localization`: right-to-left and multilingual details - `hci-microcopy`: wording for buttons, errors and empty states - `hci-usability-testing`: validate with real users - `hci-react-native`, `hci-flutter`, `hci-android-native`: other mobile stacks
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.