
Swift security expert
Guides agents through Keychain, biometric, CryptoKit and certificate pinning work on Apple
Swift security expert is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 40
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Swift security expert
This skill gives an AI coding agent a reference for client-side security on iOS, macOS and other Apple platforms. It covers reviewing existing code, migrating secrets out of UserDefaults or plists, and implementing new keychain storage, biometric gating, Secure Enclave keys and CryptoKit operations. Its guidance is organized as a decision tree that routes review, improvement and implementation tasks to the matching reference file.
The skill sets out core rules the agent should follow, such as always checking OSStatus return codes, binding biometric checks to keychain items rather than trusting a boolean from LAContext, and setting accessibility classes explicitly. It also includes a top-level review checklist, a catalogue of common anti-patterns with severity ratings, and a mapping to OWASP Mobile Top 10 and MASVS categories for compliance work.
The skill targets iOS 13 and later, with recommendations for iOS 17 and newer and notes on post-quantum APIs from iOS 26. It is focused on Apple frameworks and explicitly excludes server-side auth, App Transport Security configuration and third-party cryptography libraries. No scripts are included; the material is reference documentation the agent reads while working in Swift code.
When your agent uses it
Use when working with iOS/macOS Keychain Services (SecItem queries, kSecClass, OSStatus errors), biometric authentication (LAContext, Face ID, Touch ID), CryptoKit (AES-GCM, ChaChaPoly, ECDSA, ECDH, HPKE, ML-KEM), Secure Enclave, secure credential storage (OAuth tokens, API keys), certificate pinning (SecTrust, SPKI), keychain sharing across apps/extensions, migrating secrets from UserDefaults or plists, or OWASP MASVS/MASTG mobile compliance on Apple platforms.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 15 files (487 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the swift-security-expert plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add ivan-magda/swift-security-skill
/plugin install swift-security-expert@swift-security-skillOr copy only this skill to ~/.claude/skills/swift-security-expert:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivan-magda/swift-security-skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/swift-security-expert &&
cp -R "$tmp/swift-security-expert" ~/.claude/skills/swift-security-expert &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/swift-security-expert inside it instead.
Copy the skill folder to ~/.agents/skills/swift-security-expert to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivan-magda/swift-security-skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/swift-security-expert &&
cp -R "$tmp/swift-security-expert" ~/.agents/skills/swift-security-expert &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/swift-security-expert inside it instead.
Copy the skill folder to ~/.cursor/skills/swift-security-expert to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivan-magda/swift-security-skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/swift-security-expert &&
cp -R "$tmp/swift-security-expert" ~/.cursor/skills/swift-security-expert &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/swift-security-expert inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/ivan-magda/swift-security-skill.git --path swift-security-expertOr copy the folder to ~/.gemini/skills/swift-security-expert yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/swift-security-expert:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivan-magda/swift-security-skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/swift-security-expert &&
cp -R "$tmp/swift-security-expert" ~/.copilot/skills/swift-security-expert &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/swift-security-expert inside it instead.
Get the folder:
git clone --depth 1 https://github.com/ivan-magda/swift-security-skill.gitThen copy swift-security-skill/swift-security-expert into your agent's skills folder as swift-security-expert. Agents that support SKILL.md read one folder per skill.
What it does
- Keychain storage patterns
- Covers SecItem queries, item classes, accessibility choices and the add-or-update flow for storing credentials.
- Biometric authentication binding
- Explains how to gate secrets behind Face ID or Touch ID through keychain access control rather than a plain boolean check.
- CryptoKit guidance
- Summarizes hashing, AES-GCM, ChaChaPoly, ECDH, HKDF, HPKE and signing with version notes for each API.
- Secure Enclave keys
- Describes hardware-backed P256 keys, their persistence limits and simulator pitfalls.
- Certificate pinning reference
- Covers SecTrust evaluation, SPKI and CA pinning, NSPinnedDomains and client certificates for mutual TLS.
- Migration and review checklists
- Provides steps for moving secrets off UserDefaults and plists, plus a review checklist and OWASP mapping.
Good for
- Review my iOS app's keychain code for security problems
- Move OAuth tokens out of UserDefaults into the Keychain
- Add Face ID protection to a stored API key
- Share a keychain item between my app and its extension
- Encrypt data with AES-GCM using CryptoKit
- Pin a server's SPKI hash in my networking code
Swift security expert FAQ
What does Swift security expert need to run?
It has no scripts. It is a SKILL.md with reference files that the agent loads when working on Apple platform security code, and it targets Swift projects on iOS and macOS.
Which Apple versions does Swift security expert cover?
It sets iOS 13 as the minimum deployment target, recommends iOS 17+ patterns where applicable, and notes iOS 26 post-quantum APIs such as ML-KEM and ML-DSA.
What is out of scope?
It excludes App Transport Security, server-side authentication architecture, CloudKit encryption, code signing and third-party libraries like KeychainAccess or Valet.
Which license does Swift security expert use?
The skill is released under the MIT license.
How do I install Swift security expert in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/swift-security-expert to use it in all your projects, or to .claude/skills/swift-security-expert in one project. Or install the swift-security-expert plugin, which includes it: /plugin marketplace add ivan-magda/swift-security-skill, then /plugin install swift-security-expert@swift-security-skill.
Does Swift security expert run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Swift security expert?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Swift security expert?
The closest alternatives to Swift security expert are Axiom security, Axiom scan security privacy, Security review, Security and hardening and Apple intelligence.
Where this comes from
- Description: from the skill's own SKILL.md.




