camera-capture

Implement iOS camera capture workflows with AVFoundation and RotationCoordinator.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/derKlinke/codex-config --skill camera-capture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: camera-capture
Source: https://github.com/derKlinke/codex-config/tree/main/skills/ios-camera-capture
Command: npx skills add https://github.com/derKlinke/codex-config --skill camera-capture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers through implementing a robust, production-ready iOS camera capture flow using AVFoundation, covering session setup, orientation handling, and responsive capture UX.

Core Features & Use Cases

  • Session setup with AVCaptureSession, inputs and outputs for photos and video.
  • Rotation handling with RotationCoordinator to keep previews and captures correctly oriented across device orientations.
  • Responsive capture patterns to reduce shutter-lag, handle interruptions, and support front/back switching.
  • Example use cases include building a custom camera UI in a photo app, recording videos with optional audio, and ensuring smooth user experience under rotation and multitasking.

Quick Start

Use the camera-capture skill to initialize a basic AVCaptureSession, add a back camera input, and present a live preview in a SwiftUI view.

Frequently Asked Questions about camera-capture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up an AVCaptureSession for custom iOS camera capture?

To set up iOS camera capture, initialize an AVCaptureSession on a dedicated session queue, add back camera inputs, and configure photo or video outputs within your SwiftUI view for live preview.

How do I handle device rotation during AVFoundation camera preview?

AVFoundation camera rotation handling uses a RotationCoordinator to keep live previews and captured outputs correctly oriented across changing device orientations without manual interface adjustments.

What's the best way to reduce shutter lag in Swift camera capture?

Reducing shutter lag in Swift camera capture involves tracking session readiness and applying optional deferred processing, which maintains responsive UX during photo or video capture.

Can I switch between front and back cameras without restarting the AVCaptureSession?

Front and back camera switching is supported within an active AVCaptureSession workflow, handling input reconfiguration dynamically while maintaining continuous preview responsiveness.

Does AVFoundation camera capture handle audio interruptions and multitasking?

AVFoundation camera capture handles interruptions and multitasking by enforcing a dedicated session queue and readiness tracking, ensuring the capture workflow resumes properly after pauses.

Why do I need a dedicated session queue for iOS camera capture?

A dedicated session queue is needed for iOS camera capture to prevent blocking the main thread during AVCaptureSession configuration, ensuring smooth UI performance during setup and capture.