avfoundation-camera

avfoundation-camera is a skill for Claude Code, Codex from wangjianqi/AppStore. It costs 34 tokens per session (2,450 once invoked), scanned A, original, MIT.

A guide to using Apple’s AVFoundation framework for camera features in iOS apps. It covers camera sessions, permissions, and required app configuration.

In plain words
What is it for?
Use it to choose a session for one or two cameras, add depth capture, request camera access, and configure the required Info.plist entries.
Why use it?
It helps avoid common setup errors, such as configuring camera sessions on the wrong thread or missing required permission settings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to choose a session for one or two cameras, add depth capture, request camera access, and configure the required Info.plist entries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wangjianqi/appstore/02-avfoundation-camera
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wangjianqi/AppStore --skill 02-avfoundation-camera
Clone the repo
git clone --depth 1 https://github.com/wangjianqi/AppStore

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for avfoundation-camera

README.md
[![agentmods](https://agentmods.dev/badge/skills/wangjianqi/appstore/02-avfoundation-camera/github.svg)](https://agentmods.dev/skills/wangjianqi/appstore/02-avfoundation-camera)
Your own site
<a href="https://agentmods.dev/skills/wangjianqi/appstore/02-avfoundation-camera"><img src="https://agentmods.dev/badge/skills/wangjianqi/appstore/02-avfoundation-camera/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for avfoundation-camera

Your own site · 80×15
<a href="https://agentmods.dev/skills/wangjianqi/appstore/02-avfoundation-camera"><img src="https://agentmods.dev/badge/skills/wangjianqi/appstore/02-avfoundation-camera.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,450 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.02450
Opus 5 $0.00017 $0.01225
Sonnet 5 $0.00007 $0.00490
Haiku 4.5 $0.00003 $0.00245

Measured 8d ago against content hash 8bdb40c1939a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

avfoundation-camera scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ios-claude-skills/02-avfoundation-camera/SKILL.md · 343 lines

How it starts

The opening of the file, as written. The whole thing — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AVFoundation 相机模块

Session 架构

Session 类型选择

场景 Session 类型 最低版本
单摄(前或后) AVCaptureSession iOS 4+
双摄(前+后同时) AVCaptureMultiCamSession iOS 13+
深度采集 AVCaptureSession + depth data output iOS 11+
  • Session 所有操作必须在专用串行队列执行
  • 禁止在主线程配置 session,预览层更新除外
private let sessionQueue = DispatchQueue(label: "com.app.sessionQueue")

完整权限处理流程

final class CameraPermissionManager {
    static func checkAuthorization(completion: @escaping (Bool) -> Void) {
        let status = AVCaptureDevice.authorizationStatus(for: .video)
        switch status {
        case .authorized:
            completion(true)
        case .notDetermined:
            requestAccess(completion: completion)
        case .denied, .restricted:
            showPermissionDeniedAlert()
            completion(false)
        @unknown default:
            completion(false)
        }
    }

    private static func requestAccess(completion: @escaping (Bool) -> Void) {
        AVCaptureDevice.requestAccess(for: .video) { granted in
            DispatchQueue.main.async {
                if granted {
                    completion(true)
                } else {
                    showPermissionDeniedAlert()
                    completion(false)
                }
            }
        }
    }

    private static func showPermissionDeniedAlert() {
        guard let settingsURL = URL(string: UIApplication.openSettingsURLString) else { return }
        let alert = UIAlertController(
            title: "需要相机权限".localized,
            message: "请在设置中开启相机权限,以使用录制功能".localized,
            preferredStyle: .alert
        )
        alert.addAction(UIAlertAction(title: "去设置".localized, style: .default) { _ in
            UIApplication.shared.open(settingsURL)
        })
        alert.addAction(UIAlertAction(title: "取消".localized, style: .cancel))
        (UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate)?
            .window?.rootViewController?.present(alert, animated: true)
    }
}

Read the full file on GitHub · 343 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 343 lines · 34 tokens per session scan A 8bdb40c1939a

Subscribe to this mod's changes

avfoundation-camera is a skill published in the GitHub repository wangjianqi/AppStore (11 stars, last pushed 3mo ago), licensed MIT. It adds 34 tokens to every session and 2,450 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ipaship-audit

Use when auditing iOS/Android app submissions for compliance with Apple App Store Review Guidelines or Google Play Developer Policies. Scan .ipa, .apk, or .zip files against official store policies, generate structured compliance reports, and identify violations with remediation steps.

atharvnaik1/ipaship-audit · 57 tokens

view-specifications

Guide for writing view specification documents and a starter template for SwiftUI and cross-platform views.

jpavley/meta-loop-ios · 21 tokens

project-structure

Directory layout, file responsibilities, and Xcode integration for meta-loop projects.

jpavley/meta-loop-ios · 18 tokens

analyzing-ios-app-security-with-objection

Runtime iOS app security testing with Objection (Frida): inspect keychain and filesystem data, explore app internals at runtime, and validate/bypass client-side protections during authorized mobile assessments.

mukul975/Anthropic-Cybersecurity-Skills · 49 tokens

argent-tv-interact

Control and inspect TV apps via argent — Apple TV (tvOS), Android TV (leanback), and Amazon Fire TV (Vega). Boot the target, read focus, navigate with the D-pad remote, type, screenshot, and on Vega debug the JS runtime (evaluate, console logs, network inspector). Use when a task targets a TV (runtimeKind "tv", or…

software-mansion/argent · 107 tokens

argent-create-flow

Create, record, edit, replay, or repair reusable Argent flow YAML files. Use when the user asks to record or replay a repeatable device path, set up profiling or an A/B comparison, or invoke the authoring engine behind argent-qa-flows. Also use before repeating three or more interactions. For one-off UI checks…

software-mansion/argent · 100 tokens