device-integrity — Claude Code skill: what it does, how to install
Helps integrate Apple DeviceCheck and App Attest into iOS apps, verifying device authenticity and protecting server APIs from fraud.
npx skills add dpearson2699/swift-ios-skills --skill device-integrity -a claude-codeWhat device-integrity does
The skill outlines code patterns for Apple device verification APIs. It shows how to generate ephemeral single-use tokens via DCDevice on iOS 11+ and manage two persistent server-side bits that survive app reinstalls.
It also details the three-stage DCAppAttestService flow on iOS 14+. The instructions cover generating hardware-backed key pairs in Secure Enclave, persisting the account-scoped keyId in Keychain, and issuing signed assertions for API calls.
App Attest fails on simulators and ignores most app extensions outside of Action or SSO. Because of this limitation, your client must prepare fallback risk checks for unsupported testing environments.
What it helps with
- verify legitimate iOS app instances and hardware on the server
- persist fraud flags across application reinstalls using two device bits
- generate and store App Attest hardware keys in Secure Enclave
- sign sensitive server endpoints using cryptographic assertions
Example prompts for the agent
- Show how to generate an ephemeral DCDevice token in Swift
- Create an App Attest key manager that stores keyId in Keychain
- Implement client-side assertion generation for sensitive API requests
How to install device-integrity
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill device-integrity -a claude-code2Manually: put the files in place
~/.claude/skills/device-integrity/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/device-integrity/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill device-integrity -a codex2Manually: put the files in place
.agents/skills/device-integrity/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill device-integrity -a cursor2Manually: put the files in place
.cursor/skills/device-integrity/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills device-integrity2Manually: put the files in place
.github/skills/device-integrity/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill device-integrity -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/device-integrityManually: put the files in place
.devin/skills/device-integrity/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill device-integrity -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 device-integrity
How to install device-integrity in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill device-integrity -a claude-code in your terminal.
What is the difference between DeviceCheck and App Attest?
DeviceCheck uses DCDevice to manage two persistent binary flags per device via Apple servers. App Attest uses Secure Enclave keys on iOS 14+ to sign individual requests with cryptographic assertions.
Does App Attest work inside Xcode simulators?
No, DCAppAttestService is not supported on simulators or all physical hardware models. The skill recommends falling back to alternate risk checks when isSupported evaluates to false.