swift-package-demo

swift-package-demo is a skill for Claude Code from ivan-magda/claude-superpowers. It costs 32 tokens per session (1,341 once invoked), scanned A, original, MIT.

A workflow for making demo GIFs and simulator recordings for Swift packages, including libraries built with SwiftUI. A separate demo app is needed because SwiftUI previews run in Xcode Canvas rather than the iOS Simulator.

In plain words
What is it for?
Use it to create a demo app, run it in an iOS Simulator, record the simulator screen, and prepare a GIF for a Swift package README.
Why use it?
It provides the setup and recording steps needed to capture a real app demonstration for documentation.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the swift plugin — 4 skills shipped together

Good fit Use it to create a demo app, run it in an iOS Simulator, record the simulator screen, and prepare a GIF for a Swift package README.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivan-magda/claude-superpowers/swift-package-demo
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 ivan-magda/claude-superpowers --skill swift-package-demo
Clone the repo
git clone --depth 1 https://github.com/ivan-magda/claude-superpowers

Made for: Claude Code.

Or install swift, the plugin that ships this one along with the rest of its 4 skills.

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 swift-package-demo

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivan-magda/claude-superpowers/swift-package-demo/github.svg)](https://agentmods.dev/skills/ivan-magda/claude-superpowers/swift-package-demo)
Your own site
<a href="https://agentmods.dev/skills/ivan-magda/claude-superpowers/swift-package-demo"><img src="https://agentmods.dev/badge/skills/ivan-magda/claude-superpowers/swift-package-demo/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 swift-package-demo

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivan-magda/claude-superpowers/swift-package-demo"><img src="https://agentmods.dev/badge/skills/ivan-magda/claude-superpowers/swift-package-demo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,341 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.00032 $0.01341
Opus 5 $0.00016 $0.00671
Sonnet 5 $0.00006 $0.00268
Haiku 4.5 $0.00003 $0.00134

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

Security

Grade A, and why

swift-package-demo 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 12d 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/swift/skills/swift-package-demo/SKILL.md · 146 lines

How it starts

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

Swift Package Demo Recording

Overview

Record and optimize demo GIFs for Swift package READMEs. Swift packages need a separate demo app since SwiftUI previews only run in Xcode Canvas, not the iOS Simulator.

When to Use

  • Adding demo GIFs to a Swift package README
  • Recording iOS Simulator for documentation
  • User asks to "record a demo" or "add GIFs to README"

Critical Understanding

digraph demo_flow {
    "SwiftUI Preview" [shape=box];
    "iOS Simulator" [shape=box];
    "Xcode Canvas only" [shape=box, style=filled, fillcolor=lightyellow];
    "Recordable with xcrun" [shape=box, style=filled, fillcolor=lightgreen];

    "SwiftUI Preview" -> "Xcode Canvas only" [label="runs in"];
    "Demo App" -> "iOS Simulator" [label="runs in"];
    "iOS Simulator" -> "Recordable with xcrun";
}

SwiftUI #Preview macros CANNOT be recorded. You must create a demo app.

Quick Reference

Step Command/Action
Create demo dir mkdir -p demo
Boot simulator xcrun simctl boot "iPhone SE (3rd generation)"
Open simulator open -a Simulator
Record video xcrun simctl io booted recordVideo --codec=h264 demo/raw.mov
Stop recording Ctrl+C
Convert to GIF See FFmpeg command below
Optimize GIF gifsicle -O3 --lossy=80 demo/out.gif -o demo/out.gif

Demo App Setup

Create demo/DemoApp/ with Xcode project that imports your package locally:

  1. In Xcode: File → New → Project → iOS App
  2. Save in demo/DemoApp/
  3. File → Add Package Dependencies → Add Local → select package root
  4. Import and use your library in the app

Critical: Use local package reference, not remote URL, to test current development code.

Read the full file on GitHub · 146 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. 12d ago First seen · 146 lines · 32 tokens per session scan A 41ddb68a4644

Subscribe to this mod's changes

swift-package-demo is a skill published in the GitHub repository ivan-magda/claude-superpowers (6 stars, last pushed 2mo ago), licensed MIT. It adds 32 tokens to every session and 1,341 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.