Back to Skills

axiom-camera-capture

verified

AVCaptureSession, camera preview, photo capture, video recording, RotationCoordinator, session interruptions, deferred processing, capture responsiveness, zero-shutter-lag, photoQualityPrioritization, front camera mirroring

View on GitHub

Marketplace

axiom-marketplace

CharlesWiltgen/Axiom

Plugin

axiom

Repository

CharlesWiltgen/Axiom
289stars

.claude-plugin/plugins/axiom/skills/axiom-camera-capture/SKILL.md

Last Verified

January 16, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/CharlesWiltgen/Axiom/blob/main/.claude-plugin/plugins/axiom/skills/axiom-camera-capture/SKILL.md -a claude-code --skill axiom-camera-capture

Installation paths:

Claude
.claude/skills/axiom-camera-capture/
Powered by add-skill CLI

Instructions

# Camera Capture with AVFoundation

Guides you through implementing camera capture: session setup, photo capture, video recording, responsive capture UX, rotation handling, and session lifecycle management.

## When to Use This Skill

Use when you need to:
- ☑ Build a custom camera UI (not system picker)
- ☑ Capture photos with quality/speed tradeoffs
- ☑ Record video with audio
- ☑ Handle device rotation correctly (RotationCoordinator)
- ☑ Make capture feel responsive (zero-shutter-lag)
- ☑ Handle session interruptions (phone calls, multitasking)
- ☑ Switch between front/back cameras
- ☑ Configure capture quality and resolution

## Example Prompts

"How do I set up a camera preview in SwiftUI?"
"My camera freezes when I get a phone call"
"The photo preview is rotated wrong on front camera"
"How do I make photo capture feel instant?"
"Should I use deferred processing?"
"My camera takes too long to capture"
"How do I switch between front and back cameras?"
"How do I record video with audio?"

## Red Flags

Signs you're making this harder than it needs to be:

- ❌ Calling `startRunning()` on main thread (blocks UI for seconds)
- ❌ Using deprecated `videoOrientation` instead of RotationCoordinator (iOS 17+)
- ❌ Not observing session interruptions (app freezes on phone call)
- ❌ Creating new AVCaptureSession for each capture (expensive)
- ❌ Using `.photo` preset for video (wrong format)
- ❌ Ignoring `photoQualityPrioritization` (slow captures)
- ❌ Not handling `.notAuthorized` permission state
- ❌ Modifying session without `beginConfiguration()`/`commitConfiguration()`
- ❌ Using UIImagePickerController for custom camera UI (limited control)

## Mandatory First Steps

Before implementing any camera feature:

### 1. Choose Your Capture Mode

```
What do you need?

┌─ Just let user pick a photo?
│  └─ Don't use AVFoundation - use PHPicker or PhotosPicker
│     See: /skill axiom-photo-library
│
├─ Simple photo/video capture with system UI?
│  └─ UIImagePickerController (but

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
25124 chars