naming
Name Swift entities (types, protocols, functions, parameters, properties, local variables, cases) following Apple's Swift API Design Guidelines and this…
Skill by youversion
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/youversion-naming
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/naming
What's inside
- Skill name
naming- Description
- Name Swift entities (types, protocols, functions, parameters, properties, local variables, cases) following Apple's Swift API Design Guidelines and this project's conventions. Use when introducing or renaming any identifier in Swift code, reviewing a PR for naming, or deciding between candidate names.
- License
- Apache-2.0
- Instructions
- 346 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Naming Entities in Swift
The goal of a name is **clarity at the point of use**. A name succeeds when a reader who has never seen the call site can predict what it does, what type it is, and how it fits with the code around it. A name fails when it forces the reader to pause and think *"why is this one different?"* or *"what does that abbreviation stand for?"*
Apply these rules any time you introduce or rename a type, protocol, function, method, parameter, property, local variable, enum case, or generic parameter.
---
## 1. Hard rules
These are non-negotiable on this project.
### No abbreviations
Abbreviations force the reader to decode. Write the full word.
```swift
// No
let usr: User
let btnTitle: String
let createdDt: Date
let msgCount: Int
func calc(...) -> Int
class NoteMgr { ... }
// Yes
let user: User
let buttonTitle: String
let createdDate: Date
let messageCount: Int
func calculate(...) -> Int
class NotesManager { ... }
```
Narrow exceptions:
- **Deeply precedented domain terms** that everyone in that field would recognize: `sin`, `cos`, `url`, `id`, `json`, `html`. If a reasonable web search on the abbreviation alone would confirm the meaning, it is fine.
- **Established acronyms** already in the platform: `URL`, `UUID`, `HTTP`, `JSON`.
Acronyms follow the Swift case convention: uniformly upper-cased when capitalized (`URL`, `UTF8`), uniformly lower-cased otherwise (`urlString`, `jsonDecoder`). Never `Url` or `urlDecoderUrl`.
### No restating context
Inside a type, a property name should not repeat the enclosing type's name. The context is already obvious.
```swift
// No
struct BibleVersion {
let versionTitle: String
let bibleVersionAbbreviation: String
let versionID: Int
}
// Yes
struct BibleVersion {
let title: String
let abbreviation: String
let id: Int
}
```
Same for function parameters — do not restate the function's subject in each label:
```swift
// No
func updateVersion(versionTitle: String, versionAbbreviation: String) { ... }
// Yes
func updateVersion(title: String, abbreviation: String) { ... }
```
### Prefer product-focused names over technical names
When a shorter, more product-focused name conveys nearly all the meaning, use it. Multi-word internal-implementation names are a smell.
```swift
// No — technical, implementation-leaking, long
class NoteObjectStateSyncMachine { ... }
class UserDataRepositoryCoordinator { ... }
class PlanReadingProgressStateHandler { ... }
// Yes — what the thing is, in product terms
class NotesManager { ... }
class UserRepository { ... }
class PlanProgress { ... }
```
Ask *"what does this do for the product?"* and name from that vocabulary. Save specificity for the handful of cases where the role really is the distinguishing thing.
### A name must imply its type
A reader should be able to guess the type from the name without jumping to the declaration. Be consistent with the shape already used in nearby code.
| Type | Suffix / shape | Examples |
| ---------------- | ----------------------------------------------- | ---------------------------------------- |
| `Date` | `...Date` | `createdDate`, `expirationDate` |
| `TimeInterval` | `...Duration`, `...Interval`, `...Seconds` | `animationDuration`, `timeoutSeconds` |
| `URL` | `...URL` | `avatarURL`, `shareURL` |
| `String` (URL) | `...URLString` | `avatarURLString` |
| `Bool` | `is...`, `has...`, `can...`, `should...` | `isHidden`, `hasUnread`, `canDismiss` |
| Count | `...Count` | `messageCount`, `unreadCount` |
| Array | pluralize | `friends`, `savedMoments` |
| Dictionary | `...By...` or descriptive pair | `usersByID` |
| Identifier | `...ID` (when not the primary `id` of the type) | `userID`, `planID` |
| Closure | verb phrase describing what it does | `onTap`, `onLoad`, `didSelect` |
Do not invent a new shape when a nearby one exists. If surrounding code uses `createdDate`, do not introduce `createdOn` or `createdAt` or `createdDt` — match the established pattern. **Never make the reader think "why is this similar-looking thing different from the other cases?"**
### Consistency with nearby code wins
Before naming a new thing, read the file and the module around it. If there is an existing convention — suffix, verb, parameter label order, collection naming — follow it. A technically better name that breaks a local pattern is worse than the local pattern.
---
## 2. Choosing the base name
### Name by role, not by type
Use the *role* the value plays in the code, not its class name.From youversion/platform-sdk-swift, Apache-2.0.
More from youversion/platform-sdk-swift
- 0.628score
audit-swift
youversion
Audit Swift code for compliance with this project's style and conventions (access control, async/await, code organization, idioms, formatting).
SkillAFreshness: A★ 9Claude Code +9 - 0.623score
audit-swift-ui
youversion
Audit SwiftUI code for compliance with this project's view-specific conventions (Dynamic Type, @State privacy, view naming).
SkillAFreshness: A★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 7
- Open issues
- 0
- Last commit (this folder)
- Oct 16, 2026 (12 days ago)
- Last release
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/youversion/platform-sdk-swift
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from youversion
- 0.628score
audit-swift
youversion
Audit Swift code for compliance with this project's style and conventions (access control, async/await, code organization, idioms, formatting).
SkillAFreshness: A★ 9Claude Code +9 - 0.623score
audit-swift-ui
youversion
Audit SwiftUI code for compliance with this project's view-specific conventions (Dynamic Type, @State privacy, view naming).
SkillAFreshness: A★ 9Claude Code +9
Cite this page
naming skill. Agent Mart. https://agentmart.dev/skills/youversion-naming (last updated 2026-10-24)