[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74XQD8G9F7F1FBSTT4ECQ2V":3,"skill-same:01M74XQD8G9F7F1FBSTT4ECQ2V":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M74XQD8G9F7F1FBSTT4ECQ2V","vision-barcode-cidetector-fallback",null,"`VNDetectBarcodesRequest` returns zero results for a perfectly valid, freshly generated QR\u002Fbarcode — decode returns `nil`, not a thrown error — and OSLog shows \"Could not create inference context\" or similar Vision ML context failures. Reproduces reliably on the iOS Simulator (Vision's barcode ML context often can't initialize there) and can also happen on device when the ML context is unavailable or the image is low-contrast, silently dropping scannable codes. Use when a Vision-based barcode\u002FQR decode test fails on the Simulator while the QR generator clearly works, when you're writing barcode-decode tests that must run in CI, or when you want scan robustness (competitors get dinged for \"won't scan\") instead of a single point of failure.","abhijitbansal\u002Fclaude-skills","abhijitbansal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F271802621?v=4","01M74XA5M33XYNJ2D2TJDS7W9E","01M74XA5MQ8GMWJW10ZJ4V0NVG",1,"MIT","https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fios-dev\u002Fskills\u002Fvision-barcode-cidetector-fallback\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: vision-barcode-cidetector-fallback\ndescription: \"`VNDetectBarcodesRequest` returns zero results for a perfectly valid, freshly generated QR\u002Fbarcode — decode returns `nil`, not a thrown error — and OSLog shows \\\"Could not create inference context\\\" or similar Vision ML context failures. Reproduces reliably on the iOS Simulator (Vision's barcode ML context often can't initialize there) and can also happen on device when the ML context is unavailable or the image is low-contrast, silently dropping scannable codes. Use when a Vision-based barcode\u002FQR decode test fails on the Simulator while the QR generator clearly works, when you're writing barcode-decode tests that must run in CI, or when you want scan robustness (competitors get dinged for \\\"won't scan\\\") instead of a single point of failure.\"\n---\n\n# Vision Barcode Decode Fails on Simulator → CIDetector Fallback\n\n## Symptom\n\n- `VNDetectBarcodesRequest` returns an empty results array for a QR code\n  in a `CGImage` that was just generated in the same test and is visibly\n  valid. The decoder returns `nil` — it does not throw, so this looks like\n  \"no code found,\" not a crash.\n- OSLog\u002Fconsole shows something like `QR Vision detect failed: Could not\n  create inference context` — Vision's barcode ML inference context failed\n  to initialize.\n- Reproduces reliably on the **iOS Simulator**; the same failure mode could\n  also surface on a real device whenever the ML context is unavailable\n  (not reproduced on device here), silently dropping a code a human eye can\n  read fine.\n- Any unit\u002FUI test that generates a code then round-trips it through Vision\n  decode fails on CI (which runs on Simulator) even though the feature works\n  when a person tests it by hand on a phone.\n\n## Root cause\n\nVision's barcode detector depends on an ML inference context that the\nSimulator's software rendering path frequently fails to construct. This is\nan environment limitation, not a bug in the input image or in your request\nconfiguration — retrying the same `VNDetectBarcodesRequest` won't help.\nTreating a single detector as the whole decode pipeline means this one\ninitialization failure (observed on Simulator; possible on device if the ML\ncontext is unavailable) silently turns into \"this app can't scan codes.\"\n\n## Fix\n\nDon't rely on a single detector. Try Vision first — it's fast and accurate\non real hardware — then fall back to CoreImage's `CIDetector` QR reader,\nwhich initializes reliably on the Simulator. This is a pure upside: Vision\nstill runs first and wins on device; `CIDetector` only fires when Vision\ncomes back empty.\n\n**Scope: QR codes only.** `CIDetectorTypeQRCode` detects QR codes and\nnothing else, so this fallback does not cover 1D barcodes (EAN, UPC,\nCode 128, ...) or other 2D symbologies (Data Matrix, PDF417, Aztec). For\nthose there is no `CIDetector` equivalent; if Vision's barcode context is\nunavailable, options are `AVCaptureMetadataOutput` for live camera scanning\non device (it supports those symbologies via `metadataObjectTypes`), or\nskipping the round-trip test for that symbology on Simulator.\n\n```swift\n\u002F\u002F WRONG — single detector, silently drops codes when Vision's ML\n\u002F\u002F context fails to initialize (Simulator, or any time the ML context is unavailable)\nfunc decode(_ image: CGImage) -> URL? {\n    decodeWithVision(image)\n}\n```\n\n```swift\n\u002F\u002F CORRECT — Vision first, CIDetector fallback\nfunc decode(_ image: CGImage) -> URL? {\n    decodeWithVision(image) ?? decodeWithCoreImage(image)\n}\n\nprivate func decodeWithCoreImage(_ image: CGImage) -> URL? {\n    let ciImage = CIImage(cgImage: image)\n    guard let detector = CIDetector(\n        ofType: CIDetectorTypeQRCode,\n        context: nil,\n        options: [CIDetectorAccuracy: CIDetectorAccuracyHigh]\n    ) else { return nil }\n\n    for case let qr as CIQRCodeFeature in detector.features(in: ciImage) {\n        if let message = qr.messageString, let url = URL(string: message) {\n            return url\n        }\n    }\n    return nil\n}\n```\n\nKeep `decodeWithVision` and `decodeWithCoreImage` as pure, `nonisolated`\nfunctions over a `CGImage` — no actor hops, no UI — so both the Vision\ncallback path and CI test code can call the combined `decode(_:)` directly.\nLog which path answered (Vision vs. CIDetector) at debug level so a\nSimulator-only failure pattern is visible in test output instead of looking\nlike a flaky decode.\n\n## Evidence\n\n- Found writing barcode-decode tests for a scanning app's QR\u002FNFC tag flow:\n  a test that generates a QR then feeds it straight back into\n  `VNDetectBarcodesRequest` failed only on the iOS 26 Simulator, with OSLog\n  showing `Could not create inference context`. Adding the `CIDetector`\n  fallback made the same test pass on Simulator and left on-device behavior\n  unchanged (Vision still answers first there).\n\n## Related skills\n\n- `scan-capture-quality-gates` — a different failure stage: that skill\n  covers whether the *captured frame itself* is good enough to decode\n  (blur, auto-naming from OCR prose); this skill covers the *decoder*\n  failing on an otherwise-good frame. A soft blur gate reduces how often\n  you even need this fallback to fire.\n- `vision-layout-ocr-grounding` — a sibling Vision-pipeline concern, but\n  about text layout\u002Freading order for on-device AI grounding, not barcode\n  detection; both are examples of \"don't trust one Vision output path,\"\n  applied to different Vision request types.\n- `swift6-mainactor-compile-fixes` — keep `decodeWithVision`\u002F`decodeWithCoreImage`\n  `nonisolated` pure compute per that playbook, so the fallback chain can run\n  off-main from capture-delivery callbacks.\n","# Vision Barcode Decode Fails on Simulator → CIDetector Fallback\n\n## Symptom\n\n- `VNDetectBarcodesRequest` returns an empty results array for a QR code\n  in a `CGImage` that was just generated in the same test and is visibly\n  valid. The decoder returns `nil` — it does not throw, so this looks like\n  \"no code found,\" not a crash.\n- OSLog\u002Fconsole shows something like `QR Vision detect failed: Could not\n  create inference context` — Vision's barcode ML inference context failed\n  to initialize.\n- Reproduces reliably on the **iOS Simulator**; the same failure mode could\n  also surface on a real device whenever the ML context is unavailable\n  (not reproduced on device here), silently dropping a code a human eye can\n  read fine.\n- Any unit\u002FUI test that generates a code then round-trips it through Vision\n  decode fails on CI (which runs on Simulator) even though the feature works\n  when a person tests it by hand on a phone.\n\n## Root cause\n\nVision's barcode detector depends on an ML inference context that the\nSimulator's software rendering path frequently fails to construct. This is\nan environment limitation, not a bug in the input image or in your request\nconfiguration — retrying the same `VNDetectBarcodesRequest` won't help.\nTreating a single detector as the whole decode pipeline means this one\ninitialization failure (observed on Simulator; possible on device if the ML\ncontext is unavailable) silently turns into \"this app can't scan codes.\"\n\n## Fix\n\nDon't rely on a single detector. Try Vision first — it's fast and accurate\non real hardware — then fall back to CoreImage's `CIDetector` QR reader,\nwhich initializes reliably on the Simulator. This is a pure upside: Vision\nstill runs first and wins on device; `CIDetector` only fires when Vision\ncomes back empty.\n\n**Scope: QR codes only.** `CIDetectorTypeQRCode` detects QR codes and\nnothing else, so this fallback does not cover 1D barcodes (EAN, UPC,\nCode 128, ...) or other 2D symbologies (Data Matrix, PDF417, Aztec). For\nthose there is no `CIDetector` equivalent; if Vision's barcode context is\nunavailable, options are `AVCaptureMetadataOutput` for live camera scanning\non device (it supports those symbologies via `metadataObjectTypes`), or\nskipping the round-trip test for that symbology on Simulator.\n\n```swift\n\u002F\u002F WRONG — single detector, silently drops codes when Vision's ML\n\u002F\u002F context fails to initialize (Simulator, or any time the ML context is unavailable)\nfunc decode(_ image: CGImage) -> URL? {\n    decodeWithVision(image)\n}\n```\n\n```swift\n\u002F\u002F CORRECT — Vision first, CIDetector fallback\nfunc decode(_ image: CGImage) -> URL? {\n    decodeWithVision(image) ?? decodeWithCoreImage(image)\n}\n\nprivate func decodeWithCoreImage(_ image: CGImage) -> URL? {\n    let ciImage = CIImage(cgImage: image)\n    guard let detector = CIDetector(\n        ofType: CIDetectorTypeQRCode,\n        context: nil,\n        options: [CIDetectorAccuracy: CIDetectorAccuracyHigh]\n    ) else { return nil }\n\n    for case let qr as CIQRCodeFeature in detector.features(in: ciImage) {\n        if let message = qr.messageString, let url = URL(string: message) {\n            return url\n        }\n    }\n    return nil\n}\n```\n\nKeep `decodeWithVision` and `decodeWithCoreImage` as pure, `nonisolated`\nfunctions over a `CGImage` — no actor hops, no UI — so both the Vision\ncallback path and CI test code can call the combined `decode(_:)` directly.\nLog which path answered (Vision vs. CIDetector) at debug level so a\nSimulator-only failure pattern is visible in test output instead of looking\nlike a flaky decode.\n\n## Evidence\n\n- Found writing barcode-decode tests for a scanning app's QR\u002FNFC tag flow:\n  a test that generates a QR then feeds it straight back into\n  `VNDetectBarcodesRequest` failed only on the iOS 26 Simulator, with OSLog\n  showing `Could not create inference context`. Adding the `CIDetector`\n  fallback made the same test pass on Simulator and left on-device behavior\n  unchanged (Vision still answers first there).\n\n## Related skills\n\n- `scan-capture-quality-gates` — a different failure stage: that skill\n  covers whether the *captured frame itself* is good enough to decode\n  (blur, auto-naming from OCR prose); this skill covers the *decoder*\n  failing on an otherwise-good frame. A soft blur gate reduces how often\n  you even need this fallback to fire.\n- `vision-layout-ocr-grounding` — a sibling Vision-pipeline concern, but\n  about text layout\u002Freading order for on-device AI grounding, not barcode\n  detection; both are examples of \"don't trust one Vision output path,\"\n  applied to different Vision request types.\n- `swift6-mainactor-compile-fixes` — keep `decodeWithVision`\u002F`decodeWithCoreImage`\n  `nonisolated` pure compute per that playbook, so the fallback chain can run\n  off-main from capture-delivery callbacks.\n",{"name":5,"description":7},"main","153711dd9432743d97f0b33b080ada5798ea623c","plugins\u002Fios-dev\u002Fskills\u002Fvision-barcode-cidetector-fallback","https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills","https:\u002F\u002Fgithub.com\u002Fabhijitbansal","2026-11-07 12:59:51",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add abhijitbansal\u002Fclaude-skills --skill vision-barcode-cidetector-fallback",{"tool":35,"command":36},"bunx","bunx skills add abhijitbansal\u002Fclaude-skills --skill vision-barcode-cidetector-fallback",{"tool":38,"command":39},"pnpm","pnpm dlx skills add abhijitbansal\u002Fclaude-skills --skill vision-barcode-cidetector-fallback","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fios-dev\u002Fskills\u002Fvision-barcode-cidetector-fallback\u002FSKILL.md",true,[],[44,51,58,65,72,79],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M74XTV2V7GZM8FDBXQZZ74VX","second-wind","Orchestrate long unattended Claude Code runs across multiple repos with the wind CLI. Use when the user wants to run Claude Code overnight, resume sessions after the 5-hour usage limit, run Claude in many repos at once via tmux, or says \"set up second wind\", \"wind up\", \"overnight run\", \"resume after limit\", \"usage limit orchestrator\".","https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsecond-wind\u002Fskills\u002Fsecond-wind\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M74XTPGN1HDQSKGCZZX0AZPC","structured-output-adaptive-thinking-token-bloat","A Claude API call using output_config.format (json_schema structured outputs) with thinking:{type:\"adaptive\"} burns most of its output budget on thinking (observed ~21k of ~24k tokens) without improving JSON quality, making the run up to ~5x more expensive than the same call with thinking omitted — use when calling the Messages API with a json_schema output format for extraction, ranking, classification, or summarization tasks, or when a schema-constrained call's usage.output_tokens is far larger than the returned JSON.","https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprompt-craft\u002Fskills\u002Fstructured-output-adaptive-thinking-token-bloat\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M74XTKTRHAMC2JFHQ1P1E6GR","review","Apply a code-review lens to a diff, branch, or file — find correctness bugs, security issues, and quality problems, ranked by severity, with a concrete fix for each. Use when the user says \"review this\", \"review my diff\", \"check this PR\", \"look this over before I commit\", or \"is this safe\". Skip when the user wants the code written, not reviewed.","https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprompt-craft\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M74XTGGCW7GWDDHPEMJQC7Y1","refresh","Rebuild the prompt-craft command registry and usage profile, and print a summary of installed commands and your personalized recommendations. Use when you install or update plugins and want the advisor to pick them up immediately, or say \"refresh prompt-craft\", \"rebuild the command registry\".","https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprompt-craft\u002Fskills\u002Frefresh\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M74XTCNGNR4G19P3Z95KTHQJ","refactor","Apply a refactoring lens — restructure code without changing behavior, guarded by tests that pass before and after. Use when the user says \"refactor\", \"clean this up\", \"extract this\", \"simplify this\", \"reduce duplication\", or \"make this readable\" on existing working code. Skip when the change is meant to alter behavior (that's a feature or a fix).","https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprompt-craft\u002Fskills\u002Frefactor\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M74XT9FKXN3N106G7Q3X56XR","plan","Decompose a non-trivial task into an explicit, tracked plan with goals and per-step acceptance criteria before writing code. Use when the user says \"plan this\", \"break this down\", \"what's the plan\", or asks for a multi-step feature\u002Frefactor that touches more than one file. Pairs with plan mode. Skip for single-edit changes that need no decomposition.","https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprompt-craft\u002Fskills\u002Fplan\u002FSKILL.md",[],[]]