swift-package-pro
Skill5 starsChanged 11 days agoMITView on GitHub
Reviews Swift Package Manager libraries for public API design, module organization, dependency hygiene, and modern SPM features. Use when reading, writing, or reviewing Swift packages.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- app-intents-proSkill
- coredata-swift6-proSkill
- instruments-profiling-proSkill
- motion-design-proSkill
- store-compliance-proSkill
- swift-accessibility-proSkill
- swift-adaptive-layout-proSkill
- swift-concurrency-proSkill
- swiftdata-proSkill
- swift-design-system-proSkill
- swift-docc-proSkill
- swift-error-handling-proSkill
- swift-logging-proSkill
- swift-memory-storage-proSkill
- swift-modularization-proSkill
- swift-testing-proSkill
- swiftui-proSkill
- xcode-security-proSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Check manifest mechanics (tools version, platforms, Swift settings, dependency pins, Package.resolved, plugins) using …
- Very specific: line 16
Check public API surface for correct access control using references/public-api.md.
- Very specific: line 17
Verify public import vs import usage matches InternalImportsByDefault rules using references/public-api.md.
- Very specific: line 18
Check resource handling for .process vs .copy correctness using references/resources.md.
- Very specific: line 20
Check inter-module dependency graph for cycles or unnecessary coupling using references/module-organization.md.
- Distinctive: line 22
If doing a partial review, load only the relevant reference files.
- Very specific: line 28
Prefer InternalImportsByDefault to make import visibility explicit and prevent accidental dependency re-export.
- Distinctive: line 31
Avoid third-party dependencies in foundational utility packages — they become transitive burdens for every consumer.
- Very specific: line 32
Use path: parameters in Package.swift to define a per-module directory layout ({Module}/Sources/, {Module}/Tests/) — flat Sources/ and …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Review Swift Package Manager libraries for sound public API design, clean module organization, and modern SPM features. Report only genuine problems - do not nitpick or invent issues.
Review process:
- Validate
Package.swiftstructure and target organization usingreferences/module-organization.md. - Check manifest mechanics (tools version, platforms, Swift settings, dependency pins,
Package.resolved, plugins) usingreferences/manifest-conventions.md. - Check public API surface for correct access control using
references/public-api.md. - Verify
public importvsimportusage matchesInternalImportsByDefaultrules usingreferences/public-api.md. - Check resource handling for
.processvs.copycorrectness usingreferences/resources.md. - Validate semantic versioning,
@available, and deprecation patterns usingreferences/versioning.md. - Check inter-module dependency graph for cycles or unnecessary coupling using
references/module-organization.md.
If doing a partial review, load only the relevant reference files.
Core Instructions
- Target Swift 6.0 or later with
.swiftLanguageMode(.v6). - Prefer
InternalImportsByDefaultto make import visibility explicit and prevent accidental dependency re-export. - Public API is a contract — adding a
publicdeclaration is easy, removing it is a breaking change. Default tointernal. - Each module should have a single, well-defined responsibility. Flag modules that mix unrelated concerns.
- Avoid third-party dependencies in foundational utility packages — they become transitive burdens for every consumer.
- Use
path:parameters inPackage.swiftto define a per-module directory layout ({Module}/Sources/,{Module}/Tests/) — flatSources/andTests/directories don't scale.
Output Format
Organize findings by file. For each issue:
- State the file and relevant line(s).
- Name the rule being violated.
- Show a brief before/after code fix.
Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.
Example output:
CoreUI/Sources/Spacing.swift
Line 7: Unnecessary public import — Foundation types do not appear in this file's public API.
// Before
public import Foundation
// After
import FoundationPackage.swift
Line 42: Target uses flat Sources/Foo path — prefer per-module directory layout.
// Before
.target(name: "Foo", path: "Sources/Foo")
// After
.target(name: "Foo", path: "Foo/Sources")Summary
- Public API hygiene (high): Three files mark
public import Foundationunnecessarily — change toimportto silence compiler warnings. - Organization (medium):
Package.swiftuses flat layout — migrate to per-module directories for scalability.
End of example.
References
references/module-organization.md— Target structure, per-module directory layout, helper functions, dependency graphs.references/manifest-conventions.md— FullPackage.swiftconventions: tools version, platforms, products,makeTargets(), Swift settings and upcoming features, dependencies,Package.resolved, path overrides, test targets, build plugins.references/public-api.md— Access control,public importvsimport,InternalImportsByDefault, API stability.references/resources.md— Bundle resources,.processvs.copy,Bundle.module, SPM limitations (.xcdatamodeld).references/versioning.md— Semantic versioning,@available,@_spi, deprecation, breaking change checklist.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

