Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dpearson2699/photokit
Implement, review, or improve photo picking, camera capture, and media handling in iOS apps using PhotoKit and AVFoundation.
Passed 19 of 22 test cases with the skill, and 19 of 22 without it.
and 1 more in the full report
2 fixed17 passed either way1 still failing2 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
Can you build a camera capture screen in SwiftUI using AVCaptureSession? Output a dedicated camera controller class that manages the capture lifecycle on a background queue, a UIViewRepresentable layer wrapper for the camera preview, and the primary SwiftUI screen view that automatically halts the capture session when navigating away.
| Checked | Without skill | With skill |
|---|---|---|
| The camera session configuration installs defer { commitConfiguration() } immediately following beginConfiguration(). | Missed | Passed |
| The camera preview or permission handling includes a settings button linking to system settings via UIApplication.openSettingsURLString. | Missed | Passed |
The instructions your model reads when the skill loads.
Modern patterns for photo picking, camera capture, image loading, and media permissions targeting iOS 26+ with Swift 6.3. Patterns are backward-compatible to iOS 16 unless noted. See references/photokit-patterns.md for complete picker recipes and references/camera-capture.md for AVCaptureSession patterns.
PhotosPicker is the native SwiftUI replacement for UIImagePickerController. It runs out-of-process, requires no photo library permission for browsing, and supports single or multi-selection with media type filtering.
import SwiftUI
import PhotosUI
struct SinglePhotoPicker: View {
@State private var selectedItem: PhotosPickerItem?
@State private var selectedImage: Image?
var body: some View {
VStack {
if let selectedImage {
selectedImage
.resizable()
.scaledToFit()
.frame(maxHeight: 300)
}
PhotosPicker("Select Photo", selection: $selectedItem, matching: .images)
}
.onChange(of: selectedItem) { _, newItem in
test cases passed, vs 19 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.