/scandit-sdk:id-capture-kmpfrom scandit-sdk
Integrates Scandit ID Capture in Kotlin Multiplatform / Compose Multiplatform projects. Scans passports, driver's licenses, ID cards via MRZ, VIZ, PDF417, or mobile documents. Handles configuration, CapturedId results, rejection rules, AAMVA verification, and anonymization.
Ships in scandit-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Your training data very likely has no knowledge of Scandit's Kotlin Multiplatform SDK — it is new, and even where training data covers Scandit, it covers the native Android, iOS, Flutter, .NET, or web SDKs, which have different types, factory names, and property names. Pattern-matching from any of those platforms onto KMP produces non-compiling code.
Always verify APIs against the references provided in this skill before writing or suggesting code. The most common sources of wrong code:
com.kmp.datacapture.* (com.kmp.datacapture.core.*, com.kmp.datacapture.id.*), not com.scandit.datacapture.* (native Android/iOS namespace). The Gradle/Maven coordinates are com.scandit.datacapture.kmp:<artifact>:<version> — a different string from the Kotlin package. Do not conflate the two.IdCapture.forContext(dataCaptureContext, settings). This is not the native Android IdCapture.forDataCaptureContext(...), not the iOS IdCapture(context:settings:) initializer, and not .NET's IdCapture.Create(...).IdCaptureSettings.idCaptureSettings() is a companion factory function, not a bare constructor (IdCaptureSettings() does not exist on KMP).settings.scannerType (an IdCaptureScanner), not settings.scanner (native Android's name). Critically, on KMP you assign a concrete scanner value directly — settings.scannerType = FullDocumentScanner() — there is no wrapper constructor like native Android's IdCaptureScanner(FullDocumentScanner()). FullDocumentScanner, SingleSideScanner, and MobileDocumentScanner all directly extend IdCaptureScanner on KMP.scannerType holds exactly one scanner value. Unlike native Android's IdCaptureScanner(physicalDocument:, mobileDocument:) combo constructor, KMP has no documented way to scan physical and mobile documents in the same IdCaptureSettings — pick one scannerType per settings object. If a user asks for both simultaneously, say this is not available on KMP rather than inventing a combined constructor.SingleSideScanner has a 4th parameter on KMP — SingleSideScanner(barcode: Boolean, machineReadableZone: Boolean, visualInspectionZone: Boolean, freeFormText: Boolean = false). The freeFormText parameter is KMP-specific.capturedId.sexType (a Sex enum: FEMALE / MALE / UNSPECIFIED), not capturedId.sex. Zone results are capturedId.mrz / .viz / .barcode / .mobileDocument / .mobileDocumentOcr — never mrzResult/vizResult/barcodeResult.AamvaBarcodeVerifier, no DataConsistencyVerifier, no dedicated "voided result" type. Set settings.rejectForgedAamvaBarcodes / rejectInconsistentData / rejectVoidedIds and read capturedId.verificationResult (for AAMVA/consistency) or the RejectionReason.DOCUMENT_VOIDED case (for voided detection).id-aamva-barcode-verification, id-europe-driving-license, and id-voided-detection are pure Gradle/SPM dependency containers that unlock native functionality gated behind IdCaptureSettings flags already in the base id module. Do not invent imports like com.kmp.datacapture.idAamvaBarcodeVerification.SomeClass — there is nothing to import from them.IdCaptureOverlay.withIdCapture(idCapture) / IdCaptureOverlay.withIdCaptureForView(idCapture, view). Not .newInstance(...) (native Android) and not a constructor.UPPER_SNAKE_CASE throughout: IdCaptureRegion.ANY, RejectionReason.DOCUMENT_EXPIRED, IdAnonymizationMode.FIELDS_AND_IMAGES, IdLayoutStyle.ROUNDED — never Swift-style .any / .documentExpired.| Do NOT write | Use instead |
|---|---|
IdCapture.forDataCaptureContext(context, settings) (native Android) / IdCapture(context:settings:) (iOS) / IdCapture.Create(...) (.NET) | IdCapture.forContext(dataCaptureContext, settings) |
IdCaptureSettings() (bare constructor) | IdCaptureSettings.idCaptureSettings() |
settings.scanner = IdCaptureScanner(FullDocumentScanner()) (native Android wrapper style) | settings.scannerType = FullDocumentScanner() |
settings.scanner = IdCaptureScanner(physicalDocument = ..., mobileDocument = ...) (combined scanner) | Not available on KMP — pick one scannerType value |
IdCaptureOverlay.newInstance(idCapture, dataCaptureView) (native Android) | IdCaptureOverlay.withIdCaptureForView(idCapture, dataCaptureView) or IdCaptureOverlay.withIdCapture(idCapture) |
capturedId.sex | capturedId.sexType (a Sex enum) |
capturedId.mrzResult / .vizResult / .barcodeResult | capturedId.mrz / .viz / .barcode |
AamvaBarcodeVerifier(...) / DataConsistencyVerifier(...) | settings.rejectForgedAamvaBarcodes / settings.rejectInconsistentData, then read capturedId.verificationResult |
import com.kmp.datacapture.idAamvaBarcodeVerification.* or similarly named add-on imports | Nothing to import — add the Gradle/SPM dependency only, then use the base-module IdCaptureSettings flags |
IdCaptureRegion.Any / .us / RejectionReason.documentExpired (camelCase) | IdCaptureRegion.ANY / IdCaptureRegion.US / RejectionReason.DOCUMENT_EXPIRED |
DataCaptureContext.forLicenseKey(key) as the primary pattern | DataCaptureContext.initialize("...") (the pattern used by the official KMP samples; forLicenseKey also exists but is not the canonical sample form) |
com.scandit.datacapture.id.* imports | com.kmp.datacapture.id.* (Kotlin package differs from the Maven group) |
commonMain. DataCaptureContext, IdCaptureSettings, IdCapture, IdCaptureListener, and the DataCaptureView setup all live in a shared ScreenModel/view-model class in commonMain. Only the thin hosting code (embedding the native view, driving lifecycle events) differs between androidApp and iosApp.acceptedDocuments are rejected with RejectionReason.NOT_ACCEPTED_DOCUMENT_TYPE.FullDocumentScanner() for both sides/all zones, SingleSideScanner(...) for a specific zone, MobileDocumentScanner(...) for mDL/ISO 18013-5. See references/integration.md.onIdRejected, not just onIdCaptured. Give the user a distinct message per RejectionReason.StateFlow/ScreenModel pattern shown in references/integration.md, the same way the official samples do, rather than mutating UI state directly from the callback.id artifact — the add-on module exists purely to link the native detection library; the Kotlin API is entirely on the base IdCaptureSettings/CapturedId. Forgetting the add-on dependency means the settings flag has no effect at runtime.Scandit/datacapture-kmp-spm) — pick one variant that includes id (and any add-ons you use); an app can only link one Scandit KMP Kotlin framework.Based on the user's request, load references/integration.md and follow it. It covers:
DataCaptureContext → IdCaptureSettings → IdCapture → DataCaptureView/IdCaptureOverlay → Android/iOS hosting)CapturedId) and rejection (RejectionReason)id-aamva-barcode-verification add-on)id-europe-driving-license add-on)id-voided-detection add-on)IdCaptureView composable (the id-compose module)This is an integration-only skill — there is no separate migration guide because the KMP SDK has no prior major version to migrate from.
Only use APIs that are explicitly documented in the Scandit references below or verified in references/integration.md. Do not invent or guess method signatures, parameters, or property names. If unsure whether an API exists or how to call it — or if a compile error occurs — fetch the relevant documentation page before responding. Do not tell the user to check the docs themselves. After answering, always include the relevant link so the user can explore further.
Never construct or guess documentation URLs. When you need a specific class or property's API page:
URL structures vary and guessing will lead to 404s.
Scanning needs a Scandit licence key. For this skill the licence product is native and the licence platforms are ios and android.
Work through these in order — never block the user on MCP:
The Scandit MCP server is connected — call ensure_scanner_setup with product native and platforms ios and android, app_identifier (the app's bundle or application id; for web, its production domain, never localhost) and env_var SCANDIT_LICENSE_KEY. Do not run the command it returns. Then call get_license_key with the key's id, from that result or from list_license_keys; if list_license_keys shows the key is not a trial, ask the user before fetching it. Show at most a masked preview in chat; never print a full key.
It is not connected — tell the user once that they can connect the remote Scandit MCP server, https://ssl.scandit.com/mcp, in their MCP client, then continue from step 1. Do not edit MCP client configuration yourself.
Authentication is browser-based, so it is not supported headless or in CI. The server provisions trial keys only; it never creates, revokes, or modifies production licences.
The user declines, or has no MCP client — they generate a key themselves at https://ssl.scandit.com (no account yet: https://ssl.scandit.com/dashboard/sign-up?p=test) and paste it in.
Then put the key into the code: write it into the licence-key call in place of the placeholder — the key get_license_key returned, or the one the user pastes or gives you — still showing only a masked preview in chat. Do not search the project, its files or the environment for a key.
| Topic | Resource |
|---|---|
| ID Capture overview (KMP) | Intro |
| Get Started (KMP) | Get Started |
| Full integration guide | references/integration.md |
| Advanced (scanner modes, verification, Compose) | Advanced Configurations |
| Supported documents | Supported Documents |
| Core concepts (context, camera, views, Compose) | Core Concepts |
Covers the KMP ID Capture surface as of 8.6, the release it shipped in (all classes below are
annotated kmp=8.6 in the SDK docs). Later versions add to this surface rather than replacing it —
check the linked reference pages for anything not listed here.
IdCapture — IdCapture.forContext(dataCaptureContext: DataCaptureContext?, settings: IdCaptureSettings): IdCapture; isEnabled: Boolean; dataCaptureContext: DataCaptureContext? (read-only); feedback: IdCaptureFeedback; externalTransactionId: String?; addListener(listener) / removeListener(listener); applySettings(settings); reset(); static createRecommendedCameraSettings(): CameraSettings.IdCaptureSettings — factory IdCaptureSettings.idCaptureSettings(); properties scannerType: IdCaptureScanner, acceptedDocuments / rejectedDocuments: List<IdCaptureDocument>, rejectExpiredIds, rejectIdsExpiringIn: Duration?, rejectVoidedIds, rejectHolderBelowAge: Int?, rejectionTimeoutSeconds: Int, rejectNotRealIdCompliant, rejectForgedAamvaBarcodes, rejectInconsistentData, decodeBackOfEuropeanDrivingLicense, anonymizationMode: IdAnonymizationMode, anonymizeDefaultFields; methods setShouldPassImageTypeToResult(type, value) / getShouldPassImageTypeToResult(type), addAnonymizedField(document, fieldType) / removeAnonymizedField(...) / clearAnonymizedFields().IdCaptureScanner — base type of the three scanner classes. FullDocumentScanner() — no parameters, both sides/all zones. SingleSideScanner(barcode: Boolean = true, machineReadableZone: Boolean = true, visualInspectionZone: Boolean = true, freeFormText: Boolean = false). MobileDocumentScanner(iso180135: Boolean = false, ocr: Boolean = false, elementsToRetain: Set<MobileDocumentDataElement> = emptySet()) (or MobileDocumentScanner.mobileDocumentScanner()).IdCaptureDocument, each takes a single region: IdCaptureRegion): IdCard, DriverLicense, Passport, VisaIcao, VisaLetter, ResidencePermit, HealthInsuranceCard; RegionSpecific(subtype: RegionSpecificSubtype).IdCaptureRegion enum — ANY, EU_AND_SCHENGEN, and ~250 region values (US, UK, UAE, …), all UPPER_SNAKE_CASE.IdCaptureListener — onIdCaptured(mode: IdCapture, id: CapturedId), onIdRejected(mode: IdCapture, id: CapturedId?, reason: RejectionReason).CapturedId — fullName / firstName / lastName (String?), sexType (Sex), dateOfBirth / dateOfExpiry / dateOfIssue (DateResult?), nationality, address, age (Int?), isExpired: Boolean?, document (IdCaptureDocument?), issuingCountry (IdCaptureRegion), documentNumber / documentAdditionalNumber, usRealIdStatus, isCitizenPassport, viz / mrz / barcode / mobileDocument / mobileDocumentOcr, images (IdImages), verificationResult (VerificationResult?), anonymizedFields (Set<IdFieldType>) / isAnonymized(field), plus isIdCard() / isDriverLicense() / isPassport() / isVisaIcao() / isVisaLetter() / isResidencePermit() / isHealthInsuranceCard() / isRegionSpecific(subtype).DateResult — day: Int?, month: Int?, year: Int.IdImages — face: CapturedImage? (property), frame: CapturedImage? (property, side-agnostic) and frame(side: IdSide): CapturedImage? (function, per-side), croppedDocument(side: IdSide): CapturedImage?.VerificationResult — dataConsistency: DataConsistencyResult?, aamvaBarcodeVerification: AamvaBarcodeVerificationResult?.DataConsistencyResult — allChecksPassed: Boolean, passedChecks / skippedChecks / failedChecks: Set<DataConsistencyCheck>, frontReviewImage: CapturedImage?.AamvaBarcodeVerificationResult — allChecksPassed: Boolean, status: AamvaBarcodeVerificationStatus (AUTHENTIC / LIKELY_FORGED / FORGED).IdCaptureOverlay — IdCaptureOverlay.withIdCapture(idCapture) / .withIdCaptureForView(idCapture, view); idLayoutStyle (IdLayoutStyle: ROUNDED default / SQUARE), idLayoutLineStyle (IdLayoutLineStyle: LIGHT default / BOLD), textHintPosition (TextHintPosition: ABOVE_VIEWFINDER / BELOW_VIEWFINDER), showTextHints, setFrontSideTextHint(text) / setBackSideTextHint(text), capturedBrush / localizedBrush / rejectedBrush (Brush).IdCaptureFeedback — IdCaptureFeedback(); idCaptured / idRejected (Feedback); static defaultFeedback().DataCaptureContext — DataCaptureContext.initialize(licenseKey, ...) (also forLicenseKey(...) and related overloads); setFrameSource(frameSource); addMode(mode) / removeMode(mode) / removeCurrentMode() / removeAllModes(); static sharedInstance.Camera — Camera.getDefaultCamera(settings: CameraSettings): Camera? (nullable — no camera on some devices); switchToDesiredState(FrameSourceState.ON / OFF, callback).DataCaptureView — hosted per-platform; expose it to the UI layer via the toAndroidView() / toUIView() extension functions shown in references/integration.md; addOverlay(overlay); logoStyle (LogoStyle).RejectionReason enum — NOT_ACCEPTED_DOCUMENT_TYPE, INVALID_FORMAT, DOCUMENT_VOIDED, TIMEOUT, SINGLE_IMAGE_NOT_RECOGNIZED, DOCUMENT_EXPIRED, DOCUMENT_EXPIRES_SOON, NOT_REAL_ID_COMPLIANT, HOLDER_UNDERAGE, FORGED_AAMVA_BARCODE, INCONSISTENT_DATA, BLUETOOTH_COMMUNICATION_ERROR, BLUETOOTH_UNAVAILABLE, CLOUD_REQUEST_FAILED.IdAnonymizationMode enum — NONE, FIELDS_ONLY (default), IMAGES_ONLY, FIELDS_AND_IMAGES.IdImageType enum — FACE, CROPPED_DOCUMENT, FRAME. IdSide enum — FRONT, BACK. Sex enum — FEMALE, MALE, UNSPECIFIED.id-compose module) — @Composable IdCaptureView(settings, modifier, overlayStyle, onCapture, onReject, ...). See references/integration.md for details.nfc/nfc-scanner.rst and nfc/nfc-result.rst do not include kmp in their platform list).IdCaptureException, LocalizedOnlyId, PhysicalDocumentScanner (the standalone base-class page, distinct from the concrete scanners covered above), and the deserialization API (IdCaptureDeserializer / IdCaptureDeserializerListener) — none apply to KMP per the SDK documentation's platform filters.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
87 skills in this plugin
/barcode-capture-androidScandit Barcode Capture (`BarcodeCapture`) in native Android (Kotlin/Java) projects — the low-level, full-control single-barcode scanning mode (BarcodeCapture + DataCaptureView + overlay), without the pre-built SparkScan UI. Use for integration, symbology and scan settings, result handling, overlay customization, SDK version migration (v6→v7→v8), replacing third-party scanners (ZXing, ML Kit), or troubleshooting./barcode-capture-capacitorCapacitor — Scandit Barcode Capture (`BarcodeCapture`) in Capacitor (Ionic) hybrid apps via the Scandit Capacitor plugins (`ScanditCaptureCorePlugin`), the low-level, full-control single-barcode scanning mode (BarcodeCapture + DataCaptureView + BarcodeCaptureOverlay) without the pre-built SparkScan UI, not the browser-only web SDK. Use for integration, symbology settings, result handling, viewfinder and feedback customization, SDK version migration, replacing a third-party scanner (@capacitor-mlkit/barcode-scanning), or troubleshooting./barcode-capture-cordovaCordova — Scandit Barcode Capture (`BarcodeCapture`) in Apache Cordova hybrid apps via the `scandit-cordova-datacapture-*` plugins (global `window.Scandit`), the low-level, full-control single-barcode scanning mode (BarcodeCapture + DataCaptureView + BarcodeCaptureOverlay) without the pre-built SparkScan UI, not the browser-only web SDK. Use for integration, scan settings, result handling, overlay wiring, SDK version migration, replacing a third-party scanner (phonegap-plugin-barcodescanner), or troubleshooting./barcode-capture-flutterScandit Barcode Capture (`BarcodeCapture`) in Flutter (Dart) projects — the low-level, full-control single-barcode scanning mode (BarcodeCapture + DataCaptureView + BarcodeCaptureOverlay), without the pre-built SparkScan UI. Use for integration, scan settings, result handling, overlay customization, SDK version migration, replacing a third-party scanner (mobile_scanner, ML Kit), or troubleshooting./barcode-capture-iosScandit Barcode Capture (`BarcodeCapture`) in native iOS (Swift) projects — the low-level, full-control single-barcode scanning mode (BarcodeCapture + DataCaptureView + overlay), without the pre-built SparkScan UI. Use for integration, scan settings, result handling, overlay customization, SDK version migration (v6→v7→v8), replacing a third-party barcode scanner, or troubleshooting./barcode-capture-kmpScandit Barcode Capture (`BarcodeCapture`) in Kotlin Multiplatform (KMP) and Compose Multiplatform projects using Scandit's KMP SDK (`com.kmp.datacapture.*` imports) — the low-level, full-control single-barcode scanning mode without the pre-built SparkScan UI. Use for integration, scan settings, shared-code result handling, overlay and viewfinder customization, or troubleshooting.npx claudepluginhub scandit/skills --plugin scandit-sdkOther plugins' skills for the same job