cocoapods-to-spm

cocoapods-to-spm is a skill for Claude Code from Cap-go/capgo-skills. It costs 203 tokens per session (3,019 once invoked), scanned C, original, MIT.

A migration guide for moving a Capacitor iOS app from CocoaPods, an older dependency system, to Swift Package Manager, Apple's newer system for managing Swift and iOS packages.

In plain words
What is it for?
It helps update an existing Capacitor app to an SPM-based project, run or recover from the migration assistant, check plugin support, and configure debug builds.
Why use it?
It explains how to replace the old iOS project files and dependencies without losing the app's plugins or build settings.

Skill for Claude Code

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

Part of the capacitor-app-migrations plugin — 8 skills shipped together

Good fit It helps update an existing Capacitor app to an SPM-based project, run or recover from the migration assistant, check plugin support, and configure debug builds.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cap-go/capgo-skills/cocoapods-to-spm
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 Cap-go/capgo-skills --skill cocoapods-to-spm
Clone the repo
git clone --depth 1 https://github.com/Cap-go/capgo-skills

Made for: Claude Code.

Or install capacitor-app-migrations, the plugin that ships this one along with the rest of its 8 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 cocoapods-to-spm

README.md
[![agentmods](https://agentmods.dev/badge/skills/cap-go/capgo-skills/cocoapods-to-spm/github.svg)](https://agentmods.dev/skills/cap-go/capgo-skills/cocoapods-to-spm)
Your own site
<a href="https://agentmods.dev/skills/cap-go/capgo-skills/cocoapods-to-spm"><img src="https://agentmods.dev/badge/skills/cap-go/capgo-skills/cocoapods-to-spm/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 cocoapods-to-spm

Your own site · 80×15
<a href="https://agentmods.dev/skills/cap-go/capgo-skills/cocoapods-to-spm"><img src="https://agentmods.dev/badge/skills/cap-go/capgo-skills/cocoapods-to-spm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 203 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,019 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 12 Oct 2026
  • Snyk pass 12 Oct 2026
How audits are shown
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.00203 $0.03019
Opus 5.5 $0.00081 $0.01208
Sonnet 5.5 $0.00041 $0.00604
Haiku 4.5 $0.00020 $0.00302

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

Security

Grade C, and why

cocoapods-to-spm scanned grade C with 1 finding 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 19d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ios
plugins/capacitor-app-migrations/skills/cocoapods-to-spm/SKILL.md · 164 lines

How it starts

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

CocoaPods to Swift Package Manager Migration

Move a Capacitor iOS app from CocoaPods to SPM without losing native project customizations.

When to Use

TRIGGER when:

  • ios/App/Podfile, Pods/, Podfile.lock, or App.xcworkspace exists and the user wants SPM.
  • User asks about npx cap spm-migration-assistant, CapApp-SPM, debug.xcconfig, or --packagemanager SPM.
  • User worries about CocoaPods Trunk becoming read-only (expected December 2, 2026), or about pods that can no longer be published/updated.
  • npx cap sync warns Some installed Capacitor plugins are not compatible with SPM or <plugin id> does not have a Package.swift.
  • Upgrading to Capacitor 9 and wanting to drop CocoaPods at the same time.

Do not use:

  • Adding Package.swift / CAPBridgedPlugin to a plugin you maintain -> capacitor-plugin-spm-support.
  • SceneDelegate / UIScene adoption (Capacitor 8.5+, required by Xcode 27) -> capacitor-uiscene-migration.
  • The Capacitor major upgrade itself -> capacitor-app-upgrades, capacitor-app-upgrade-v8-to-v9.
  • Build or runtime failures unrelated to dependency management -> debugging-capacitor.

Why Now

  • CocoaPods Trunk is expected to become read-only on December 2, 2026. Existing pods keep resolving, but no new pod versions get published, so plugin fixes will increasingly ship SPM-only.
  • Capacitor 8+ scaffolds new iOS projects with SPM by default. Upgrading Capacitor does not convert an existing CocoaPods app.
  • Capacitor 9 (currently next / alpha) only adds the Cordova product / CapacitorCordova pod when a Cordova plugin is installed. Native code that imports Cordova without a Cordova plugin breaks in either setup.

How the CLI Decides

  • The CLI treats the project as SPM if and only if ios/App/CapApp-SPM/ exists. Deleting or renaming it silently flips npx cap sync back to CocoaPods behavior.
  • ios/App/CapApp-SPM/Package.swift is regenerated on every npx cap sync ios (// DO NOT MODIFY THIS FILE - managed by Capacitor CLI commands). Put customizations in capacitor.config.*, never in that file.
  • A plugin is included only if its npm package root has a Package.swift. Others are skipped with a warning; their native code is silently missing at runtime ("X" plugin is not implemented on ios).
  • During sync, if a plugin's Package.swift pins capacitor-swift-pm to a different major, the CLI rewrites that file inside node_modules and warns <id> is built for Capacitor <N>, it might cause issues. Treat this as "upgrade the plugin", not as success.
  • Cordova plugins get a generated package under ios/capacitor-cordova-ios-plugins/sources/<Name>. Plain .framework files are not supported as SPM binary targets (warning: custom .framework files are not supported as binaryTarget in SPM); they need an .xcframework.

Read the full file on GitHub · 164 lines

Files

What ships with it

2 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. 19d ago Changed · +6 lines 798fad7a4836
  2. 1mo ago Changed · -95 lines · +110 tokens per session b2907fbdd13c
  3. 3mo ago First seen · 253 lines · 93 tokens per session scan C e7878eb21469

Subscribe to this mod's changes

cocoapods-to-spm is a skill published in the GitHub repository Cap-go/capgo-skills (79 stars, last pushed 19d ago), licensed MIT. It adds 203 tokens to every session and 3,019 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

cocoapods-to-spm compared with skills from other repositories

cocoapods-to-spm next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cocoapods-to-spmCap-go/capgo-skillsSkill7919d agoMITC203Claude Code
capacitor-plugin-spm-supportcapawesome-team/skillsSkill5612d agoMITC96Claude Code, Codex
wear-compose-m3android/skillsSkill11k8d agoApache-2.0A108Claude Code
ink-custom-brush-builderandroid/skillsSkill11k8d agoApache-2.0A159Claude Code
ios-to-androidandroid/skillsSkill11k8d agoApache-2.0A203Claude Code
kotlin-tooling-agp9-migrationKotlin/kotlin-agent-skillsSkill1.1kyesterdayApache-2.0A105Claude Code, Codex
authoring-java-sdk-tasksastronomer/agentsSkill465todayApache-2.0A152Claude Code