cryptotokenkit — Claude Code skill: what it does, how to install
Guides smart card and driver extension integration using CryptoTokenKit in Swift 6.3 projects.
npx skills add dpearson2699/swift-ios-skills --skill cryptotokenkit -a claude-codeWhat cryptotokenkit does
The skill provides architecture guidance and code patterns for Apple's CryptoTokenKit framework. It covers building TKSmartCardTokenDriver extensions for macOS system login, sending APDU commands with TKSmartCard, and starting NFC smart card sessions on iOS 26+.
Driver extensions structure work across three parts: the driver entry point, the token object, and the session handling cryptographic operations. To register the extension on macOS, the host app requires a one-time launch under _securityagent.
Be aware that TKSmartCardSlotManager.default is optional and evaluates to nil unless smart card access is enabled. General Secure Enclave primitives and WebAuthn passkeys belong outside this skill.
What it helps with
- build macOS token driver extensions for system authentication
- communicate with contactless smart cards over NFC in iOS
- query token-backed keychain items using kSecAttrTokenID
- observe token insertion and removal with TKTokenWatcher
Example prompts for the agent
- Implement a TKSmartCardTokenDriver subclass and configure Info.plist for macOS.
- How do I start an NFC contactless smart card session with TKSmartCardSlotNFCSession?
- Write a Swift snippet to monitor token events using TKTokenWatcher.
How to install cryptotokenkit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill cryptotokenkit -a claude-code2Manually: put the files in place
~/.claude/skills/cryptotokenkit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cryptotokenkit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill cryptotokenkit -a codex2Manually: put the files in place
.agents/skills/cryptotokenkit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill cryptotokenkit -a cursor2Manually: put the files in place
.cursor/skills/cryptotokenkit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills cryptotokenkit2Manually: put the files in place
.github/skills/cryptotokenkit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill cryptotokenkit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/cryptotokenkitManually: put the files in place
.devin/skills/cryptotokenkit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill cryptotokenkit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cryptotokenkit
How to install cryptotokenkit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill cryptotokenkit -a claude-code in your terminal.
What does cryptotokenkit do?
It instructs your assistant on implementing smart card extensions, APDU sessions, and token-backed keychain items in Swift.
Why does TKSmartCardSlotManager.default return nil?
The manager is optional on Apple platforms and yields nil if smart card access or the required entitlement is not active.