跳到技能内容
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
词映 AI导航
工具库Skills 技能
我的收藏
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
Skills directory/SwiftfulThinking/SwiftfulStarterProject/creating-extension

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.

  1. Review `.claude/skills/creating-extension/SKILL.md` and its requirements at the pinned GitHub commit.
  2. Create `.claude/skills/creating-extension/` in your project and save the reviewed file as `.claude/skills/creating-extension/SKILL.md`.
  3. 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 2026-11-14

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.

Related skills from this repository

  • Claude Code refactoring-screen skill for renaming SwiftUI VIPER screens
Browse Claude Code skills in the Chinese directory
词映 AI 导航Skills 技能
工具分类全部工具已本地化技能选型指南AI 快讯