Claude Code skill for adding a Swift computed property
Extend an existing Swift type in SwiftfulStarterProject while keeping one extension file per type and exposing parameter-free helpers as computed properties.
中文Install in Claude Code
Open SwiftfulStarterProject in Xcode and identify a preview that displays user-facing text. Start from a buildable checkout with the existing Extensions folder.
- Review `.claude/skills/creating-extension/SKILL.md` and its requirements at the pinned GitHub commit.
- Create `.claude/skills/creating-extension/` in your project and save the reviewed file as `.claude/skills/creating-extension/SKILL.md`.
- Start Claude Code from that project's root, then select `/creating-extension` in the slash menu.
Example task
Prepare a SwiftUI route preview that needs tidied display text. Open the existing String extension file and add a computed property that trims the outer whitespace.
`String+EXT.swift` · `trimmedLabel` · " Route A " → "Route A"What to check
The preview displays exactly `Route A`. The String extension stays in `String+EXT.swift`, and the input string stays unchanged.
Original SKILL.md on GitHub · Updated
Frequently asked question
Where should I put the property when the matching extension file exists?
Add it to the existing `Type+EXT.swift` file. Separate extension blocks can group related helpers in that same file. Keep route-specific business rules in their owning types.