[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74XK3MJMMMYT2CRHE4DHQ35":3,"skill-same:01M74XK3MJMMMYT2CRHE4DHQ35":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},"01M74XK3MJMMMYT2CRHE4DHQ35","ondevice-model-eval-harness-kill-criteria",null,"Picking an on-device\u002Fedge AI model by vendor or paper benchmarks is unreliable — published latency\u002Fquality numbers are vendor or blog claims, not measurements on your target hardware and data — and committing straight to integration engineering (runtime loader, container\u002Fasset delivery, UI wiring) on a paper-picked model risks discovering late that it underperforms, or is simply unusable for reasons unrelated to model quality (a broken inference library, an unloadable quantization, an incompatible processor). Use when adding an on-device or edge-deployed AI\u002FML model (VLM, speech, embedding, classifier) where multiple candidate models exist and integration cost is nontrivial — run the eval harness as its own gated phase before writing any integration code.","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\u002Fondevice-model-eval-harness-kill-criteria\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: ondevice-model-eval-harness-kill-criteria\ndescription: Picking an on-device\u002Fedge AI model by vendor or paper benchmarks is unreliable — published latency\u002Fquality numbers are vendor or blog claims, not measurements on your target hardware and data — and committing straight to integration engineering (runtime loader, container\u002Fasset delivery, UI wiring) on a paper-picked model risks discovering late that it underperforms, or is simply unusable for reasons unrelated to model quality (a broken inference library, an unloadable quantization, an incompatible processor). Use when adding an on-device or edge-deployed AI\u002FML model (VLM, speech, embedding, classifier) where multiple candidate models exist and integration cost is nontrivial — run the eval harness as its own gated phase before writing any integration code.\n---\n\n# On-Device AI Model Selection: Empirical Offline Eval Harness With Pre-Committed Kill Criteria\n\n## Symptom\n\nA model is picked by paper benchmarks or vendor claims, integration\nengineering begins (runtime loader, container\u002Fasset delivery, UI wiring —\nmulti-phase, expensive work), and only late in the process does it become\nclear the model underperforms on real data, or simply doesn't work for\nreasons that have nothing to do with model quality — a broken inference\nlibrary, an unloadable quantization, an incompatible processor. Sunk cost by\nthat point makes it hard to cut losses on a \"pretty good\" candidate.\n\n## Root cause\n\nPublished latency\u002Fquality numbers for on-device\u002Fedge models are vendor or\nblog claims, not measurements on your target hardware and data distribution\n— there is typically no published benchmark for your specific task (e.g.\nhousehold-object naming). Without a dedicated, gated evaluation phase run\n*before* integration, model selection either never gets re-measured against\nreality, or gets re-measured only after expensive integration work has\nalready been sunk into one candidate — at which point sunk-cost pressure\nbiases the decision toward keeping the already-integrated model rather than\nthe actually-best one.\n\n## Fix\n\nGate all integration engineering behind a standalone offline evaluation\nphase (Cubby called it M0):\n\n1. **Curate a small ground-truth set representative of real usage** plus an\n   existing baseline to beat (Cubby: 31 curated images with ground-truth\n   names, later scaled to 50-100; baseline = macOS Vision framework's\n   closed-set classifier).\n2. **Pre-commit kill criteria before running the harness, not after seeing\n   results** (Cubby: \"no candidate clearly beats Vision on ≥60% of eval\n   photos → stop the feature\"). Locking the bar first blocks motivated\n   reasoning \u002F sunk-cost creep once time has already gone into a \"pretty\n   good\" candidate.\n3. **Score every candidate on the same three axes**: hit-rate\u002Fquality\n   (blind-scored against the baseline, not self-graded by the model),\n   latency (tokens\u002Fs or seconds\u002Fimage on real hardware), and peak memory\n   (RSS) — never accuracy alone.\n4. **Produce a written, committed scorecard artifact** (Cubby:\n   `scripts\u002Fvlm-eval\u002Fresults\u002Fscorecard.md`), not just a verbal\u002Fchat\n   decision — makes the choice auditable and the harness reusable for the\n   next model generation or a re-eval.\n5. **Expect strong-on-paper candidates to be eliminated by broken tooling,\n   not model quality** — budget harness time for this. Cubby's M0: Qwen3-VL\n   had the better paper numbers but broken Python `mlx-vlm` inference\n   (instant-EOS\u002Frepetition loop) — eliminated pre-integration and cheaply,\n   instead of discovered mid-engine-build. A quantized variant was\n   unloadable; another candidate's processor was incompatible. Decision\n   recorded explicitly: \"Model = Qwen2-VL-2B (working everywhere today) over\n   Qwen3-VL (better paper numbers, broken Python inference) — empirical M0\n   rule followed.\"\n6. **Re-measure on the actual deployment target, not just the harness\n   machine.** Cubby's M0 ran on a Mac (M4 Pro) to pick a model cheaply; the\n   next phase (M1) re-measured the M0 winner's p50\u002Fp90 latency and memory\n   on-device, with its *own* separate pre-committed kill criterion (p90 >\n   3s or jetsam on target tier → try the next candidate once, then stop the\n   feature). Harness-machine numbers and on-device numbers are not\n   interchangeable.\n\nUse this for any app or service adding an on-device or edge-deployed AI\u002FML\nmodel (VLM, speech, embedding, classifier) where multiple candidate models\nexist and integration cost (runtime engine, delivery mechanism, UI) is\nnontrivial. Run the eval harness as its own gated phase *before* writing\nintegration code — treat it as a go\u002Fno-go and model-picking gate, not a\npost-hoc justification step for a model already chosen. Generalizes beyond\niOS\u002FMLX to any edge\u002Fon-device model-selection decision (Android, embedded,\nbrowser-side WASM models).\n\n## Evidence\n\nRoadmap doc (2026-07-07): \"Selection is empirical, not paper-driven. Nearly\nall iPhone latency numbers in this space are vendor or blog claims. Phase M0\nbuilds an offline evaluation harness (real Cubby-style item photos, blind A\u002FB\nagainst the Vision baseline) and picks the model by measured naming quality ×\nlatency × RSS on target hardware. Kill criteria are pre-committed.\" \u002F \"No\npublished Vision-vs-small-VLM benchmark for household-object naming exists —\nhence M0's harness... every number the plan depends on gets re-measured in\nM0\u002FM1.\" M0 table row: \"Offline eval harness (Mac): 50-100 representative item\nphotos... blind-score naming vs Vision baseline; measure tokens\u002Fs + peak RSS\nat 4-bit → Written scorecard picks ONE model (or kills the feature if none\nbeats Vision meaningfully).\"\n\nSession 0018: \"M0 eval run (`f0c6b34`, `6c3bd8a`): harness + 31-image curated\nCC set (ground-truth names) + macOS Vision baseline. Verdict: Qwen2-VL-2B-\nInstruct-4bit, 84% hit rate vs baseline 29% (avg 0.74 vs 0.23; 2.6 s\u002Fimg M4\nPro; 2.1 GB peak). Gemma-4-E2B = documented fallback (55%, 4× faster). Churn\nlog: Qwen3-VL broken in Python mlx-vlm (instant-EOS\u002Frepetition — stays a\nSwift-side candidate), OptiQ quant unloadable, SmolVLM processor\nincompatible; mlx-vlm pinned to git rev in pyproject.\" Decision log: \"Model =\nQwen2-VL-2B (working everywhere today) over Qwen3-VL (better paper numbers,\nbroken Python inference) — empirical M0 rule followed; Qwen3-VL re-eval noted\nfor the M1 device spike.\"\n\n## Related skills\n\nDistinct from — and upstream of — the implementation-phase skills from the\nsame Cubby VLM wave: once this skill's eval harness picks a model,\n`ml-actor-lazy-load-graded-eviction` (runtime loading\u002Feviction),\n`background-assets-manifest-drift-blind-redownload` (shipping the winner's\nweights), and `async-enrichment-silent-loss-outcome-states` (surfacing its\nresults) take over. Also related to the existing on-device-AI family:\n`ondevice-generable-anti-hallucination` and `vision-layout-ocr-grounding` are\nintegration-time lessons for an already-chosen model; this skill is the\nselection-methodology step upstream of both — cross-link, don't merge.\n","# On-Device AI Model Selection: Empirical Offline Eval Harness With Pre-Committed Kill Criteria\n\n## Symptom\n\nA model is picked by paper benchmarks or vendor claims, integration\nengineering begins (runtime loader, container\u002Fasset delivery, UI wiring —\nmulti-phase, expensive work), and only late in the process does it become\nclear the model underperforms on real data, or simply doesn't work for\nreasons that have nothing to do with model quality — a broken inference\nlibrary, an unloadable quantization, an incompatible processor. Sunk cost by\nthat point makes it hard to cut losses on a \"pretty good\" candidate.\n\n## Root cause\n\nPublished latency\u002Fquality numbers for on-device\u002Fedge models are vendor or\nblog claims, not measurements on your target hardware and data distribution\n— there is typically no published benchmark for your specific task (e.g.\nhousehold-object naming). Without a dedicated, gated evaluation phase run\n*before* integration, model selection either never gets re-measured against\nreality, or gets re-measured only after expensive integration work has\nalready been sunk into one candidate — at which point sunk-cost pressure\nbiases the decision toward keeping the already-integrated model rather than\nthe actually-best one.\n\n## Fix\n\nGate all integration engineering behind a standalone offline evaluation\nphase (Cubby called it M0):\n\n1. **Curate a small ground-truth set representative of real usage** plus an\n   existing baseline to beat (Cubby: 31 curated images with ground-truth\n   names, later scaled to 50-100; baseline = macOS Vision framework's\n   closed-set classifier).\n2. **Pre-commit kill criteria before running the harness, not after seeing\n   results** (Cubby: \"no candidate clearly beats Vision on ≥60% of eval\n   photos → stop the feature\"). Locking the bar first blocks motivated\n   reasoning \u002F sunk-cost creep once time has already gone into a \"pretty\n   good\" candidate.\n3. **Score every candidate on the same three axes**: hit-rate\u002Fquality\n   (blind-scored against the baseline, not self-graded by the model),\n   latency (tokens\u002Fs or seconds\u002Fimage on real hardware), and peak memory\n   (RSS) — never accuracy alone.\n4. **Produce a written, committed scorecard artifact** (Cubby:\n   `scripts\u002Fvlm-eval\u002Fresults\u002Fscorecard.md`), not just a verbal\u002Fchat\n   decision — makes the choice auditable and the harness reusable for the\n   next model generation or a re-eval.\n5. **Expect strong-on-paper candidates to be eliminated by broken tooling,\n   not model quality** — budget harness time for this. Cubby's M0: Qwen3-VL\n   had the better paper numbers but broken Python `mlx-vlm` inference\n   (instant-EOS\u002Frepetition loop) — eliminated pre-integration and cheaply,\n   instead of discovered mid-engine-build. A quantized variant was\n   unloadable; another candidate's processor was incompatible. Decision\n   recorded explicitly: \"Model = Qwen2-VL-2B (working everywhere today) over\n   Qwen3-VL (better paper numbers, broken Python inference) — empirical M0\n   rule followed.\"\n6. **Re-measure on the actual deployment target, not just the harness\n   machine.** Cubby's M0 ran on a Mac (M4 Pro) to pick a model cheaply; the\n   next phase (M1) re-measured the M0 winner's p50\u002Fp90 latency and memory\n   on-device, with its *own* separate pre-committed kill criterion (p90 >\n   3s or jetsam on target tier → try the next candidate once, then stop the\n   feature). Harness-machine numbers and on-device numbers are not\n   interchangeable.\n\nUse this for any app or service adding an on-device or edge-deployed AI\u002FML\nmodel (VLM, speech, embedding, classifier) where multiple candidate models\nexist and integration cost (runtime engine, delivery mechanism, UI) is\nnontrivial. Run the eval harness as its own gated phase *before* writing\nintegration code — treat it as a go\u002Fno-go and model-picking gate, not a\npost-hoc justification step for a model already chosen. Generalizes beyond\niOS\u002FMLX to any edge\u002Fon-device model-selection decision (Android, embedded,\nbrowser-side WASM models).\n\n## Evidence\n\nRoadmap doc (2026-07-07): \"Selection is empirical, not paper-driven. Nearly\nall iPhone latency numbers in this space are vendor or blog claims. Phase M0\nbuilds an offline evaluation harness (real Cubby-style item photos, blind A\u002FB\nagainst the Vision baseline) and picks the model by measured naming quality ×\nlatency × RSS on target hardware. Kill criteria are pre-committed.\" \u002F \"No\npublished Vision-vs-small-VLM benchmark for household-object naming exists —\nhence M0's harness... every number the plan depends on gets re-measured in\nM0\u002FM1.\" M0 table row: \"Offline eval harness (Mac): 50-100 representative item\nphotos... blind-score naming vs Vision baseline; measure tokens\u002Fs + peak RSS\nat 4-bit → Written scorecard picks ONE model (or kills the feature if none\nbeats Vision meaningfully).\"\n\nSession 0018: \"M0 eval run (`f0c6b34`, `6c3bd8a`): harness + 31-image curated\nCC set (ground-truth names) + macOS Vision baseline. Verdict: Qwen2-VL-2B-\nInstruct-4bit, 84% hit rate vs baseline 29% (avg 0.74 vs 0.23; 2.6 s\u002Fimg M4\nPro; 2.1 GB peak). Gemma-4-E2B = documented fallback (55%, 4× faster). Churn\nlog: Qwen3-VL broken in Python mlx-vlm (instant-EOS\u002Frepetition — stays a\nSwift-side candidate), OptiQ quant unloadable, SmolVLM processor\nincompatible; mlx-vlm pinned to git rev in pyproject.\" Decision log: \"Model =\nQwen2-VL-2B (working everywhere today) over Qwen3-VL (better paper numbers,\nbroken Python inference) — empirical M0 rule followed; Qwen3-VL re-eval noted\nfor the M1 device spike.\"\n\n## Related skills\n\nDistinct from — and upstream of — the implementation-phase skills from the\nsame Cubby VLM wave: once this skill's eval harness picks a model,\n`ml-actor-lazy-load-graded-eviction` (runtime loading\u002Feviction),\n`background-assets-manifest-drift-blind-redownload` (shipping the winner's\nweights), and `async-enrichment-silent-loss-outcome-states` (surfacing its\nresults) take over. Also related to the existing on-device-AI family:\n`ondevice-generable-anti-hallucination` and `vision-layout-ocr-grounding` are\nintegration-time lessons for an already-chosen model; this skill is the\nselection-methodology step upstream of both — cross-link, don't merge.\n",{"name":5,"description":7},"main","153711dd9432743d97f0b33b080ada5798ea623c","plugins\u002Fios-dev\u002Fskills\u002Fondevice-model-eval-harness-kill-criteria","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 ondevice-model-eval-harness-kill-criteria",{"tool":35,"command":36},"bunx","bunx skills add abhijitbansal\u002Fclaude-skills --skill ondevice-model-eval-harness-kill-criteria",{"tool":38,"command":39},"pnpm","pnpm dlx skills add abhijitbansal\u002Fclaude-skills --skill ondevice-model-eval-harness-kill-criteria","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fios-dev\u002Fskills\u002Fondevice-model-eval-harness-kill-criteria\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",[],[]]