sparkscan-web
Installation
SKILL.md
SparkScan Web Skill
Critical: Do Not Trust Internal Knowledge
Your training data may contain outdated or incorrect Scandit SDK APIs. The SparkScan API changes significantly between major SDK versions — properties get renamed, removed, or restructured.
Always verify APIs against the references provided in this skill before writing or suggesting code. Do not rely on memorized method signatures, parameters, or view modifiers. If you cannot find an API in the provided references, fetch the relevant documentation page before responding.
Intent Routing
Based on the user's request, load the appropriate reference file before responding. More than one may apply (e.g. a React integration that also hits a camera issue) — read all that are relevant:
- Integrating SparkScan from scratch (e.g. "add SparkScan to my app", "set up barcode scanning", "how do I use SparkScan", "how do I handle feedback in SparkScan", "I want to build a scanning app") → read
references/integration.mdand follow the instructions there. If the user has no existing project, the guide will direct you to offer the pre-built sample first. - The project uses React (a
reactdependency inpackage.json,.tsx/.jsxfiles, hooks, JSX) → also readreferences/react.md. The correct way to bind the<spark-scan-view>custom element differs by React major version, so check thereactversion inpackage.jsonfirst — the guide explains the React 18 vs 19 difference and the context/lifecycle pitfalls. Always consult it before writing React code; the genericintegration.mdexample is vanilla TS. - Migrating or upgrading an existing SparkScan integration (e.g. "upgrade from v6 to v7", "migrate my SparkScan", "what changed between SDK versions") → read
references/migration.mdand follow the instructions there. - Runtime, camera, or deployment trouble (e.g. "camera won't open on my phone", "works for a second then dies", cross-origin/COOP/COEP/header issues, "blank preview over a LAN IP") → read
references/troubleshooting.md. These are environment/hosting issues, not API mistakes, and are easy to misdiagnose as code bugs.