swift-memory-storage-pro

swift-memory-storage-pro is a skill for Claude Code from kelvinkosbab/AppBootstrapAI. It costs 130 tokens per session (1,254 once invoked), scanned A, original, MIT.

A guide for finding memory leaks and on-device storage problems in Apple-platform apps.

In plain words
What is it for?
Use it to review Swift ownership, closures, tasks, caches, file writes, UserDefaults, Keychain, disk caches, and memory or storage symptoms.
Why use it?
It helps trace objects that stay alive too long, oversized in-memory data, incorrect file locations, unnecessary backups, and unsafe local storage.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to review Swift ownership, closures, tasks, caches, file writes, UserDefaults, Keychain, disk caches, and memory or storage symptoms.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kelvinkosbab/appbootstrapai/swift-memory-storage-pro
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 kelvinkosbab/AppBootstrapAI --skill swift-memory-storage-pro
Clone the repo
git clone --depth 1 https://github.com/kelvinkosbab/AppBootstrapAI

Made for: Claude Code.

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-memory-storage-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/swift-memory-storage-pro/github.svg)](https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/swift-memory-storage-pro)
Your own site
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/swift-memory-storage-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/swift-memory-storage-pro/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-memory-storage-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/swift-memory-storage-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/swift-memory-storage-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,254 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.00130 $0.01254
Opus 5.5 $0.00052 $0.00502
Sonnet 5.5 $0.00026 $0.00251
Haiku 4.5 $0.00013 $0.00125

Measured today against content hash e3654e97eaca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swift-memory-storage-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 today.

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.

.claude/skills/swift-memory-storage-pro/SKILL.md · 73 lines

How it starts

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

Audit Swift code for memory and storage problems. This is the deep-review companion to the always-on apple-memory-management.md and apple-storage-management.md rules: the rules steer while writing; this skill traces ownership, footprint, and file placement across whole features. Report only genuine problems.

If asked to fix rather than review, make the changes directly and summarize them in the same file-by-file format.

Review process:

  1. Leaks. For each type that stores closures, Tasks, Combine subscriptions, timers, observers, or delegates, trace who owns whom using references/retain-cycles.md. A cycle needs a path back to self; confirm it before reporting.
  2. Footprint. Check image decoding, in-memory caches, collection loading, and extension budgets using references/memory-footprint.md.
  3. Storage. For every file write, UserDefaults key, Keychain item, and disk cache, check the location, backup status, protection class, size cap, and privacy manifest reason using references/storage-layout.md.
  4. Evidence. When the user reports a symptom (memory growth, jetsam exits, disk use), or before you claim a fix worked, use references/measuring.md to reproduce and confirm it with the memory graph, Instruments, MetricKit, or a leak test. Add a leak test for each cycle you fix.

For a partial review (only leaks, only storage), load only the matching reference.

Core Instructions

  • A cycle is only a finding when you can name the path. self → cancellables → sink closure → self is a cycle; a [weak self] missing from a non-escaping or one-shot closure is not. Don't spray [weak self] everywhere as a "fix".
  • Size findings in bytes. "Decodes a 4032×3024 photo for a 60pt thumbnail: ~48 MB per cell" is actionable; "large image" is not.
  • Location findings name the consequence: backed up when it shouldn't be (iCloud bloat, App Review), purgeable when it shouldn't be (offline content disappears), readable while locked when it holds sensitive data.
  • Severity by user impact: crash or data loss (jetsam on a common flow, secrets in plain files, offline content in Caches, missing privacy manifest reason) > degraded (leaked view models, unbounded cache growth, backup bloat) > hygiene (missing size cap on a small cache, no storage settings screen).
  • Cross-reference, don't duplicate: actor isolation belongs to swift-concurrency-pro; Core Data and SwiftData store setup to coredata-swift6-pro / swiftdata-pro; logging what you measured to swift-logging-pro.

Read the full file on GitHub · 73 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. today First seen · 73 lines · 130 tokens per session scan A e3654e97eaca

Subscribe to this mod's changes

swift-memory-storage-pro is a skill published in the GitHub repository kelvinkosbab/AppBootstrapAI (8 stars, last pushed today), licensed MIT. It adds 130 tokens to every session and 1,254 once invoked, about $0.0005 per session on Opus 5.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-11-06.

Related

swift-memory-storage-pro compared with skills from other repositories

swift-memory-storage-pro next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
swift-memory-storage-prokelvinkosbab/AppBootstrapAISkill8todayMITA130Claude Code
kmp-glassmorphism-uiAks-4125/kmp-glassmorphism-skillSkill53mo agoMITA81Claude Code, Codex
argent-settings-permissionssoftware-mansion/argentSkill3.2kyesterdayApache-2.0A140Claude Code, Codex
argent-react-native-optimizationsoftware-mansion/argentSkill3.2kyesterdayApache-2.0A71Claude Code, Codex
mobile-automationmobile-next/mobile-mcpSkill10k4d agoApache-2.0A58Claude Code, Codex
sceneviewsceneview/sceneviewSkill1.4kyesterdayApache-2.0A156Codex
argent-tv-interactsoftware-mansion/argentSkill3.2kyesterdayApache-2.0A107Claude Code, Codex