ax-media

ax-media is a skill for Claude Code from Kasempiternal/axiom-v2. It costs 30 tokens per session (7,596 once invoked), scanned A, original, MIT.

A guide to handling audio and media features in iOS apps, including lock-screen playback controls, the photo library, music access, CarPlay, haptics, and spatial audio.

In plain words
What is it for?
Setting up audio sessions, showing Now Playing information, handling remote playback commands, and working with Apple media APIs.
Why use it?
It gives developers code patterns for connecting media playback with iOS system features and devices.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the axiom plugin — 40 skills, 8 commands, 12 agents, 2 hooks shipped together

Good fit Setting up audio sessions, showing Now Playing information, handling remote playback commands, and working with Apple media APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kasempiternal/axiom-v2/ax-media
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 Kasempiternal/axiom-v2 --skill ax-media
Clone the repo
git clone --depth 1 https://github.com/Kasempiternal/axiom-v2

Made for: Claude Code.

Or install axiom, the plugin that ships this one along with the rest of its 40 skills, 8 commands, 12 agents, 2 hooks.

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 ax-media

README.md
[![agentmods](https://agentmods.dev/badge/skills/kasempiternal/axiom-v2/ax-media/github.svg)](https://agentmods.dev/skills/kasempiternal/axiom-v2/ax-media)
Your own site
<a href="https://agentmods.dev/skills/kasempiternal/axiom-v2/ax-media"><img src="https://agentmods.dev/badge/skills/kasempiternal/axiom-v2/ax-media/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 ax-media

Your own site · 80×15
<a href="https://agentmods.dev/skills/kasempiternal/axiom-v2/ax-media"><img src="https://agentmods.dev/badge/skills/kasempiternal/axiom-v2/ax-media.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,596 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.00030 $0.07596
Opus 5 $0.00015 $0.03798
Sonnet 5 $0.00006 $0.01519
Haiku 4.5 $0.00003 $0.00760

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

Security

Grade A, and why

ax-media 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 11d 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.

axiom-plugin/skills/ax-media/SKILL.md · 906 lines

How it starts

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

Media & Audio

Quick Patterns

// NOW PLAYING (iOS 16+ recommended)
let session = MPNowPlayingSession(players: [player])
session.automaticallyPublishNowPlayingInfo = true
session.remoteCommandCenter.playCommand.addTarget { [weak self] _ in
    self?.player.play(); return .success
}
session.remoteCommandCenter.playCommand.isEnabled = true
session.becomeActiveIfPossible { _ in }

// NOW PLAYING (manual, iOS 14+)
try AVAudioSession.sharedInstance().setCategory(.playback, options: [])
try AVAudioSession.sharedInstance().setActive(true)
var info: [String: Any] = [
    MPMediaItemPropertyTitle: "Title",
    MPMediaItemPropertyArtist: "Artist",
    MPMediaItemPropertyPlaybackDuration: duration,
    MPNowPlayingInfoPropertyElapsedPlaybackTime: elapsed,
    MPNowPlayingInfoPropertyPlaybackRate: 1.0  // 1.0=playing, 0.0=paused
]
MPNowPlayingInfoCenter.default().nowPlayingInfo = info

// REMOTE COMMANDS
let cc = MPRemoteCommandCenter.shared()
cc.playCommand.addTarget { [weak self] _ in self?.play(); return .success }
cc.playCommand.isEnabled = true
cc.skipForwardCommand.preferredIntervals = [15.0]

// AUDIO SESSION
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: [])
try AVAudioSession.sharedInstance().setActive(true)

// AUDIO ENGINE
let engine = AVAudioEngine()
let player = AVAudioPlayerNode()
engine.attach(player)
engine.connect(player, to: engine.mainMixerNode, format: nil)
try engine.start()

// HAPTICS
let impact = UIImpactFeedbackGenerator(style: .medium)
impact.prepare()
impact.impactOccurred()

// PHOTO PICKER (SwiftUI, iOS 16+ - NO permission needed)
@State private var item: PhotosPickerItem?
PhotosPicker(selection: $item, matching: .images) { Text("Select") }

// PHOTO PICKER (UIKit, iOS 14+ - NO permission needed)
var config = PHPickerConfiguration()
config.filter = .images
let picker = PHPickerViewController(configuration: config)

// SAVE TO CAMERA ROLL
let status = await PHPhotoLibrary.requestAuthorization(for: .addOnly)
try await PHPhotoLibrary.shared().performChanges {
    PHAssetCreationRequest.creationRequestForAsset(from: image)
}

// MUSICKIT (Apple Music)
let player = ApplicationMusicPlayer.shared
player.queue = [song]
try await player.play()  // Now Playing updates automatically

Read the full file on GitHub · 906 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. 11d ago First seen · 906 lines · 30 tokens per session scan A f8bd94a250c2

Subscribe to this mod's changes

ax-media is a skill published in the GitHub repository Kasempiternal/axiom-v2 (4 stars, last pushed 6mo ago), licensed MIT. It adds 30 tokens to every session and 7,596 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

avkit

Create media playback experiences using AVKit. Use when adding video players with AVPlayerViewController, enabling Picture-in-Picture, routing media with AirPlay, using SwiftUI VideoPlayer views, configuring transport controls, displaying subtitles and closed captions, or integrating AVFoundation playback with system…

thiennc-tesoglobal/ios-skills · 60 tokens

paperkit

Add drawings, shapes, and a consistent markup experience using PaperKit. Use when integrating PaperMarkupViewController for markup editing, adding shape recognition, working with PaperMarkup data models, embedding markup tools in document editors, or building annotation features that need the system-standard markup…

thiennc-tesoglobal/ios-skills · 65 tokens

pencilkit

Implement drawing, handwriting, and sketching with PencilKit and PaperKit. Use when integrating PKCanvasView, configuring PKToolPicker, handling drawing gestures and Apple Pencil features, inspecting or rendering strokes, managing drawing data, or building drawing interfaces.

thiennc-tesoglobal/ios-skills · 53 tokens

photokit

Builds or reviews photo-library picking, image loading, camera capture, and video recording with PhotoKit, PhotosPicker/PHPicker, and AVFoundation. Use for photo or camera permissions, media selection, capture sessions, library changes, caching, or media export.

thiennc-tesoglobal/ios-skills · 56 tokens

quicklook

Preview documents, images, audio, and 3D USDZ files with QLPreviewController and SwiftUI .quickLookPreview, and generate asynchronous thumbnails using QLThumbnailGenerator in iOS apps.

thiennc-tesoglobal/ios-skills · 44 tokens

workflow-audit

Systematic UI workflow auditing for SwiftUI applications. Discovers entry points, traces user flows, detects dead ends and broken promises, audits data wiring, evaluates from user perspective. Triggers: "workflow audit", "audit flows", "find dead ends", "check navigation".

Terryc21/workflow-audit · 59 tokens