From apple-kit-skills
Guides Apple platform security work: Keychain CRUD, biometric-gated secrets, CryptoKit, Secure Enclave, certificate pinning, and OWASP mobile compliance.
How this skill is triggered — by the user, by Claude, or both
Slash command
/apple-kit-skills:swift-securityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill for client-side Apple platform security work: Keychain Services,
evals/evals.jsonreferences/biometric-authentication.mdreferences/certificate-trust.mdreferences/common-anti-patterns.mdreferences/compliance-owasp-mapping.mdreferences/credential-storage-patterns.mdreferences/cryptokit-public-key.mdreferences/cryptokit-symmetric.mdreferences/keychain-access-control.mdreferences/keychain-fundamentals.mdreferences/keychain-item-classes.mdreferences/keychain-sharing.mdreferences/migration-legacy-stores.mdreferences/secure-enclave.mdreferences/testing-security-code.mdUse this skill for client-side Apple platform security work: Keychain Services, access control, biometric-gated secrets, CryptoKit, Secure Enclave keys, credential storage, certificate trust, keychain sharing, legacy secret migration, security testing, and OWASP mobile compliance mapping.
Default to iOS 17+ and Swift concurrency examples when the deployment target is unknown. Keep iOS 13+ compatibility notes when the user asks for older targets. Treat iOS 26 CryptoKit post-quantum APIs as availability-gated.
Classify the request before loading references.
Do not load every reference file by default. This skill is intentionally split for progressive disclosure; load only the files needed by the user's task.
| If the task involves | Load |
|---|---|
| General keychain CRUD or OSStatus handling | keychain-fundamentals.md |
Choosing kSecClass or item identity | keychain-item-classes.md |
Accessibility classes or SecAccessControl | keychain-access-control.md |
| Face ID, Touch ID, or biometric-gated secrets | biometric-authentication.md |
| Secure Enclave keys | secure-enclave.md |
| Hashing, HMAC, AES-GCM, ChaChaPoly, HKDF, PBKDF2 | cryptokit-symmetric.md |
| Signing, ECDH, HPKE, ML-KEM, ML-DSA | cryptokit-public-key.md |
| OAuth tokens, API keys, logout, refresh rotation | credential-storage-patterns.md |
| App/extension keychain sharing | keychain-sharing.md |
| Certificate trust, SPKI pinning, mTLS | certificate-trust.md |
| UserDefaults/plist/NSCoding migration | migration-legacy-stores.md |
| Unit, integration, simulator, device, or CI tests | testing-security-code.md |
| OWASP MASVS/MASTG or enterprise audit mapping | compliance-owasp-mapping.md |
| Full security review | common-anti-patterns.md, then each touched domain reference |
Use directive language only for these security invariants and the matching anti-patterns in common-anti-patterns.md. For architecture choices outside this list, use advisory language.
UserDefaults, Info.plist, .xcconfig, source code, logs, files, or
NSCoding archives. Use Keychain or fetch secrets at runtime.OSStatus. Every SecItemAdd, SecItemCopyMatching,
SecItemUpdate, and SecItemDelete path must handle success and expected
failures such as errSecDuplicateItem, errSecItemNotFound, and
errSecInteractionNotAllowed.LAContext.evaluatePolicy() as the only gate for a secret. Bind
protected secrets to keychain items with SecAccessControl, then let
keychain access trigger LocalAuthentication.kSecAttrAccessible or kSecAttrAccessControl explicitly when
adding keychain items.SecItem* work off the main actor. Use an actor or serial queue for
keychain access.kSecUseDataProtectionKeychain: true unless deliberately working with
legacy file-based keychain items.SharedSecret bytes as a symmetric key. Derive with HKDF
or X9.63 derivation.Insecure.MD5 or Insecure.SHA1 for security purposes.This skill owns client-side storage, cryptographic primitives, hardware-backed keys, and trust evaluation. Route adjacent work deliberately:
authentication for Sign in with Apple, passkeys, OAuth UI flows,
ASAuthorizationController, credential state, and account sign-in UX.cryptokit for primitive CryptoKit API syntax and examples when storage,
key lifecycle, protocol/trust design, Secure Enclave policy, certificate
trust, misuse review, or compliance is not part of the task.device-integrity for DeviceCheck and App Attest attestation/assertion
flows.ios-networking for URLSession, request pipelines, ATS configuration,
retries, caching, reachability, and transport architecture.app-store-review for privacy manifests, ATT, App Review guideline
compliance, and submission readiness.This skill may mention those areas only to identify a security handoff.
Use this checklist for code reviews and migration plans. Mark each item pass, fail, or not applicable; for each failure, cite the reference file and severity.
UserDefaults, plists, source, logs, files, or
archives.SecItem* call checks OSStatus and handles common recoverable errors.SecAccessControl, not a
standalone Bool from LAContext.evaluatePolicy().kSecClass matches the item type and primary-key attributes.dataRepresentation, and designs for device-bound keys.SecTrust APIs, validates hostname/policy, and
uses SPKI or CA pinning when pinning is required.errSecItemNotFound handling.kSecAttrAccessibleWhenUnlocked implicitly by omitting the attribute.kSecAttrAccessibleAlways or
kSecAttrAccessibleAlwaysThisDeviceOnly, both deprecated.kSecAttrAccessible and kSecAttrAccessControl on the same add query.OSStatus handling and explicit accessibility in
examples.## Reference Files and
list the loaded references with a one-line purpose.kSecClass selection, primary keys, certificates, identities.SecAccessControl, background access, data protection.LAContext, enrollment-change handling.NSPinnedDomains, client certificates.npx claudepluginhub dpearson2699/swift-ios-skills --plugin all-ios-skillsProvides Swift-native cryptographic primitives from Apple CryptoKit: hashing (SHA-2, SHA-3), HMAC, symmetric encryption (AES-GCM, ChaChaPoly), public-key signing, key agreement, HPKE, and Secure Enclave keys.
Provides expert guidance on mobile app security: certificate pinning, Keychain/KeyStore storage, ProGuard/R8 obfuscation, root/jailbreak detection, biometrics, secure IPC, App Transport Security. Use for hardening iOS/Android apps.
Implements secure mobile coding practices for input validation, WebView security, secure data storage like Keychain/Keystore, and mobile authentication patterns.