Use safe optional handling instead of force unwrapping: ```swift func title(for item: Item?) -> String { guard let item else { return "Untitled" } return item.title } let displayTitle = item?.title ?? "Untitled" if let item { print(item.title) } ``` Use `guard let` when the value is needed for the remainder of the scope, `if let` for a local branch, and `??` for a default. Avoid `Type!`, `!`, and `as!`; use proper optionals and conditional casts (`as?`).
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill swift-language --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Swift Language?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-swift-language-agent-skills-standard)More formats (shields.io, HTML) on the badges page.
Use safe optional handling instead of force unwrapping:
```swift
func title(for item: Item?) -> String {
guard let item else { return "Untitled" }
return item.title
}
let displayTitle = item?.title ?? "Untitled"
if let item { print(item.title) }
```
Use `guard let` when the value is needed for the remainder of the scope, `if let` for a local branch, and `??` for a default. Avoid `Type!`, `!`, and `as!`; use proper optionals and conditional casts (`as?`).
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!