/swift-security-pro:swift-security-profrom swift-security-pro
Guides iOS developers on secure data handling: Keychain storage, App Transport Security, secrets management, biometric authentication (Face ID/Touch ID), and file data protection.
Ships in swift-security-pro. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Protect user data and credentials. Default to the most secure option.
Trigger: /swift-security-pro.
UserDefaults or plist.❌ UserDefaults — plaintext, backed up, readable
UserDefaults.standard.set(token, forKey: "authToken")
✅ Keychain
let query: [String: Any] = [
kSecClass as String: kSecClassGenericPassword,
kSecAttrAccount as String: "authToken",
kSecValueData as String: Data(token.utf8),
kSecAttrAccessible as String: kSecAttrAccessibleWhenUnlockedThisDeviceOnly
]
SecItemDelete(query as CFDictionary)
SecItemAdd(query as CFDictionary, nil)
Use ...ThisDeviceOnly accessibility so secrets don't migrate via backup.
❌
let apiKey = "sk_live_abc123" // shipped in the binary, easily extracted
✅
.gitignore.NSAllowsArbitraryLoads.URLSessionDelegate urlSession(_:didReceive:completionHandler:).❌ Info.plist
<key>NSAppTransportSecurity</key><dict>
<key>NSAllowsArbitraryLoads</key><true/>
</dict>
✅ Leave ATS on; scope rare exceptions to a specific domain only.
Mark sensitive files so they're encrypted at rest while locked:
try data.write(to: url, options: .completeFileProtection)
import LocalAuthentication
let ctx = LAContext()
var error: NSError?
if ctx.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) {
let ok = try await ctx.evaluatePolicy(
.deviceOwnerAuthenticationWithBiometrics,
localizedReason: "Unlock your vault")
}
Biometrics gate access; the actual secret still lives in the Keychain (optionally with
SecAccessControl requiring biometry). Always provide a passcode fallback.
UserDefaults or a plist.NSAllowsArbitraryLoads / disabled ATS....ThisDeviceOnly for non-syncable secrets.Per issue: file:line, the exposure, before/after fix. Lead with credential leaks and plaintext storage.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ios-security, keychain, biometric-auth, ats, secrets-management
Other plugins' skills for the same job
npx claudepluginhub laxrajpurohit/swift-skills-pro --plugin swift-security-pro