swift-security

Secures client-side Apple platform data with Keychain, biometrics, and CryptoKit.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/onymchat/onym-ios --skill swift-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-security
Source: https://github.com/onymchat/onym-ios/tree/main/.claude/skills/swift-security
Command: npx skills add https://github.com/onymchat/onym-ios --skill swift-security

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides authoritative guidance for implementing secure client-side Apple platform security using Keychain, biometric controls, and CryptoKit, helping developers avoid common AI-generated anti-patterns.

Core Features & Use Cases

It covers keychain item classes, ACLs, biometric binding with SecAccessControl, Secure Enclave-backed keys, CryptoKit symmetric and asymmetric operations, and certificate trust patterns, with real-world usage examples for credential storage, authentication, and device-bound secrets.

Quick Start

Store a biometric-protected secret in Keychain using SecAccessControl with biometryCurrentSet, then retrieve it via SecItemCopyMatching.

Frequently Asked Questions about swift-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I store a biometric-protected secret in Keychain using Swift?

Store a biometric-protected secret in Keychain by configuring SecAccessControl with biometryCurrentSet, then retrieve it via SecItemCopyMatching to ensure the secret is bound to the current biometric state.

What are common LAContext risks when implementing iOS biometric authentication?

LAContext risks often involve fallback authentication loopholes and failing to bind the cryptographic operations directly to Secure Enclave-backed keys, which this Skill's security patterns help avoid in production apps.

How does CryptoKit handle symmetric and asymmetric operations on Apple platforms?

CryptoKit handles symmetric and asymmetric operations by providing native Swift APIs for secure hashing, key agreement, and certificate trust patterns, enabling robust client-side cryptographic operations on iOS and macOS.

Can I use Secure Enclave-backed keys for device-bound secrets in macOS?

Yes, you can use Secure Enclave-backed keys for device-bound secrets across Apple platforms, ensuring that private cryptographic keys are generated and used exclusively within the dedicated hardware enclave.

Does this guidance cover post-quantum cryptography patterns for iOS 26+?

Yes, this guidance covers post-quantum cryptography patterns for iOS 26+, providing reference checklists and migration paths to help developers transition their client-side security implementations.

What is the best way to avoid AI-generated security anti-patterns in Swift?

The best way to avoid AI-generated security anti-patterns is to follow authoritative guidance for Keychain operations, SecAccessControl, and Secure Enclave usage, ensuring compliance with Apple platform security standards.