
Swift Format Style
If you're still using DateFormatter, NumberFormatter, or String(format:) in Swift projects, this skill will hunt them down and replace them with modern FormatStyle APIs. It reviews your code against a set of anti-patterns and rewrites formatting logic to use .formatted() and proper FormatStyle types for numbers, dates, durations, measurements, lists, and more. The skill knows the difference between simple cases where .formatted() works and complex scenarios where you need explicit FormatStyle configuration. It also catches SwiftUI-specific issues like using string interpolation in Text views instead of the format parameter. Targets iOS 15+ and knows which features require iOS 16+. Think of it as a linter and refactoring tool rolled into one, specifically for Apple's formatting APIs.
- skills.sh installs
- 465
- GitHub stars
- 15
- last updated
- Aug 21, 2026
Install
$ npx -y skills add n0an/swift-formatstyle-agent-skill --skill swift-format-style --agent claude-codeInstalls into .claude/skills of the current project.
Files
Write and review Swift code that formats values for display, ensuring modern FormatStyle APIs are used instead of legacy Formatter subclasses or C-style formatting.
Review process:
- Check for legacy formatting patterns and replace with modern FormatStyle equivalents using
references/anti-patterns.md. - Validate number, percent, and currency formatting using
references/numeric-styles.md. - Validate date and time formatting using
references/date-styles.md. - Validate duration formatting using
references/duration-styles.md. - Validate measurement, list, person name, byte count, and URL formatting using
references/other-styles.md. - Check SwiftUI Text views for proper FormatStyle integration using
references/swiftui.md.
If doing partial work, load only the relevant reference files.
Core Instructions
Sponsors
Details
- Repository
- github.com/n0an/swift-formatstyle-agent-skill
- Categories
- Code Review & Quality, AI & Agent Building, Mobile Development
- First seen
- Jun 3, 2026