avfoundation-media-pipeline-workflow

avfoundation-media-pipeline-workflow is a skill for Claude Code, Codex from gaelic-ghost/socket. It costs 82 tokens per session (1,558 once invoked), scanned A, original, Apache-2.0.

A guide to building and repairing Apple media pipelines with AVFoundation, the framework for capturing, playing, reading, writing, exporting, and converting audio or video.

In plain words
What is it for?
Use it when working with camera capture, AVPlayer playback, media files, export or transcoding, and loops that append captured sample data.
Why use it?
It helps avoid blocked user interfaces, outdated asset-loading code, uncontrolled data flow, and unclear ownership between capture, playback, and writing components.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the apple-dev-skills plugin — 65 skills, 2 MCP servers shipped together

Good fit Use it when working with camera capture, AVPlayer playback, media files, export or transcoding, and loops that append captured sample data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gaelic-ghost/socket/avfoundation-media-pipeline-workflow
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 gaelic-ghost/socket --skill avfoundation-media-pipeline-workflow
Clone the repo
git clone --depth 1 https://github.com/gaelic-ghost/socket

Made for: Claude Code, Codex.

Or install apple-dev-skills, the plugin that ships this one along with the rest of its 65 skills, 2 MCP servers.

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-media-pipeline-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaelic-ghost/socket/avfoundation-media-pipeline-workflow.svg)](https://agentmods.dev/skills/gaelic-ghost/socket/avfoundation-media-pipeline-workflow)
Your own site
<a href="https://agentmods.dev/skills/gaelic-ghost/socket/avfoundation-media-pipeline-workflow"><img src="https://agentmods.dev/badge/skills/gaelic-ghost/socket/avfoundation-media-pipeline-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,558 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.00082 $0.01558
Opus 5 $0.00041 $0.00779
Sonnet 5 $0.00016 $0.00312
Haiku 4.5 $0.00008 $0.00156

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

Security

Grade A, and why

avfoundation-media-pipeline-workflow 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.

plugins/apple-dev-skills/skills/avfoundation-media-pipeline-workflow/SKILL.md · 118 lines

How it starts

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

AVFoundation Media Pipeline Workflow

Purpose

Guide AVFoundation capture, playback, asset loading, reader, writer, export, and sample-buffer pipeline design and repair. This skill owns media-pipeline shape, typed AVFoundation surface choice, and back-pressure policy, while leaving app audio-session policy, engine graphs, Core Media timing internals, and Xcode execution to their owning skills.

When To Use

  • Use this skill for AVCaptureSession, capture inputs and outputs, capture queues, AVPlayer, AVPlayerItem, AVAsset, AVURLAsset, AVAsyncProperty, async asset loading, AVAssetReader, AVAssetWriter, export, transcode, and sample-buffer append loops.
  • Use this skill when existing code blocks the main thread, uses deprecated AVAsset synchronous properties, misuses loadValuesAsynchronously(forKeys:), appends sample buffers without back-pressure, confuses capture authorization with microphone permission, or mixes capture, UI, writer, and player ownership in one object.
  • Recommend avfaudio-session-workflow when the primary problem is app audio intent, routes, interruptions, or microphone permission.
  • Recommend coremedia-timing-samplebuffer-workflow when the primary issue is sample-buffer timestamps, format descriptions, timebases, clocks, or synchronization.
  • Recommend camera-capture-depth-workflow when the primary issue is camera discovery, device controls, formats, rotation, photo capture, depth, calibration, synchronized camera outputs, or computational capture.

Single-Path Workflow

  1. Classify the media pipeline:
    • capture setup
    • player or playback state
    • asset inspection or async loading
    • reader or writer loop
    • export or transcode
    • sample-buffer append or back-pressure
    • repair of an existing implementation
  2. Apply the Apple docs gate:
    • read current AVFoundation documentation for the pipeline surface
    • state the documented behavior relied on before recommending changes
    • apply ../../shared/references/apple-media-type-ownership.md before introducing custom media wrappers, raw numeric timing, strings, or dictionaries
  3. Choose the pipeline owner and queues:
    • capture-session configuration owner
    • serial capture session queue
    • player item and UI update boundary
    • async asset loading boundary
    • reader and writer queue
    • cancellation and teardown path
  4. Repair common failure modes:
    • AVCaptureSession.startRunning() on the main queue
    • deprecated synchronous AVAsset property reads in Swift clients
    • callback-based asset loading left in otherwise async Swift code
    • writer loops that ignore isReadyForMoreMediaData
    • raw strings, dictionaries, or custom structs replacing AVAsset, AVAssetTrack, AVPlayerItem, AVCaptureConnection, AVAssetReaderOutput, AVAssetWriterInput, CMSampleBuffer, or writer receiver types without a documented boundary reason
    • capture authorization, recording permission, and Info.plist gates collapsed together
    • sample-buffer timing issues that need Core Media handoff
  5. Return one recommendation with:
    • pipeline class
    • documented Apple behavior relied on
    • owner, queue, and async-loading plan
    • back-pressure and cancellation plan
    • repair findings
    • validation and handoff expectation

Read the full file on GitHub · 118 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 118 lines · 82 tokens per session scan A 00f2a600f6d7

Subscribe to this mod's changes

avfoundation-media-pipeline-workflow is a skill published in the GitHub repository gaelic-ghost/socket (7 stars, last pushed 13d ago), licensed Apache-2.0. It adds 82 tokens to every session and 1,558 once invoked, about $0.0004 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

youtube-producer

Plans, packages, and scripts long-form video for retention and channel growth — idea selection, titles and thumbnails, script structure, and diagnosing why a video or channel underperforms. Use this for video ideas, packaging, scripting, a retention teardown, or channel strategy — including when someone describes a…

cbrock84/headcount · 86 tokens

video-content

Plans and scripts short-form and long-form video, and designs the packaging — titles, thumbnails, and openings — that determines whether it gets watched. Use this to script a video, plan a series, fix retention or click-through problems, design thumbnail and title concepts, or turn written content into video. For a…

cbrock84/headcount · 89 tokens

app-store-optimization

Improves visibility and conversion in the App Store and Google Play — metadata, keywords, screenshots, ratings, and the listing experience that turns an impression into an install. Use this to audit or optimize an app listing, plan a launch listing, diagnose poor install conversion, or improve store search visibility.

cbrock84/headcount · 64 tokens

visual-content

Designs and directs the visual assets that carry content — carousels, infographics, quote graphics, diagrams, and social imagery — including the generation prompts where they are AI-produced. Use this to turn a written piece into a visual format, design a carousel or infographic, create social graphics, or fix visuals…

cbrock84/headcount · 72 tokens

flutter-ui

Build Flutter UI from Figma MCP or image input. Scans src for design tokens (colors, sizes, text styles), existing components, and naming conventions before writing a single line of code. Never hard-codes values.

datit309/supergraph · 48 tokens

flutter-dart-code-review

Library-agnostic Flutter/Dart code review checklist covering widget best practices, state management patterns (BLoC, Riverpod, Provider, GetX, MobX, Signals), Dart idioms, performance, accessibility, security, and clean architecture.

datit309/supergraph · 56 tokens