Skip to content

levabond/iOS-clean-code-skills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

swift-clean-code

Clean Code skills for Swift / iOS projects based on Robert Martin's Clean Code and G. Ann Campbell's Cognitive Complexity.

Skills

Slash commands

Command What it does
/swift-clean-names Review and fix naming: variables, functions, types, protocols
/swift-clean-functions Audit function size, single responsibility, argument count, DRY
/swift-clean-types Review class/struct/protocol design, SRP, dependency injection
/swift-clean-errors Audit throws, optionals, Result, custom Error types
/swift-clean-tests Check FIRST principles, AAA pattern, test naming, mocking
/swift-clean-review Full Clean Code audit of a file or directory
/swift-cognitive-complexity Score and reduce Cognitive Complexity: nesting, closures, control flow

Automatic (model-invoked)

swift-clean-advisor — activates when writing or editing Swift files. Applies Clean Code guidance without being asked.

Installation

Copy .claude/ into your iOS project root:

cp -r .claude /path/to/your/ios/project/

Then open Claude Code in that project — skills are available immediately.

Usage

# Review naming in a file
/swift-clean-names Sources/Auth/LoginViewModel.swift

# Audit function design
/swift-clean-functions Sources/Services/NetworkService.swift

# Full audit of a module
/swift-clean-review Sources/Features/Checkout/

# Review test quality
/swift-clean-tests Tests/UserServiceTests.swift

# Score and reduce cognitive complexity
/swift-cognitive-complexity Sources/Features/Checkout/CheckoutViewModel.swift

Requirements

  • Claude Code CLI
  • Xcode project (any architecture: MVC, MVVM, TCA, etc.)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors