Agent skill
iOS Security
Standards for Keychain, Biometrics, and Data Protection.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/security-hoangnguyen0403-agent-skills-standar
Metadata
Additional technical details for this skill
- labels
-
ios security keychain encryption
- triggers
-
{ "files": [ "**/*.swift" ], "keywords": [ "SecItemAdd", "kSecClassGenericPassword", "LAContext", "LocalAuthentication" ] }
SKILL.md
iOS Security Standards
Priority: P0 (CRITICAL)
Implementation Guidelines
Key Storage
- Keychain: Use for sensitive tokens, passwords, and identifiers (UUIDs). Never store in
UserDefaults. - Valet: Use high-level wrappers like SwiftKeychainWrapper or Valet to avoid raw Security.framework C-APIs.
- Biometrics: Use
LocalAuthenticationfor FaceID/TouchID. Verify availability withcanEvaluatePolicy(_:error:)before evaluation.
Data Protection
- File Encryption: Use
Data.WritingOptions.completeFileProtectionwhen saving files to disk. - App Sandboxing: Respect the sandbox; do not attempt to access files outside of your container.
Network Security
- ATS: Don't disable App Transport Security (ATS) globally in
Info.plist. Use exceptions only if strictly necessary. - SSL Pinning: Use TrustKit or Alamofire pinning for backend-critical applications.
Anti-Patterns
- UserDefaults for Secrets:
**No Secrets in UserDefaults**: Use Keychain. - Ignoring LA Error Handles:
**Handle LAError**: Check for userCancel, authenticationFailed, etc. - Print Tokens:
**No logging of PII/Tokens**: Ensure logs are stripped in Release builds.
References
- Keychain & Biometrics Implementation
Related Topics
common/security-standards | architecture
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?