swiftui-localize
🎯Skillfrom ihugang/swiftui-localization-skill
swiftui-localize skill from ihugang/swiftui-localization-skill
Installation
npx skills add https://github.com/ihugang/swiftui-localization-skill --skill swiftui-localizegit clone https://github.com/ihugang/swiftui-localization-skill .claude/skills/swiftui-localizationSkill Details
Overview
# SwiftUI Localization Expert Skill
[](https://github.com/ihugang/swiftui-localization-skill)
[](./LICENSE)
[](https://developer.apple.com/xcode/swiftui/)
[](https://claude.com/claude-code)
[](https://github.com/ihugang/swiftui-localization-skill/stargazers)
[](https://github.com/ihugang/swiftui-localization-skill/commits)
[](https://github.com/ihugang/swiftui-localization-skill/pulls)
[中文](./README.zh.md) | English
An engineering‑grade localization Skill for SwiftUI / iOS / macOS projects.
This Skill runs directly in Claude Code and can be reused across
Codex / Cursor / Windsurf / Kiro / Qoder and other agent environments.
> The goal is not just translation, but treating localization as a reviewable, evolvable, CI‑ready engineering system.
---
✨ Features
- Localization system detection
- Localizable.strings / .stringsdict
- Strings Catalog (.xcstrings)
- Mixed usage
- SwiftGen / custom L10n
- Three execution modes
- scan – read‑only analysis (default)
- apply – refactor / cleanup / translate
- lint – CI gate (fail on violations)
- Engineering‑level key management
- Safe unused‑key detection
- Dynamic‑key risk marking
- Dotted English key best practices
- Automatic code reference rewriting
- SwiftUI aware
- Detect hardcoded UI strings in Text / Button / Label
- Placeholder consistency checks (%d / %@)
- String(localized:) / LocalizedStringResource
- Localization quality
- Base‑language‑driven translation
- zh‑Hant cultural QA (登入 / 設定 / 儲存)
- Optional glossary & translation memory
- Bilingual output
- Default: English
- lang=zh → Simplified Chinese output
---
📦 Installation
Repository:
```text
https://github.com/ihugang/swiftui-localization-skill
```
Option 1: Install via `npx` (recommended)
```bash
npx skills add https://github.com/ihugang/swiftui-localization-skill --skill swiftui-localize
```
Installs to:
```text
~/.claude/skills/swiftui-localize
```
Claude Code will auto‑detect the skill.
---
Option 2: Install per project (recommended for teams / CI)
```bash
mkdir -p .claude/skills
git clone https://github.com/ihugang/swiftui-localization-skill .claude/skills/swiftui-localization
```
The skill applies only to the current repository.
---
Verify installation
```bash
claude
```
Then run:
```text
/swiftui-localize scan
```
If recognized, installation is successful.
---
🚀 Usage
```text
# Read-only scan (default language: English)
/swiftui-localize scan
# Read-only scan (Simplified Chinese)
/swiftui-localize scan lang=zh
# Apply changes
/swiftui-localize apply lang=zh base=en target=zh-Hans,zh-Hant,ja
# CI gate
/swiftui-localize lint
```
---
🧠 Modes
| Mode | Writes files | Purpose |
| --- | --- | --- |
| scan | ❌ No | Analysis & recommendations |
| apply | ✅ Yes | Cleanup / rename / translate |
| lint | ❌ No | CI quality gate |
---
🌍 Output Language
- Default: English
- Switch to Chinese:
```text
/swiftui-localize scan lang=zh
```
lint defaults to English for CI readability.
---
📚 Documentation
- [SKILL.md](./SKILL.md) - Complete skill implementation guide for agents
- [TRANSLATION-BEST-PRACTICES.md](./docs/TRANSLATION-BEST-PRACTICES.md) - Translation quality standards and best practices
- [EXAMPLE-PROJECT-STRUCTURE.md](./docs/EXAMPLE-PROJECT-STRUCTURE.md) - Example SwiftUI project