CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

cryptokit

Use Apple CryptoKit for Swift cryptographic primitives. Use when hashing with SHA-2 or SHA-3, generating HMACs, encrypting with AES-GCM or ChaChaPoly, signing with P256/P384/P521/Curve25519 or ML-DSA keys, performing ECDH, HPKE, ML-KEM, or X-Wing key exchange, using Secure Enclave CryptoKit keys, or migrating CommonCrypto code to CryptoKit.

Quality

90%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

The canonical home for this skill is dpearson2699/swift-ios-skills

SKILL.md
Quality
Evals
Security

Quality

Content

75%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A strong, well-organized reference body: executable code for every primitive, explicit DON'T/DO mistake patterns, a review checklist, and correctly delegated extended patterns in a single clearly signaled reference file. The main weaknesses are minor — a few non-self-contained snippets, scattered version-availability qualifiers, and a main file that is longer than a pure overview.

Suggestions

Make the HPKE snippet self-contained (define 'plaintext' and show the recipient's open() call) and replace the comment-only block in Common Mistake #3 with a concrete DON'T/DO code pair so every example is copy-paste runnable.

Consolidate the iOS/macOS availability matrix (core primitives 13+, HPKE 17+, SHA-3/ML-KEM/ML-DSA 26+) into one short table near the top instead of repeating version qualifiers throughout each section.

Consider moving the Post-Quantum CryptoKit section's API inventory into references/cryptokit-patterns.md alongside its existing post-quantum material, keeping only a brief availability-gated summary plus pointer in SKILL.md.

DimensionReasoningScore

Conciseness

The body is code-first and assumes competence — e.g., 'Compare CryptoKit digest values directly. Do not convert digests to strings' with no padding about what hashing is. Minor trims remain: iOS version qualifiers (13+/17+/26+) are scattered across sections rather than consolidated, and statements like 'P384 and P521 use the same API — substitute the curve name' partially duplicate the curve-selection table. This fits 'efficient; minor instances of over-explanation that could be trimmed' rather than the fully lean top anchor.

4 / 5

Actionability

Nearly all guidance is executable Swift — one-shot/incremental hashing, HMAC compute and constant-time verify via 'isValidAuthenticationCode', AES.GCM seal/open, ECDH with hkdfDerivedSymmetricKey, Secure Enclave key creation with 'guard SecureEnclave.isAvailable'. Minor gaps keep it below the copy-paste-ready top anchor: the HPKE snippet uses an undefined 'plaintext' variable, and Common Mistake #3 is a comment-only code block with no executable DON'T/DO example.

4 / 5

Workflow Clarity

Each task area is unambiguous, and the Review Checklist plus inline availability guards ('if #available(iOS 26.0, *)', 'guard SecureEnclave.isAvailable else') act as validation checkpoints for crypto code review. However, the content is a task-menu reference rather than a sequenced workflow — there are no explicit do→verify→fix feedback loops, so it matches 'most checkpoints present; minor validation gaps' rather than the anchor-5 pattern of explicit validation steps with error-recovery loops.

4 / 5

Progressive Disclosure

Structure is good: a Contents TOC, core primitive usage inline, and extended patterns (key serialization, Keychain storage, AES key wrapping, SealedBox anatomy, export compliance, performance) delegated to the real, verified one-level-deep references/cryptokit-patterns.md, signaled both inline ('See [references/cryptokit-patterns.md] for serialization examples') and in a References section. It falls short of the top anchor because SKILL.md itself runs ~490 lines — more than a concise overview — and sections like Post-Quantum CryptoKit arguably belong alongside the extended patterns in the reference file.

4 / 5

Total

16

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

An exemplary description: it states a concrete 'what', provides an explicit and comprehensive 'Use when' trigger clause covering every primitive the skill handles, and is unmistakably Apple-CryptoKit-specific. All four dimensions sit at the top anchor with no vagueness or padding.

DimensionReasoningScore

Specificity

The description enumerates concrete actions per primitive — 'hashing with SHA-2 or SHA-3, generating HMACs, encrypting with AES-GCM or ChaChaPoly, signing with P256/P384/P521/Curve25519 or ML-DSA keys, performing ECDH, HPKE, ML-KEM, or X-Wing key exchange' plus Secure Enclave use and CommonCrypto migration. This matches the anchor for multiple specific concrete actions with comprehensive coverage; score 4 would require noticeable gaps in coverage of the library's surface, which are absent.

5 / 5

Completeness

It explicitly answers 'what' ('Use Apple CryptoKit for Swift cryptographic primitives') and 'when' with a full 'Use when...' clause enumerating concrete trigger scenarios (hashing, HMAC, encryption, signing, key exchange, Secure Enclave, CommonCrypto migration). This is the anchor-5 pattern; score 4 would require the 'when' clause to be less explicit or specific, which it is not.

5 / 5

Trigger Term Quality

It contains the natural terms a Swift developer would actually say — 'hashing', 'HMAC', 'AES-GCM', 'P256', 'Curve25519', 'ECDH', 'HPKE', 'Secure Enclave', 'CommonCrypto' — including algorithm synonyms and the migration trigger 'migrating CommonCrypto code to CryptoKit'. Coverage is comprehensive with no common variation missing, matching the top anchor.

5 / 5

Distinctiveness Conflict Risk

The description is anchored to 'Apple CryptoKit' and 'Swift' with Apple-specific triggers ('Secure Enclave CryptoKit keys', 'migrating CommonCrypto code'), giving it a clear niche with distinct triggers and minimal conflict risk against generic cryptography or non-Apple crypto skills.

5 / 5

Total

20

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

dpearson2699/swift-ios-skills

Path

skills/cryptokit/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.