Skip to main content
skill CX Codex

swift-formatstyle — Claude Code skill: what it does, how to install

Teaches AI assistants to replace legacy Formatter subclasses with Foundation FormatStyle in Swift and SwiftUI. Useful for locale-safe numbers, dates, and currencies.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpearson2699/swift-ios-skills --skill swift-formatstyle -a claude-code
Open on GitHub

What swift-formatstyle does

This skill guides assistants through replacing legacy NumberFormatter and DateFormatter setups with type-safe FormatStyle APIs. It covers localized numbers, ISO 4217 currencies, dates, measurements, names, and lists.

The instructions prioritize SwiftUI integration via Text(_:format:) so the view layer owns the rendered output. When user input must round-trip back into data models, it introduces matching ParseableFormatStyle implementations based on explicit locales or user environment settings.

Availability is a strict boundary here. While standard styles run on iOS 15+, Duration patterns and URL formatters require iOS 16, and anchored relative date styles demand iOS 18.

What it helps with

  • replace legacy Formatter subclasses with modern FormatStyle
  • configure locale-aware currency and decimal parsing without precision loss
  • format dates, measurements, and lists directly inside SwiftUI Text
  • verify UI rendering across different locale conventions and numbering systems

Example prompts for the agent

  • Refactor this legacy DateFormatter code to Foundation FormatStyle for iOS 16
  • Show how to format currency using Text(_:format:) with an ISO 4217 code
  • Implement ParseableFormatStyle to parse a decimal amount from user input

How to install swift-formatstyle

1Skills CLI (Vercel)

npx skills add dpearson2699/swift-ios-skills --skill swift-formatstyle -a claude-code

2Manually: put the files in place

~/.claude/skills/swift-formatstyle/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swift-formatstyle/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about swift-formatstyle

How do I install swift-formatstyle in Claude Code?

Run npx skills add dpearson2699/swift-ios-skills --skill swift-formatstyle -a claude-code.

What does swift-formatstyle do?

It provides patterns and rules for using Foundation FormatStyle and ParseableFormatStyle, helping agents output locale-correct formatting for numbers, dates, and text in Swift.

Which iOS versions does swift-formatstyle target?

Base FormatStyle requires iOS 15+. Formatting for Duration and URL needs iOS 16 or newer, while Date.AnchoredRelativeFormatStyle is restricted to iOS 18+.

Similar skills

Everything for Mobile →

From the same set69

audioaccessorykit Guides automatic audio switching setup for third-party Bluetooth headphones with AudioAccessoryKit on iOS 26.4+. Useful when companion apps and extensions handle accessory state. CX Codex +1 3,000installs ios-simulator This skill manages iOS Simulator with xcrun simctl, covering app launches, locations, permissions, logs, screenshots, and boot failure checks. CX Codex +1 3,000installs adattributionkit Guides Apple mobile developers through privacy-focused ad attribution in iOS 17.4+. Use it to register impressions, handle postbacks, and update conversion values. CX Codex +1 3,100installs app-store-optimization Structures App Store Connect metadata to improve organic search ranking and download conversion. It balances keywords across titles, subtitles, and the indexed keyword field. CX Codex +1 2,900installs tabletopkit Guides work on visionOS spatial board games using TabletopKit, including game pieces, turns, participant sync, and RealityKit rendering. CX Codex +1 2,900installs swift-api-design-guidelines Applies Apple's official Swift API Design Guidelines to codebases. It guides argument labels, naming conventions for mutating methods, and structured documentation comments. CX Codex +1 2,800installs swiftlint Sets up SwiftLint for Swift projects, covering rules, suppressions, baselines and CI checks. Use it when adding linting to a build or bringing existing code under review. CX Codex +1 2,700installs ios-ettrace-performance This skill guides a focused iOS ETTrace capture from matching dSYMs to per-thread analysis. Use it when comparing a repeatable launch or runtime flow. CX Codex +1 1,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor