A design tool for UIKit apps. Select an area of your running app, annotate what you want changed, and export structured context for AI coding agents.
- iOS 16+ deployment target (activates only on iOS 26+)
- UIKit
- Zero dependencies
Add via Swift Package Manager:
- File → Add Package Dependencies
- Paste the repo URL
- Add
UICritto your target
In your AppDelegate (or wherever you bootstrap):
#if DEBUG
import UICrit
if #available(iOS 26, *) {
UICrit.install(activationNotification: .deviceDidShake)
}
#endifThe package does not own any gesture — your host app posts the notification. A common pattern using shake:
extension UIWindow {
override open func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
super.motionEnded(motion, with: event)
if motion == .motionShake {
NotificationCenter.default.post(name: .deviceDidShake, object: nil)
}
}
}You can also skip the notification and control activation directly:
UICrit.activate()
UICrit.deactivate()
UICrit.toggle()When activated:
- Drag to select an area of the UI
- Adjust the selection if needed, then confirm
- Add an annotation describing what you want changed
- Export writes structured metadata, screenshots, and a markdown summary to
/tmp/UICrit/latest/and prints the path to the Xcode console
Exports write to /tmp/UICrit/<timestamp>/ with a symlink at /tmp/UICrit/latest/.
| File | Contents |
|---|---|
export.json |
Structured metadata for all views in the selected area, plus your annotation and area bounds |
export.md |
Human-readable markdown summary |
fullscreen.jpg |
Full-screen screenshot for context |
area.jpg |
Cropped screenshot of the selected area |
Opt-in flag that swizzles UIView.didMoveToSuperview to track view hierarchy changes at runtime:
UICrit.install(activationNotification: .deviceDidShake, autoInstrument: true)Default is false. Enabling this can interfere with custom navigation or modal transitions — use with caution.
- Activate UICrit in the simulator (shake or call
UICrit.activate()) - Drag to select the area you want to change
- Annotate with your intent (e.g. "make this button blue", "move this 8pt down", "hide when logged out")
- Export — the path prints to the Xcode console
- In Claude Code, type
/check-uicritto read the latest export
Copy the skill file from this repo into your project's .claude/commands/ directory:
mkdir -p .claude/commands
cp <path-to-uicrit-repo>/skill/check-uicrit.md .claude/commands/check-uicrit.mdThis registers /check-uicrit as a slash command in Claude Code. When invoked, Claude reads the latest export (JSON, screenshots, source files) and is ready to make targeted code changes.
Tip: Annotate with intent rather than describing what's there — the metadata already captures the current state.
Build the package:
xcodebuild build -scheme "UICrit" -destination "platform=iOS Simulator,name=iPhone 16"To verify end-to-end, integrate into a host app and run in the Simulator:
- Shake (or call
UICrit.activate()) to trigger the overlay - Drag to select an area → confirm selection rectangle appears
- Annotate → confirm input appears, annotation saves, and console prints the export directory path
- Verify
export.json,export.md, and screenshots in the temp directory