Skip to content
Skill

Spm build analysis

Finds Swift Package Manager and module graph issues slowing Xcode builds

Spm build analysis is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
7
Last commit
License
Apache-2.0
Listing updated

Similar skills

About Spm build analysis

This skill guides an agent through diagnosing why an Xcode project builds slowly because of its Swift Package Manager setup. It covers package manifests and resolved versions, local versus remote packages, build plugins, binary targets, and how the dependency graph shape affects clean and incremental builds. The agent is told to gather evidence first, separate package-graph problems from project-setting problems, and avoid rewriting manifests or dependency sources without approval.

The workflow includes checking the Xcode project file to confirm that a local package is actually linked to a target before recommending changes to it, and a helper script that scans branch-pinned dependencies for available tags so the agent can suggest version or commit pins. It also looks for module-level problems such as circular dependencies, oversized modules, umbrella re-exports, duplicate module variants caused by differing build options, and macro-driven rebuild cascades. Findings are reported with evidence, affected package, clean and incremental impact, CI impact, estimated gain and approval requirement.

The skill expects access to the project's Package.swift, Package.resolved and project.pbxproj files, plus build logs or timing summaries where available. It requires Python 3 and git to run the pin-check script, and it points to reference checklists and a handoff to other Xcode analysis skills when the bottleneck lies outside packages.

When your agent uses it

Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM slowness, package resolution time, build plugin overhead, duplicate module builds from configuration drift, circular dependencies between modules, oversized modules needing splitting, or modularization best practices.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 4 files (8 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the xcode-build-suite plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add carloshpdoc/ios-workflow-claude
/plugin install xcode-build-suite@carloshpdoc-plugins

Or copy only this skill to ~/.claude/skills/spm-build-analysis:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/carloshpdoc/ios-workflow-claude.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/spm-build-analysis &&
cp -R "$tmp/plugins/xcode-build-suite/skills/spm-build-analysis" ~/.claude/skills/spm-build-analysis &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/spm-build-analysis inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/spm-build-analysis to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/carloshpdoc/ios-workflow-claude.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/spm-build-analysis &&
cp -R "$tmp/plugins/xcode-build-suite/skills/spm-build-analysis" ~/.agents/skills/spm-build-analysis &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/spm-build-analysis inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/spm-build-analysis to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/carloshpdoc/ios-workflow-claude.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/spm-build-analysis &&
cp -R "$tmp/plugins/xcode-build-suite/skills/spm-build-analysis" ~/.cursor/skills/spm-build-analysis &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/spm-build-analysis inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/carloshpdoc/ios-workflow-claude.git --path plugins/xcode-build-suite/skills/spm-build-analysis

Or copy the folder to ~/.gemini/skills/spm-build-analysis yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/spm-build-analysis:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/carloshpdoc/ios-workflow-claude.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/spm-build-analysis &&
cp -R "$tmp/plugins/xcode-build-suite/skills/spm-build-analysis" ~/.copilot/skills/spm-build-analysis &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/spm-build-analysis inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/carloshpdoc/ios-workflow-claude.git

Then copy ios-workflow-claude/plugins/xcode-build-suite/skills/spm-build-analysis into your agent's skills folder as spm-build-analysis. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Package graph analysis
Reviews manifests, resolved versions and how local and remote packages shape downstream rebuild work.
Linked package verification
Confirms a local package is referenced by a target before it is included in recommendations.
Branch pin scanning
Runs a helper script to find branch-tracked dependencies that have tags available for pinning.
Module dependency checks
Looks for cycles, layering violations, oversized modules and hidden re-export chains.
Build variant detection
Spots duplicate module builds caused by configuration drift or macro-driven rebuild cascades.
Structured reporting
Presents each finding with evidence, build impact, CI impact and approval requirements.

Good for

  • Why are my clean Xcode builds so slow after adding Swift packages?
  • Find circular dependencies between my Swift modules.
  • Check whether my branch-tracked SPM dependencies should be pinned to tags or commits.
  • Identify oversized modules that cause too many files to rebuild.
  • Review whether a build plugin is adding overhead to local or CI builds.

Spm build analysis FAQ

Does the skill change my Package.swift files automatically?

No. It is instructed not to rewrite package manifests or dependency sources without explicit approval.

What does the pin-check script need?

Run with python3 against your .xcodeproj; it uses git ls-remote --tags to check each branch-pinned package for tags.

Will Spm build analysis recommend a local package that is not used by the project?

No. It first checks project.pbxproj to confirm the package is referenced and its product linked to a target.

When does Spm build analysis hand off to another skill?

If the main cause is not package-related, it points to the xcode-project-analyzer or xcode-compilation-analyzer skill.

How do I install Spm build analysis in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/spm-build-analysis to use it in all your projects, or to .claude/skills/spm-build-analysis in one project. Or install the xcode-build-suite plugin, which includes it: /plugin marketplace add carloshpdoc/ios-workflow-claude, then /plugin install xcode-build-suite@carloshpdoc-plugins.

Does Spm build analysis run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Spm build analysis?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Spm build analysis?

The closest alternatives to Spm build analysis are Xcode project analyzer, Axiom resolve spm, Xcode compilation analyzer, Axiom optimize build and Improve architecture.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from carloshpdoc/ios-workflow-claude

  1. Measures Xcode clean and incremental build times and saves timestamped results

    • Open source
    • 7 GitHub stars
    • Developer tools
  2. Audits Xcode project settings and build phases to find slow-build causes

    • Open source
    • 7 GitHub stars
    • Developer tools
  3. Turns recent technical work into social and article drafts for manual review

    • Open source
    • 7 GitHub stars
    • Marketing and SEO
  4. Turns meeting notes or specs into planned, estimated Jira task tickets

    • Open source
    • 7 GitHub stars
    • Productivity
  5. Indexes, searches and maintains a personal collection of Markdown docs for Claude

    • Open source
    • 7 GitHub stars
    • Knowledge and memory
  6. Applies approved Xcode build fixes one at a time and re-benchmarks the results

    • Open source
    • 7 GitHub stars
    • Developer tools