Secure iOS apps with Keychain, CryptoKit, biometric authentication, and Apple security best practices.
Works with
Covers Keychain Services for credential storage, Data Protection file classes, and CryptoKit for encryption, hashing, and HMAC operations
Includes Secure Enclave key storage, biometric authentication with LocalAuthentication (Face ID/Touch ID), and LAContext configuration
Enforces App Transport Security (ATS) requirements, certificate pinning patterns, and explains kSecAttrAccessibl
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionios-securityExecute the skills CLI command in your project's root directory to begin installation:
Fetches ios-security from dpearson2699/swift-ios-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate ios-security. Access via /ios-security in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
372
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
372
stars
Guidance for handling sensitive data, authenticating users, encrypting correctly, and following Apple's security best practices on iOS.
The Keychain is the ONLY correct place to store sensitive data. Never store passwords, tokens, API keys, or secrets in UserDefaults, files, or Core Data.
func saveToKeychain(account: String, data: Data, service: String) throws {
let query: [String: Any] = [
kSecClass as String: kSecClassGenericPassword,
kSecAttrAccount as String: account,
kSecAttrService as String: service,
kSecValueData as String: data,
kSecAttrAccessible as String: kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly
]
let status = SecItemAdd(query as CFDictionary, nil)
if status == errSecDuplicateItem {
let updateQuery: [String: Any] = [
kSecClass as String: kSecClassGenericPassword,
kSecAttrAccount as String: account,
kSecAttrService as String: service
]
let updates: [String: Any] = [kSecValueData as String: data]
let updateStatus = SecItemUpdate(updateQuery as CFDictionary, updates as CFDictionary)
guard updateStatus == errSecSuccess else {
throw KeychainError.updateFailed(updateStatus)
}
} else if status != errSecSuccess {
throw KeychainError.saveFailed(status)
}
}
func readFromKeychain(account: String, service: String) throws -> Data {
let query: [String: Any] = [
kSecClass as String: kSecClassGenericPassword,
kSecAttrAccount as String: account,
kSecAttrService as String: service,
kSecReturnData as String: true,
kSecMatchLimit as String: kSecMatchLimitOne
]
var result: AnyObject?
let status = SecItemCopyMatching(query as CFDictionary, &result)
guard status == errSecSuccess, let data = result as? Data else {
throw KeychainError.readFailed(status)
}
return data
}
func deleteFromKeychain(account: String, service: String) throws {
let query: [String: Any] = [
kSecClass as String: kSecClassGenericPassword,
kSecAttrAccount as String: account,
kSecAttrService as String: service
]
let status = SecItemDelete(query as CFDictionary)
guard status == errSecSuccess || status == errSecItemNotFound else {
throw KeychainError.deleteFailed(status)
}
}
| Value | When Available | Device-Only | Use For |
|---|---|---|---|
kSecAttrAccessibleWhenUnlocked |
Device unlocked | No | General credentials |
kSecAttrAccessibleWhenUnlockedThisDeviceOnly |
Device unlocked | Yes | Sensitive credentials |
kSecAttrAccessibleAfterFirstUnlock |
After first unlock | No | Background-accessible tokens |
kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly |
After first unlock | Yes | Background tokens, no backup |
kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly |
Passcode set + unlocked | Yes | Highest security |
Rules:
ThisDeviceOnly variants for sensitive data. Prevents backup/restore to other devices.AfterFirstUnlock for tokens needed by background operations.WhenPasscodeSetThisDeviceOnly for most sensitive data. Item is deleted if passcode is removed.kSecAttrAccessibleAlways (deprecated and insecure).Share keychain items across apps from the same team:
let query: [String: Any] = [
kSecClass as String: kSecClassGenericPassword,
kSecAttrAccount as String: "shared-token",
kSecAttrAccessGroup as String: "TEAMID.com.company.shared"
]
| Storage | Use For | Security |
|---|---|---|
@AppStorage / UserDefaults |
Non-sensitive preferences (theme, onboarding state, feature flags) | Not encrypted at rest |
| Keychain | Passwords, tokens, API keys, secrets | Hardware-encrypted, access-controlled |
Rule: If the data would be embarrassing or dangerous if exposed, it goes in Keychain. Everything else can use @AppStorage.
// Non-sensitive preference -- @AppStorage is fine
@AppStorage("hasCompletedOnboarding") private var hasOnboarded = false
// Sensitive credential -- MUST use Keychain
// WRONG: @AppStorage("authToken") private var token = ""
// CORRECT: Use saveToKeychain(account:data:service:)
iOS encrypts files based on their protection class:
| Class | When Available | Use For |
|---|---|---|
.complete |
Only when unlocked | Sensitive user data |
.completeUnlessOpen |
Open handles survive lock | Active downloads, recordings |
.completeUntilFirstUserAuthentication |
After first unlock (default) | Most app data |
.none |
Always | Non-sensitive, system-needed data |
// Set file protection
try data.write(to: url, options: .completeFileProtection)
// Check protection level
let attributes = try FileManager.default.attributesOfItem(atPath: path)
let protection = attributes[.protectionKey] as? FileProtectionType
Use .complete for any file containing user-sensitive data. The default
.completeUntilFirstUserAuthentication is acceptable for general app data.
Use CryptoKit for all cryptographic operations. Do not use CommonCrypto or the raw Security framework for new code.
import CryptoKit
let key = SymmetricKey(size: .bits256)
func Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
shadcn/improve
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
ailabs-393/ai-labs-claude-skills
ios-security reduced setup friction for our internal harness; good balance of opinion and flexibility.
Registry listing for ios-security matched our evaluation — installs cleanly and behaves as described in the markdown.
ios-security fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
ios-security has been reliable in day-to-day use. Documentation quality is above average for community skills.
Registry listing for ios-security matched our evaluation — installs cleanly and behaves as described in the markdown.
ios-security reduced setup friction for our internal harness; good balance of opinion and flexibility.
ios-security fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Keeps context tight: ios-security is the kind of skill you can hand to a new teammate without a long onboarding doc.
I recommend ios-security for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
ios-security is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 56