xxf-swift-format

Apply SwiftFormat rules to Swift codebases using a .swiftformat configuration.

6|1|Updated May 22, 2025
One-click install
npx skills add https://github.com/NBXXF/xxf_ios --skill xxf-swift-format
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xxf-swift-format
Source: https://github.com/NBXXF/xxf_ios/tree/main/skills/xxf-swift-format
Command: npx skills add https://github.com/NBXXF/xxf_ios --skill xxf-swift-format

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Swift projects often suffer from inconsistent formatting across teams, causing review churn and readability issues. XXFSwiftFormat provides a centralized way to enforce a unified style by integrating SwiftFormat rules, configurations, and CI checks.

Core Features & Use Cases

  • Unified style enforcement: Apply a shared SwiftFormat configuration to all Swift sources.
  • Configurable rules & CI integration: Maintain a .swiftformat file and wire it into CI pipelines for automatic linting.
  • Use Case: On-boarding new projects or teams, updating formatting rules, or pre-commit style checks.

Quick Start

In your iOS project, enable SwiftFormat with the project’s .swiftformat configuration and run swiftformat --lint to enforce formatting during CI.

Frequently Asked Questions about xxf-swift-format

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Swift code formatting in CI pipelines?▼

You can automate Swift code formatting in CI pipelines by integrating SwiftFormat rules and running swiftformat --lint during your CI checks to enforce a consistent style.

What is the best way to enforce a unified Swift code style across teams?▼

Enforcing a unified Swift code style requires a centralized .swiftformat configuration file applied across all source files to prevent review churn and readability issues.

Do I need a .swiftformat configuration file to lint Swift source files?▼

Yes, you need a .swiftformat configuration file in your iOS project to define the specific SwiftFormat rules for linting and formatting your Swift source code.

Can I use SwiftFormat for pre-commit style checks in iOS projects?▼

Yes, you can wire SwiftFormat into pre-commit hooks to automatically verify and enforce formatting rules on Swift source files before changes are committed.

Why does my Swift code formatting break during CI lint checks?▼

Swift code formatting breaks during CI lint checks when source files do not adhere to the rules defined in your project's .swiftformat configuration, causing the swiftformat --lint command to fail.