dpearson2699/swift-ios-skills / skills/photokit
photokit
VerifiedImplement, review, or improve photo picking, camera capture, and media handling in iOS apps using PhotoKit and AVFoundation. Use when working with PhotosPicker, PHPickerViewController, camera capture sessions (AVCaptureSession), photo library access, image loading and display, video recording, or media permissions. Also use when selecting photos from the library, taking pictures, recording video, processing images, or handling photo/camera privacy permissions in Swift apps.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 15.7 KB |
| evals/evals.json | config | 3.8 KB |
| references/av-playback.md | markdown | 19.7 KB |
| references/camera-capture.md | markdown | 23.4 KB |
| references/image-loading-caching.md | markdown | 24.7 KB |
| references/photokit-patterns.md | markdown | 18.2 KB |
evals/evals.json
View on GitHub{
"skill_name": "photokit",
"evals": [
{
"id": 1,
"prompt": "Review a SwiftUI photo-import grid that requests full photo-library access before presenting a picker, loads each selected 48 MP image directly into UIImage, and does the work inline from the view update. Give a privacy-preserving, memory-safe correction plan.",
"expected_output": "A focused PhotoKit review that uses the system picker without unnecessary library permission, loads selected items asynchronously, downsamples before display, and distinguishes picker access from custom-library access.",
"files": [],
"expectations": [
"Recommends PhotosPicker or PHPickerViewController for user-selected media instead of UIImagePickerController.",
"States that the system picker does not require photo-library permission merely to browse and return selected items.",
"Uses loadTransferable(type:) asynchronously and handles nil or thrown decode failures.",
"Downsamples large image data with CGImageSource before creating display-sized images.",
"Requests read-write access only for a custom library browser or other full-library reads and handles limited access.",
"Mentions the appropriate photo-library usage-description key only when explicit access is actually needed."
]
},
{
"id": 2,
"prompt": "Review an AVCaptureSession controller that calls beginConfiguration() on the main actor, can return before commitConfiguration(), starts the session in Task.detached, and stops it from another queue when the SwiftUI view disappears. Provide a corrected lifecycle design.",
"expected_output": "A camera-session correction that serializes configuration and start/stop operations on one non-main executor, balances configuration transactions, checks addability, and keeps the representable limited to preview display.",
"files": [],
"expectations": [
"Requires one dedicated serial executor or queue to own configuration, startRunning(), and stopRunning().",
"Rejects mixing main-actor configuration with detached or unrelated-queue start and stop calls.",
"Balances beginConfiguration() with commitConfiguration(), including early failures, using defer or an equivalent guaranteed transaction boundary.",
"Checks canAddInput and canAddOutput before mutating the session graph.",
"Requests camera permission before entering the configuration transaction.",
"Keeps AVCaptureSession ownership outside UIViewRepresentable and limits the representable to the preview layer."
]
},
{
"id": 3,
"prompt": "An iOS media feature needs user-selected photos, a custom all-assets browser, camera capture, remote thumbnail caching, and video playback. Explain which PhotoKit guidance applies directly and where adjacent framework guidance should take over.",
"expected_output": "A boundary-aware media plan that owns PhotosPicker, explicit library access, camera capture, and display-sized image handling while routing playback and production remote-image caching to the appropriate adjacent guidance.",
"files": [],
"expectations": [
"Keeps PhotosPicker or PHPickerViewController selection and PhotosPickerItem loading in PhotoKit scope.",
"Keeps PHPhotoLibrary authorization and limited-library handling in PhotoKit scope for the custom asset browser.",
"Keeps AVCaptureSession camera configuration and capture lifecycle in PhotoKit's camera guidance.",
"Routes detailed AVPlayer or playback-session behavior to AVKit or AVFoundation playback guidance.",
"Routes production remote-image cache architecture to dedicated image-loading or networking guidance while retaining downsampling advice.",
"Does not request full photo-library access for the picker-only path."
]
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |