swift-security-expert
БесплатноБез исполняемых скриптовНе проверенUse when working with iOS/macOS Keychain Services (SecItem queries, kSecClass, OSStatus errors), biometric authentication (LAContext, Face ID, Touch ID)…
от ivan-magda★ 40 звёзд на GitHubОб этом скилле
Keychain & Security Expert Skill
Philosophy: Non-opinionated, correctness-focused. This skill provides facts, verified patterns, and Apple-documented best practices — not architecture mandates. It covers iOS 13+ as a minimum deployment target, with modern recommendations targeting iOS 17+ and forward-looking guidance through iOS 26 (post-quantum). Every code pattern is grounded in Apple documentation, DTS engineer posts (Quinn "The Eskimo!"), WWDC sessions, and OWASP MASTG — never from memory alone.
What this skill is: A reference for reviewing, improving, and implementing keychain operations, biometric authentication, CryptoKit cryptography, credential lifecycle management, certificate trust, and compliance mapping on Apple platforms.
What this skill is not: A networking guide, a server-side security reference, or an App Transport Security manual. TLS configuration, server certificate management, and backend auth architecture are out of scope except where they directly touch client-side keychain or trust APIs.
Decision Tree
Determine the user's intent, then follow the matching branch. If ambiguous, ask.
┌─────────────────────┐
│ What is the task? │
└─────────┬───────────┘
┌──────────────────┼──────────────────┐
▼ ▼ ▼
┌─────────┐ ┌───────────┐ ┌────────────┐
│ REVIEW │ │ IMPROVE │ │ IMPLEMENT │
│ │ │ │ │ │
│ Audit │ │ Migrate / │ │ Build from │
│ existing│ │ modernize │ │ scratch │
│ code │ │ existing │ │ │
└────┬────┘ └─────┬─────┘ └─────┬──────┘
│ │ │
▼ ▼ ▼
Run Top-Level Identify gap Identify which
Review Checklist (legacy store? domain(s) apply,
(§ below) against wrong API? load reference
the code. missing auth?) file(s), follow
Flag each item Load migration + ✅ patterns.
as ✅ / ❌ / domain-specific Implement with
⚠️ N/A. reference files. add-or-update,
For each ❌, Follow ✅ patterns, proper error
cite the verify with domain handling, and
reference file checklist. correct access
and specific control from
section. the start.
Branch 1 — REVIEW (Audit Existing Code)
Goal: Systematically evaluate existing keychain/security code for correctness, security, and compliance.
Procedure:
- Run the Top-Level Review Checklist (below) against the code under review. Score each item ✅ / ❌ / ⚠️ N/A.
- For each ❌ failure, load the cited reference file and locate the specific anti-pattern or correct pattern.
- Cross-check anti-patterns — scan code against all 10 entries in
common-anti-patterns.md. Pay special attention to:UserDefaultsfor secrets (#1), hardcoded keys (#2),LAContext.evaluatePolicy()as sole auth gate (#3), ignoredOSStatus(#4). - Check compliance — if the project requires OWASP MASVS or enterprise audit readiness, map findings to
compliance-owasp-mapping.mdcategories M1, M3, M9, M10. - Report format: For each finding, state: what's wrong → which reference file covers it → the ✅ correct pattern → severity (CRITICAL / HIGH / MEDIUM).
Key reference files for review:
- Start with:
common-anti-patterns.md(backbone — covers 10 most dangerous patterns) - Then domain-specific files based on what the code does
- Finish with:
compliance-owasp-mapping.md(if compliance is relevant)
Branch 2 — IMPROVE (Migrate / Modernize)
Goal: Upgrade existing code from insecure storage, deprecated APIs, or legacy patterns to current best practices.
Procedure:
Identify the migration type:
- Insecure storage → Keychain: Load
migration-legacy-stores.md+credential-storage-patterns.md - Legacy Security framework → CryptoKit: Load
cryptokit-symmetric.mdorcryptokit-public-key.md+migration-legacy-stores.md - RSA → Elliptic Curve: Load
cryptokit-public-key.md(RSA migration section) - GenericPassword → InternetPassword (AutoFill): Load
keychain-item-classes.md(migration section) - LAContext-only → Keychain-bound biometrics: Load
biometric-authentication.md - File-based keychain → Data protection keychain (macOS): Load
keychain-fundamentals.md(TN3137 section) - Single app → Shared keychain (extensions): Load
keychain-sharing.md - Leaf pinning → SPKI/CA pinning: Load
certificate-trust.md
- Insecure storage → Keychain: Load
Follow the migration pattern in the relevant reference f
Установить swift-security-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл swift-security-expert?
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.
Как установить скилл swift-security-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл swift-security-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic