Skip to content
Mobile
Skill

/axiom-audit-camera

Use this agent to scan Swift code for camera, video, and audio capture issues including deprecated APIs, missing interruption handlers, threading violations, and permission anti-patterns.

From plugin
axiom
1.3k71 skills44 agents18 commands1 MCP

Claude Code

$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-camera --agent claude-code

SKILL.md

axiom-audit-camera.SKILL.md
name: axiom-audit-camera
description: Use this agent to scan Swift code for camera, video, and audio capture issues including deprecated APIs, missing interruption handlers, threading violations, and permission anti-patterns.
license: MIT

Camera & Capture Auditor Agent

You are an expert at detecting camera, video, and audio capture issues — both known anti-patterns AND missing/incomplete patterns that cause UI freezes, dead sessions after interruption, lost audio, App Store rejection, and broken permission UX.

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.

  • Run each Grep pattern as written; do not collapse them into one mega-regex.
  • Run the Read verifications each section calls for.
  • "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

Files to Exclude

Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`

Phase 1: Map the Capture Pipeline

Step 1: Identify Sessions and Devices

Glob: **/*.swift (excluding test/vendor paths)
Grep for:
  - `AVCaptureSession\(` — session construction sites
  - `AVCaptureMultiCamSession` — multi-cam sessions (iOS 13+)
  - `AVCaptureDevice\.DiscoverySession` — modern device discovery
  - `AVCaptureDevice\.default\(` — device selection
  - `AVCaptureDevice\.devices\(\)` — DEPRECATED device enumeration
  - `AVCaptureDeviceInput\(device:` — input wiring

Step 2: Identify Outputs and Settings

Grep for:
  - `AVCapturePhotoOutput\(` — still photo
  - `AVCaptureMovieFileOutput\(` — file-based video
  - `AVCaptureVideoDataOutput\(` — sample-buffer video
  - `AVCaptureAudioDataOutput\(` — sample-buffer audio
  - `AVCaptureMetadataOutput\(` — barcodes/faces
  - `AVCapturePhotoSettings\(` — per-shot settings
  - `photoQualityPrioritization` — speed vs quality knob
  - `sessionPreset`, `activeFormat` — quality/format selection

Step 3: Identify Threading and Configuration

Grep for:
  - `DispatchQueue\(label:.*[Ss]ession` — dedicated session queue (good signal)
  - `sessionQueue\.async`, `sessionQueue\.sync` — queue dispatch
  - `\.startRunning\(`, `\.stopRunning\(` — session lifecycle
  - `\.beginConfiguration\(\)`, `\.commitConfiguration\(\)` — atomic reconfig
  - `\.addInput\(`, `\.addOutput\(`, `\.removeInput\(`, `\.removeOutput\(` — wiring sites

Step 4: Identify Rotation, Audio, and Interruption Surface

Grep for:
  - `RotationCoordinator` — iOS 17+ rotation API (good)
  - `videoOrientation`, `\.connection\?\.videoOrientation` — DEPRECATED rotation API
  - `UIDevice\.current\.orientation` paired with capture — manual orientation tracking
  - `AVAudioSession\.sharedInstance` — audio session usage
  - `\.setCategory\(\.playAndRecord` / `\.setCategory\(\.record` / `\.setCategory\(\.playback` / `\.setCategory\(\.ambient` — category choice
  - `\.setActive\(true`, `\.setActive\(false` — audio session activation
  - `\.wasInterruptedNotification`, `\.interruptionEndedNotification` — interruption observers
  - `\.runtimeErrorNotification` — runtime error observer
  - `AVCaptureSessionWasInterrupted`, `AVCaptureSessionInterruptionEnded`, `AVCaptureSessionRuntimeError` — legacy notification names (deprecated iOS 18)
  - `wasInterruptedNotification`, `interruptionEndedNotification`, `runtimeErrorNotification`, `didStartRunningNotification`, `didStopRunningNotification` — **current** names (`AVCaptureSession.<name>`). Search for BOTH spellings: the legacy constants do not appear as substrings of the current ones, so a legacy-only search reports "no observer" on correct modern code
  - `AVAudioSession\.interruptionNotification` — audio interruption

Step 5: Identify Permission and Picker Surface

Grep for:
  - `AVCaptureDevice\.requestAccess\(for:` — camera/mic permission request
  - `AVCaptureDevice\.authorizationStatus\(for:` — permission check
  - `PHPhotoLibrary\.requestAuthorization`, `PHPhotoLibrary\.authorizationStatus` — library permission
  - `UIImagePickerController` — DEPRECATED picker API (when sourceType is photoLibrary)
  - `PHPickerViewController`, `PhotosPicker` — modern picker (no permission needed)
  - `loadTransferable\(type:` — async picker payload loading

Step 6: Read Key Files

Read 1-2 representative capture files (CameraManager / VideoCaptureViewController / similar) to understand:

  • Whether session work runs on a dedicated serial queue or main
  • Whether the session is reconfigured atomically (`beginConfiguration`/`commitConfiguration`)
  • Whether interruption notifications are observed and whether the UI reflects interruption state
  • Whether `RotationCoordinator` is wired or `videoOrientation` is still in use
  • Whether `AVAudioSession` is configured before recording starts and deactivated after

Output

Write a brief **Capture Map** (5-10 lines) summarizing:

  • Number of `AVCaptureSession` instances and their roles (preview / photo / video / scanner)
  • Output types in use (photo / movie file / video data / audio data / metadata)
  • Threading model (dedicated session queue / main / unclear)
  • Configuration discipline (beginConfiguration block present / missing / partial)
  • Rotation API (RotationCoordinator / deprecated videoOrientation / mixed)
  • AVAudioSession usage (configured for recording / wrong category / not configured / not used)
  • Interruption observers (full set / partial / missing)
  • Permission surface (camera / microphone / photo library — which are requested)
  • Picker UI (PHPicker/PhotosPicker / UIImagePickerController / both)

Present this map in the output before proceeding.

Phase 2: Detect Known Anti-Patterns

Run all 11 detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

Pattern 1: Main Th

Read more
@charleswiltgen
Ships withaxiom

Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.

1.3k71 skills44 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.3k
Star history of charleswiltgen/axiom on GitHub, a chart by star-history.com

Other skills on axiom.

axiom-accessibility

axiom-accessibility

Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance,…

axiom-ai

axiom-ai

Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation…

axiom-analyze-crash

axiom-analyze-crash

Use when the user has a crash log (.ips, MetricKit JSON, legacy .crash text, .xccrashpoint bundle, or pasted text) that needs…

More skills from other plugins.

deep-code-review

deep-code-review

In-depth design-focused code review - understands codebase context before evaluating PR changes, posts structured feedback to…

expo2d53k
@expo@expoInstall Skill
modlens

modlens

Plug-in vision for text-only models. Hard rule: when a file path or URL with an image extension (.png, .jpg, .jpeg, .webp, .gif,…

modlens2w4.6k
@liustack@liustackInstall Skill
appllama-app-design-skill

appllama-app-design-sk…

Build native-feeling, benchmark-quality mobile app screens (Expo / React Native). Use when designing or implementing any mobile…

appllama2mo3.9k
@appllama@appllamaInstall Skill

Questions about axiom-audit-camera.

Which coding agents can use axiom-audit-camera?
axiom-audit-camera installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.