Token导航 LogoToken导航

Agent Skill · 研究检索

cocoapods-to-spm(cocoapods 到 spm)

cocoapods-to-spm 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cocoapods-to-spm 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,674 个 Skill 里排第 27,345。

总安装 3,408周安装 142GitHub Stars 30下载 1,136核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cocoapods-to-spm(cocoapods 到 spm)
来源仓库:https://github.com/cap-go/capgo-skills
仓库路径:skills/cocoapods-to-spm
安装命令:
npx skills add https://github.com/cap-go/capgo-skills --skill cocoapods-to-spm
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cap-go/capgo-skills --skill cocoapods-to-spm

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

cocoapods-to-spm 提供从 CocoaPods 迁移到 Swift Package Manager 的详细指南,适合优化 iOS 项目依赖管理。适用于 Codex、Claude、Cursor、Gemini CLI 中查找迁移方案和技术对比信息。

包含迁移步骤、优势分析和项目结构变更说明,支持快速定位解决方案。安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/cocoapods-to-spm

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/cap-go/capgo-skills --skill cocoapods-to-spm;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cocoapods-to-spm 怎么安装?

在终端执行 npx skills add https://github.com/cap-go/capgo-skills --skill cocoapods-to-spm。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cocoapods-to-spm 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cocoapods-to-spm 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

cocoapods-to-spm 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cocoapods-to-spm 用的人多吗?

公开数据是累计安装 3,408 次,近一周安装 142 次,下载 1,136 次,GitHub 30 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cocoapods-to-spm 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
cocoapods-to-spm

cocoapods 到 spm · 本页

3,40830需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

CocoaPods to Swift Package Manager Migration

Migrate a Capacitor iOS app from CocoaPods to Swift Package Manager without losing native project customizations.

When to Use This Skill

  • User wants to migrate a Capacitor app from CocoaPods to SPM
  • User asks about npx cap spm-migration-assistant
  • User asks about CapApp-SPM, generated Package.swift, or debug.xcconfig
  • User has Capacitor 8 and wants the iOS app to use the default SPM template
  • User wants to remove ios/App/Podfile, Pods, Podfile.lock, or App.xcworkspace
  • User has SPM migration errors caused by plugins without SPM support

Do not use this for adding SPM support to a plugin package. Use capacitor-plugin-spm-support for plugin repositories.

Key Rules

  • Capacitor 8 creates new iOS projects with SPM by default.
  • Existing CocoaPods apps are not changed automatically just because Capacitor is upgraded.
  • In an SPM-based Capacitor app, plugin dependencies are referenced through ios/App/CapApp-SPM.
  • Do not edit CapApp-SPM by hand. The Capacitor CLI rewrites it during npx cap sync.
  • Do not mix CocoaPods and SPM in the same Capacitor app migration. All Capacitor and Cordova plugins in package.json need SPM support before the app can fully move.
  • Commit or otherwise preserve the current project before deleting, regenerating, or deintegrating the iOS project.

Command Policy

  • Use the target repo's package manager for dependency installs and package scripts.
  • For Capacitor CLI commands in this skill, use npx cap... so the project-local Capacitor CLI is used.
  • In Capgo repos, use Bun for local development commands when repo instructions require it, but keep Capacitor CLI examples as npx cap....

Live Project Snapshot

Detected Capacitor, iOS, Cordova, and plugin dependencies:!node -e "const fs=require('fs');if(!fs.existsSync('package.json'))process.exit(0);const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));const out=[];for(const section of ['dependencies','devDependencies']){for(const [name,version] of Object.entries(pkg[section]||{})){if(name.startsWith('@capacitor/')||name.startsWith('@capgo/')||name.startsWith('@capacitor-community/')||name.startsWith('@awesome-cordova-plugins/')||name.startsWith('cordova-')||name.includes('capacitor'))out.push(section+'.'+name+'='+version)}}console.log(out.sort().join('\n'))"

Relevant iOS dependency files:!find ios -maxdepth 5 \(-name 'Podfile' -o -name 'Podfile.lock' -o -name 'Pods' -o -name 'App.xcworkspace' -o -name 'Package.swift' -o -name 'Package.resolved' -o -name 'CapApp-SPM' -o -name 'debug.xcconfig' -o -name 'project.pbxproj' -o -name 'Info.plist' -o -name '*.entitlements' -o -name 'GoogleService-Info.plist' \) 2>/dev/null

Migration Procedure

Step 1: Confirm Scope and Prerequisites

Inspect:

  • package.json for Capacitor major version and installed plugins
  • ios/App/Podfile and ios/App/Podfile.lock for current CocoaPods dependencies
  • ios/App/App.xcodeproj/project.pbxproj for custom build settings, package references, entitlements, signing, and native source files
  • ios/App/App/ for app customizations

Before changing files, verify:

  • The app is on a Capacitor version that supports SPM migration.
  • The working tree is clean or the user accepts that local changes are being preserved.
  • Every Capacitor/Cordova plugin has SPM support or a replacement plan.

If the migration is part of a Capacitor 8 upgrade, combine this skill with capacitor-app-upgrade-v7-to-v8.

Step 2: Preserve Native Customizations

Record and preserve anything under ios/ that a fresh template would overwrite:

  • ios/App/App/Info.plist
  • ios/App/App/AppDelegate.swift
  • ios/App/App/SceneDelegate.swift, if present
  • ios/App/App/Assets.xcassets/
  • ios/App/App/Base.lproj/
  • ios/App/App/*.entitlements
  • ios/App/App/GoogleService-Info.plist, if Firebase is used
  • custom .xcconfig files
  • custom Swift or Objective-C source files
  • custom frameworks, SDK files, extension targets, build phases, schemes, and signing settings

Prefer preserving through git and explicit diffs. Do not rely on memory.

Step 3: Choose the Migration Path

Use the safest path for the project:

PathUse WhenTradeoff
CLI assistantThe iOS project has moderate customization and plugins mostly support SPMAutomates CocoaPods removal but still needs Xcode steps
Fresh SPM re-scaffoldThe iOS project is close to the Capacitor templateCleanest result, but native customizations must be restored carefully
Manual repairThe assistant already ran or the project is heavily customizedMore control, more Xcode project editing

If unsure, start with plugin compatibility and backup work. Do not delete ios/ until the preservation list is complete.

Step 4: Run the CLI Assistant

Preferred first attempt for many existing apps:

npx cap spm-migration-assistant

Expect it to:

  • run CocoaPods deintegration
  • remove Podfile, Podfile.lock, Pods, and App.xcworkspace
  • create ios/App/CapApp-SPM
  • generate a Package.swift from installed plugins
  • generate debug.xcconfig
  • warn about plugins that cannot be represented as SPM packages

Then open the iOS project:

npx cap open ios

In Xcode:

  • Select the app project.
  • Open the Package Dependencies tab.
  • Add the local CapApp-SPM package.
  • Add the generated debug.xcconfig to the project configuration as directed by the assistant output.

After Xcode changes, run:

npx cap sync ios

Step 5: Fresh Re-Scaffold Alternative

Use this when the iOS project has little or no custom native configuration, or the assistant path is messier than regenerating.

Before deleting anything, preserve the native files listed in Step 2.

Then re-create iOS with SPM:

rm -rf ios
npx cap add ios --packagemanager SPM
npx cap sync ios

For Capacitor 8+, npx cap add ios uses SPM by default, but keep --packagemanager SPM when documenting the migration so the intent is explicit.

Restore custom files and settings deliberately:

  • copy back app icons and launch storyboards
  • reapply Info.plist keys without overwriting new template changes blindly
  • restore entitlements and signing
  • restore Firebase or other service configuration files
  • re-add custom native source, extensions, build phases, and schemes

Step 6: Fix Plugin Compatibility

If npx cap sync or the assistant warns about unsupported plugins:

  • upgrade the plugin to an SPM-capable version
  • replace the plugin with an official, Capgo, or maintained community alternative
  • migrate the plugin itself with capacitor-plugin-spm-support if it is owned by the project
  • postpone full SPM migration if a critical plugin cannot support SPM yet

Do not keep a plugin in CocoaPods while the app is otherwise migrated to SPM.

Step 7: Validate the New iOS Project

Run the repo's normal web build first, then sync and build iOS:

npx cap sync ios
npx cap open ios

In Xcode, verify:

  • CapApp-SPM is present as a local package dependency
  • debug.xcconfig is attached to the debug configuration
  • Podfile, Pods, Podfile.lock, and App.xcworkspace are gone for the migrated app
  • Package.resolved is generated and committed if present
  • signing team, bundle identifier, deployment target, entitlements, and capabilities survived
  • app builds and launches on simulator
  • native plugin flows still work on a real device when they need hardware or permissions

If using command-line verification, use the workspace/project and scheme that actually exist after migration.

Common Failures

Unsupported Plugin

Cause: a Capacitor or Cordova plugin does not ship SPM metadata.

Fix: upgrade, replace, or migrate the plugin. If the plugin is project-owned, use capacitor-plugin-spm-support.

Missing CapApp-SPM

Cause: the assistant did not finish, files were deleted, or npx cap sync has not regenerated the package.

Fix:

npx cap sync ios

Then add the local package in Xcode if it is not already linked.

Missing debug.xcconfig

Cause: generated config was not added to the Xcode project.

Fix: add ios/App/debug.xcconfig to the project configuration in Xcode, following the migration assistant output.

Duplicate Symbols or Duplicate SDKs

Cause: the same dependency is still referenced by leftover CocoaPods artifacts and SPM.

Fix: remove CocoaPods artifacts from the app, clean derived data, reset package caches in Xcode, and rebuild.

Lost Native Customization

Cause: a fresh iOS scaffold overwrote customized files.

Fix: recover from git or the preserved backup list, then reapply changes selectively against the new SPM template.

Output Format

For planning tasks, return:

## SPM Migration Plan

### Current State
- Capacitor version:
- CocoaPods files:
- Plugins needing SPM check:
- Native customizations to preserve:

### Recommended Path
- CLI assistant / fresh re-scaffold / manual repair:
- Reason:

### Steps
1. Preserve native files
2. Verify plugin SPM support
3. Run migration
4. Complete Xcode package/config setup
5. Sync and build

### Risks
- Unsupported plugins:
- Native customizations:
- Manual Xcode steps:

For implementation tasks, make the migration changes, run the relevant build or verification command available in the repo, and report any remaining Xcode-only or device-only checks.

平台分布

Codex

37.19%
按下载量换算422

Claude

27.93%
按下载量换算317

Cursor

18.83%
按下载量换算214

Gemini CLI

8.67%
按下载量换算98

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills