swift-modularization-pro

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

A toolkit for splitting an Apple app into a local Swift package, a collection of reusable Swift modules built together with the app. It plans, reviews, and carries out the move from a large app target into smaller core, domain, feature, and shared modules.

In plain words
What is it for?
Use it to plan, audit, or migrate an Apple app to a modular Swift package.
Why use it?
A large app target makes dependencies and ownership harder to understand. Separating modules makes the structure clearer and supports a step-by-step migration with tests after each step.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

Good fit Use it to plan, audit, or migrate an Apple app to a modular Swift package.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kelvinkosbab/appbootstrapai/swift-modularization-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-modularization-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-modularization-pro

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/swift-modularization-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/swift-modularization-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,734 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.00094 $0.01734
Opus 5.5 $0.00038 $0.00694
Sonnet 5.5 $0.00019 $0.00347
Haiku 4.5 $0.00009 $0.00173

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

Security

Grade A, and why

swift-modularization-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 6d 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.

.claude/skills/swift-modularization-pro/SKILL.md · 85 lines

How it starts

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

Turn an Apple app into a thin app target over a local Swift package of small modules, or check one that already is. This is the deep companion to the always-on apple-modular-architecture.md rule. The rule steers while writing; this skill plans a graph, audits a whole package, and drives a migration one module at a time.

Pick the mode from the request:

  • Plan: a new app, or an existing app before any move. Produce a module map (module · layer · purpose · dependencies) and the order to extract them, using references/module-graph.md. Start small (Core, a domain module or two, one feature, AppCore) and say which later splits you'd expect.
  • Migrate: move code out of the app target, or out of an oversized module, following references/migration.md. One module per step, the app building and tests passing after each.
  • Audit: an app that already has a package. Run the checks in references/audit.md, then report findings ranked by severity.

Review process (audit mode):

  1. Inventory: list the modules, the app target's Swift files and line counts, and every extension target. Use references/audit.md ("Inventory").
  2. Check the app target against "What stays in the app target" in references/migration.md. Any view, view model, or service there is a finding.
  3. Check the graph using references/module-graph.md and the dependency script in references/audit.md: layer violations, feature→feature edges, consumers importing concrete backends, cycles, oversized or near-empty modules, undeclared reliance on @_exported.
  4. Check resources and tests: Bundle.main inside modules, modules without a Tests/ target, tests that only run under xcodebuild without a reason, and whether CI runs swift test on package changes.

If doing a partial review, load only the relevant reference file.

Core Instructions

  • The app target is a shell. It keeps @main, Info.plist, entitlements, assets, the privacy manifest, InfoPlist.xcstrings, and the AppShortcutsProvider with its main-bundle catalogs. Everything else belongs in a module.
  • Direction is the architecture. Core ← domain ← features ← AppCore. Features never import each other; shared needs move down a layer.
  • Interfaces before implementations. When a capability has interchangeable backends (AI providers, analytics, storage), consumers depend on an interface module and an umbrella picks the backend. A feature importing a concrete backend is a finding, unless the UI is specifically about that backend (a provider picker).
  • Incremental, never big-bang. Every plan step leaves the app building, tests green, and the change reviewable on its own. Never propose moving every file in one pass.
  • Every module is testable headless. It has a Tests/ target and passes under swift test. The exceptions are resources the SwiftPM CLI can't compile, such as .xcdatamodeld, and those are guarded and documented.
  • Granularity follows real boundaries. Split a module when it has two reasons to change, a heavy dependency only part of it needs, or other targets (widgets, intents) need part of it. Don't split speculatively. A module with one tiny file and one consumer probably belongs to that consumer.
  • Use the bundle's tools. Scaffold with scripts/scaffold-spm-package.sh and keep makeTargets() in the manifest (templates/Package.template.swift). Manifest settings follow apple-spm-package-conventions.md.
  • Severity by cost: broken (a cycle, Bundle.main resources in a module, Siri phrases lost because the AppShortcutsProvider moved) > boundary leak (feature→feature edge, a concrete backend imported by features, logic in the app target, an @_exported hiding a missing dependency) > shape (oversized or near-empty modules, a missing graph doc in CLAUDE.md).
  • Cross-reference, don't duplicate: public API and manifest details go to swift-package-pro, concurrency under the new boundaries to swift-concurrency-pro, Core Data in a package to coredata-swift6-pro, and design-system module contents to swift-design-system-pro.

Read the full file on GitHub · 85 lines

Files

What ships with it

3 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. 6d ago First seen · 85 lines · 94 tokens per session scan A cca14d9e5cb7

Subscribe to this mod's changes

swift-modularization-pro is a skill published in the GitHub repository kelvinkosbab/AppBootstrapAI (7 stars, last pushed yesterday), licensed MIT. It adds 94 tokens to every session and 1,734 once invoked, about $0.0004 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-10-11.

Related

Other skills, from other repositories

compose-animations

Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple properties from one state, switching composable content, or choosing between AnimatedVisibility, animateAsState, rememberTransition, AnimatedContent, and Crossfade.

chrisbanes/skills · 64 tokens

compose-focus-navigation

Use when writing or reviewing Jetpack Compose UI for TV, keyboard, desktop, accessibility focus, D-pad navigation, FocusRequester, focusProperties, key events, or initial focus behavior.

chrisbanes/skills · 41 tokens

ios-slim-bindings

Create iOS slim bindings for MAUI. USE FOR: slim iOS binding, Native Library Interop, Swift/Objective-C wrappers, XcodeGen project.yml, Podfile, CocoaPods static linking, BUILDLIBRARYFORDISTRIBUTION, XcodeProject MSBuild, @objc/[Export] selector crashes, async completion handlers. DO NOT USE FOR: Android bindings…

dotnet/maui-labs · 97 tokens

compose-multiplatform

Use when building one shared Compose UI in Kotlin across Android, iOS, and desktop — commonMain @Composables, expect/actual, source-set placement, native interop, multiplatform ViewModel/navigation/Koin. NOT a single-platform native build (that is kotlin-android / swift-ios), and NOT Dart/Flutter cross-platform UI…

ericrisco/rsc-harness · 80 tokens

kotlin-android

Use when building or fixing a native Android app in Kotlin and Jetpack Compose on the UDF layered architecture — ViewModel/StateFlow, Hilt, Room, Retrofit, coroutines, type-safe Navigation, and the Gradle/AGP surface. NOT shared Android and iOS UI from one Kotlin codebase (that is compose-multiplatform).

ericrisco/rsc-harness · 78 tokens

claude-android-ninja

Build and migrate Android apps with Kotlin, Jetpack Compose, MVVM, Hilt, Room 3 (KSP, SQLiteDriver, Flow/suspend DAOs), Navigation3, and multi-module Gradle. Use for new projects or modules, Compose screens and ViewModels, Room 3 and RemoteMediator, API 37 / targetSdk migration, Play Integrity client wiring…

Drjacky/claude-android-ninja · 123 tokens