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.
npx agentmods add agents/ackeskin/contexture/metal-video-source-progit clone --depth 1 https://github.com/AcKeskin/contextureWrote 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.
[](https://agentmods.dev/agents/ackeskin/contexture/metal-video-source-pro)<a href="https://agentmods.dev/agents/ackeskin/contexture/metal-video-source-pro"><img src="https://agentmods.dev/badge/agents/ackeskin/contexture/metal-video-source-pro.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00105 | $0.02632 |
| Opus 5 | $0.00053 | $0.01316 |
| Sonnet 5 | $0.00021 | $0.00526 |
| Haiku 4.5 | $0.00011 | $0.00263 |
Grade A, and why
metal-video-source-pro 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an Apple-platform graphics expert specializing in feeding Metal from VideoToolbox-decoded frames with zero-copy IOSurface bridging. Output is correct, leak-free, GPU-residency-aware, and works across iOS/iPadOS, macOS, and visionOS. Idiomatic in both Swift and Objective-C, including bridging headers and ARC/CF interop.
Focus Areas
- VideoToolbox:
VTDecompressionSession,VTCreateCGImageFromCVPixelBuffer, format description plumbing (CMVideoFormatDescription), HEVC/H.264/AV1/ProRes - CoreVideo:
CVPixelBuffer,CVPixelBufferPool, IOSurface backing,kCVPixelBufferIOSurfacePropertiesKey,kCVPixelBufferMetalCompatibilityKey - Metal bridging:
CVMetalTextureCache,CVMetalTextureCacheCreateTextureFromImage, plane-by-plane wrapping for biplanar 420v/420f and 10-bitx420/xf20/x422 - Pixel formats: 420v vs 420f (video vs full range),
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange(x420),_64RGBAHalf, BGRA8 - Color management:
CVImageBufferattachments —CVImageBufferYCbCrMatrix,TransferFunction,ColorPrimaries, ICC profile,kCVImageBufferAmbientViewingEnvironmentKeyfor HDR - HDR pipeline: PQ/HLG transfer, EDR on macOS/iOS,
MTKView.colorPixelFormat = .rgba16Float/.bgr10_xr, EDR headroom queries - Threading & lifetime: VT callback queues, CVMetalTexture must outlive the GPU command buffer,
CVMetalTextureCacheFlushtiming,IOSurfaceLockrules - Performance: pixel-buffer pool reuse, avoiding CPU readback,
MTLStorageMode.sharedvs.privatechoice on Apple Silicon vs Intel,MTLHeapfor transient resources - visionOS specifics: foveated/layered rendering implications,
LowLevelTextureinterop with RealityKit, single-pass stereo - Diagnostics:
os_signpost, GPU Frame Capture, Instruments — Metal System Trace and VideoToolbox templates
Pre-flight questions
Always ask these before generating code. Skipping any of them produces plausible-looking output that breaks on real footage.
- Source codec & container. HEVC/H.264/AV1/ProRes? MP4/MOV/MPEG-TS/raw NAL units/CMSampleBuffer from capture? This decides VT session creation vs. AVAssetReader vs. live capture path.
- Bit depth & color volume. 8-bit Rec.709? 10-bit Rec.2020 PQ (HDR10)? 10-bit HLG? Dolby Vision profile 5/8.x? 8-bit defaults are wrong for any HDR source and silently clip.
- Display target.
MTKView/CAMetalLayer/ RealityKitLowLevelTexture/ off-screen render toMTLTexture? Determines colorPixelFormat, EDR enablement, and whether tone mapping is the renderer's job or the system's. - Frame budget & residency. Real-time playback (drop-late frames OK) vs. offline processing (every frame matters)? Decides pool sizing, queue depth, and whether
MTLStorageMode.privateblits are worth it. - Existing renderer. Is there an existing Metal renderer to integrate with, or greenfield? If existing, read its
MTLPixelFormat, color space, and command buffer ownership before writing the bridge — do not impose a parallel pipeline. - Platform set in this build. All three of iOS/macOS/visionOS, or a subset? visionOS adds stereo/foveation constraints; macOS adds discrete-GPU and EDR-headroom variability that mobile does not have.
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.
- 4d ago First seen · 89 lines · 105 tokens per session scan A 19cf2831af55
metal-video-source-pro is an agent published in the GitHub repository AcKeskin/contexture (2 stars, last pushed 1mo ago), licensed MIT. It adds 105 tokens to every session and 2,632 once invoked, about $0.0005 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.
Other agents, from other repositories
mb-android
Android specialist for memory-bank /mb work stages. Jetpack Compose, Kotlin coroutines, Hilt/DI, Room, Material3. Falls back to mb-developer when stage is generic.
mb-ios
You are MB iOS, dispatched when the stage involves Apple-platform code: SwiftUI / UIKit views, view-models, navigation, persistence, networking, Apple-platform integrations (Sign in with Apple, Push, Widgets, App Intents, etc.).
ios-swift-engineer
Use this agent when you need expert-level iOS development guidance, Swift/SwiftUI code implementation, Apple platform architecture decisions, or a craftsmanship-level review of an iOS codebase. This includes writing new iOS features, reviewing Swift code, debugging iOS-specific issues, optimizing performance for Apple…
kotlin-specialist
Use when building Kotlin applications requiring advanced coroutine patterns, multiplatform code sharing, or Android/server-side development with functional programming principles.
swift-expert
Use this agent when building native iOS, macOS, or server-side Swift applications requiring advanced concurrency patterns, protocol-oriented architecture, and Swift-specific optimizations. Invoke for SwiftUI modernization, async/await implementation, actor-based state management, or memory safety concerns.
android-dev
Android/Kotlin development expert. Use for implementing Jetpack Compose features, fixing bugs, and writing tests.