[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74XR22K7P2ZV9R0FZ811ZXR":3,"skill-same:01M74XR22K7P2ZV9R0FZ811ZXR":49},{"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},"01M74XR22K7P2ZV9R0FZ811ZXR","widget-appgroup-snapshot-bridge",null,"Home-screen widget goes blank or stale — recents blanked after an iCloud-sync launch (\"No recent documents\" while the app has plenty), pre-lock titles\u002Fthumbnails still visible on the widget while App-Lock is engaged, thumbnails broken after reinstall or device restore, or the widget silently shows nothing because containerURL(forSecurityApplicationGroupIdentifier:) returned nil. Use when building or debugging a WidgetKit extension that shares state with its host app via an App Group (snapshot file, reloadAllTimelines, shared UserDefaults suite).","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\u002Fwidget-appgroup-snapshot-bridge\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: widget-appgroup-snapshot-bridge\ndescription: Home-screen widget goes blank or stale — recents blanked after an iCloud-sync launch (\"No recent documents\" while the app has plenty), pre-lock titles\u002Fthumbnails still visible on the widget while App-Lock is engaged, thumbnails broken after reinstall or device restore, or the widget silently shows nothing because containerURL(forSecurityApplicationGroupIdentifier:) returned nil. Use when building or debugging a WidgetKit extension that shares state with its host app via an App Group (snapshot file, reloadAllTimelines, shared UserDefaults suite).\n---\n\n# Widget ↔ App Bridge: One Codable Snapshot Over the App Group\n\n## Symptom\n\n- Widget shows \"No recent documents\" after a launch even though the app has\n  documents — classically the first launch after iCloud sync, when the local\n  store is transiently empty and the app overwrites the snapshot with nothing.\n- Widget still renders pre-lock content (titles, thumbnails) while App-Lock is\n  engaged — a stale pre-redaction snapshot on disk.\n- Thumbnails break after reinstall\u002Frestore — absolute file URLs were baked into\n  the snapshot and the container path changed.\n- Widget silently empty on one target: missing App Group entitlement makes\n  `containerURL(forSecurityApplicationGroupIdentifier:)` return `nil` with no\n  error (surfaces only at altool validate).\n- A Lock Screen\u002FStandBy widget renders blank while the device is locked — the\n  snapshot file's protection class blocks the widget process from reading it\n  (see the file-protection invariant under Fix).\n\n## Root cause\n\nA widget runs in a **separate process**. Its only channels to the app are the\nshared App Group container and `WidgetCenter.shared.reloadAllTimelines()`.\nNaive bridges fail in four repeatable ways: writing the snapshot on every model\nchange (so a transient-empty launch pass clobbers last-known-good); baking\nabsolute URLs (container paths differ per process\u002Finstall); non-atomic writes\n(widget reads a half-written file); and redaction decided ad hoc in two places\n(so a stale pre-redaction snapshot leaks). Every app re-derives this\narchitecture — this skill is the canonical shape.\n\n## Fix\n\nOne `Codable` DTO compiled into **both** targets; app-side atomic writer;\nwidget-side pure reader; relative paths only; backfill on launch.\n\nInvariants the implementation must hold:\n\n- **IDs are stable model IDs, never absolute URLs**; thumbnail paths stay\n  relative to the App Group container — absolute paths break after\n  reinstall\u002Frestore because the container path changes per install.\n- **Invariant A (writer): never clobber a good snapshot with a\n  transient-empty one.** On an iCloud-sync launch the local store is briefly\n  empty — if `documents` is empty but a snapshot with entries already exists\n  on disk, skip the write and let the post-settle backfill publish real state.\n- **Invariant B (writer + reader share one flag): the App-Lock redaction\n  decision has exactly one source of truth.** The writer mirrors App-Lock\n  state into the shared UserDefaults suite; the reader re-checks that SAME\n  flag on every load regardless of what's on disk, so a stale pre-redaction\n  snapshot can never render. Neither side invents its own redaction signal —\n  that's what causes double-redaction bugs.\n- Writes are atomic (`.atomic, .completeFileProtectionUntilFirstUserAuthentication`)\n  so the widget process never reads a half-written file. Do not use\n  `.completeFileProtectionUnlessOpen`: a Lock Screen\u002FStandBy widget cannot open\n  the file while the device is locked, so it renders blank while locked (see\n  Symptom). The trade-off: the snapshot holds real titles and thumbnail paths\n  on disk, protected only until the first unlock after boot. The writer does\n  not redact the file; redaction is applied at render time by the reader\n  (invariant B).\n\n**Read `references\u002Fsnapshot-bridge.md` before implementing** — the full\n`WidgetBridge` shared DTO, `WidgetSnapshotWriter` (app-side, the only writer),\nand `WidgetSnapshotReader` (widget-side, pure reader) implementing the\ninvariants above.\n\nCompleting the shape:\n\n- **Backfill on launch**: after the store settles (post iCloud first-sync),\n  call `publish` once — heals missing, stale, or version-bumped snapshots:\n  `await store.awaitInitialLoad(); WidgetSnapshotWriter.publish(...)`.\n- **Resolve relative paths at read time**:\n  `WidgetBridge.containerURL?.appendingPathComponent(entry.thumbnailRelativePath)`.\n- **Version the filename** (`-v1`) so a DTO change reads as \"no snapshot\" (then\n  backfill heals it) instead of a decode crash in the widget process.\n- **Entitlement parity**: every target that compiles `WidgetBridge` must carry\n  the App Group entitlement, and targets that don't reference it must not —\n  assert this in release pre-flight; the failure mode is silent `nil`.\n\n## Evidence\n\n- **a private document-scanner app** — `WidgetBridge` \u002F `WidgetSnapshotReader` commit\n  series, incl. `stop iCloud-sync launch from blanking widget recents`\n  (invariant A) and the App-Lock redaction mirroring fixes (invariant B).\n- **a second private iOS app** — independently re-derived the same App-Group snapshot\n  architecture, motivating this canonical skill.\n\n## Related skills\n\n- `biometric-applock` — the App-Lock state this skill's invariant B mirrors\n  into the shared suite and redacts against at render time.\n- `file-handoff-inbox-backstop` — widget timeline launches re-trigger app cold\n  starts; a poison share-inbox batch turns that into a boot loop.\n- `deep-link-resolver-applock-pathtraversal` — widget entry taps deep-link into\n  the app; route them through the single resolver (dropped, not deferred, while\n  locked).\n- `swift6-mainactor-compile-fixes` — the shared DTO must decode off-main in the\n  widget process; mark the bridge\u002Freader types `nonisolated` honestly instead of\n  `@unchecked Sendable` band-aids.\n- `swiftdata-inmemory-test-harness` — drive the writer from an in-memory store\n  to test the never-clobber and backfill paths.\n- `background-assets-manifest-drift-blind-redownload` — another shared\u002Fcached\n  resource whose identity must be verified by content, not presence, before\n  reuse.\n- `diagnostic-export-error-redaction-boundary` — a different redaction\n  boundary (raw error descriptions) on the same app; compare when a feature\n  needs more than one kind of redaction gate.\n","# Widget ↔ App Bridge: One Codable Snapshot Over the App Group\n\n## Symptom\n\n- Widget shows \"No recent documents\" after a launch even though the app has\n  documents — classically the first launch after iCloud sync, when the local\n  store is transiently empty and the app overwrites the snapshot with nothing.\n- Widget still renders pre-lock content (titles, thumbnails) while App-Lock is\n  engaged — a stale pre-redaction snapshot on disk.\n- Thumbnails break after reinstall\u002Frestore — absolute file URLs were baked into\n  the snapshot and the container path changed.\n- Widget silently empty on one target: missing App Group entitlement makes\n  `containerURL(forSecurityApplicationGroupIdentifier:)` return `nil` with no\n  error (surfaces only at altool validate).\n- A Lock Screen\u002FStandBy widget renders blank while the device is locked — the\n  snapshot file's protection class blocks the widget process from reading it\n  (see the file-protection invariant under Fix).\n\n## Root cause\n\nA widget runs in a **separate process**. Its only channels to the app are the\nshared App Group container and `WidgetCenter.shared.reloadAllTimelines()`.\nNaive bridges fail in four repeatable ways: writing the snapshot on every model\nchange (so a transient-empty launch pass clobbers last-known-good); baking\nabsolute URLs (container paths differ per process\u002Finstall); non-atomic writes\n(widget reads a half-written file); and redaction decided ad hoc in two places\n(so a stale pre-redaction snapshot leaks). Every app re-derives this\narchitecture — this skill is the canonical shape.\n\n## Fix\n\nOne `Codable` DTO compiled into **both** targets; app-side atomic writer;\nwidget-side pure reader; relative paths only; backfill on launch.\n\nInvariants the implementation must hold:\n\n- **IDs are stable model IDs, never absolute URLs**; thumbnail paths stay\n  relative to the App Group container — absolute paths break after\n  reinstall\u002Frestore because the container path changes per install.\n- **Invariant A (writer): never clobber a good snapshot with a\n  transient-empty one.** On an iCloud-sync launch the local store is briefly\n  empty — if `documents` is empty but a snapshot with entries already exists\n  on disk, skip the write and let the post-settle backfill publish real state.\n- **Invariant B (writer + reader share one flag): the App-Lock redaction\n  decision has exactly one source of truth.** The writer mirrors App-Lock\n  state into the shared UserDefaults suite; the reader re-checks that SAME\n  flag on every load regardless of what's on disk, so a stale pre-redaction\n  snapshot can never render. Neither side invents its own redaction signal —\n  that's what causes double-redaction bugs.\n- Writes are atomic (`.atomic, .completeFileProtectionUntilFirstUserAuthentication`)\n  so the widget process never reads a half-written file. Do not use\n  `.completeFileProtectionUnlessOpen`: a Lock Screen\u002FStandBy widget cannot open\n  the file while the device is locked, so it renders blank while locked (see\n  Symptom). The trade-off: the snapshot holds real titles and thumbnail paths\n  on disk, protected only until the first unlock after boot. The writer does\n  not redact the file; redaction is applied at render time by the reader\n  (invariant B).\n\n**Read `references\u002Fsnapshot-bridge.md` before implementing** — the full\n`WidgetBridge` shared DTO, `WidgetSnapshotWriter` (app-side, the only writer),\nand `WidgetSnapshotReader` (widget-side, pure reader) implementing the\ninvariants above.\n\nCompleting the shape:\n\n- **Backfill on launch**: after the store settles (post iCloud first-sync),\n  call `publish` once — heals missing, stale, or version-bumped snapshots:\n  `await store.awaitInitialLoad(); WidgetSnapshotWriter.publish(...)`.\n- **Resolve relative paths at read time**:\n  `WidgetBridge.containerURL?.appendingPathComponent(entry.thumbnailRelativePath)`.\n- **Version the filename** (`-v1`) so a DTO change reads as \"no snapshot\" (then\n  backfill heals it) instead of a decode crash in the widget process.\n- **Entitlement parity**: every target that compiles `WidgetBridge` must carry\n  the App Group entitlement, and targets that don't reference it must not —\n  assert this in release pre-flight; the failure mode is silent `nil`.\n\n## Evidence\n\n- **a private document-scanner app** — `WidgetBridge` \u002F `WidgetSnapshotReader` commit\n  series, incl. `stop iCloud-sync launch from blanking widget recents`\n  (invariant A) and the App-Lock redaction mirroring fixes (invariant B).\n- **a second private iOS app** — independently re-derived the same App-Group snapshot\n  architecture, motivating this canonical skill.\n\n## Related skills\n\n- `biometric-applock` — the App-Lock state this skill's invariant B mirrors\n  into the shared suite and redacts against at render time.\n- `file-handoff-inbox-backstop` — widget timeline launches re-trigger app cold\n  starts; a poison share-inbox batch turns that into a boot loop.\n- `deep-link-resolver-applock-pathtraversal` — widget entry taps deep-link into\n  the app; route them through the single resolver (dropped, not deferred, while\n  locked).\n- `swift6-mainactor-compile-fixes` — the shared DTO must decode off-main in the\n  widget process; mark the bridge\u002Freader types `nonisolated` honestly instead of\n  `@unchecked Sendable` band-aids.\n- `swiftdata-inmemory-test-harness` — drive the writer from an in-memory store\n  to test the never-clobber and backfill paths.\n- `background-assets-manifest-drift-blind-redownload` — another shared\u002Fcached\n  resource whose identity must be verified by content, not presence, before\n  reuse.\n- `diagnostic-export-error-redaction-boundary` — a different redaction\n  boundary (raw error descriptions) on the same app; compare when a feature\n  needs more than one kind of redaction gate.\n",{"name":5,"description":7},"main","153711dd9432743d97f0b33b080ada5798ea623c","plugins\u002Fios-dev\u002Fskills\u002Fwidget-appgroup-snapshot-bridge","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 widget-appgroup-snapshot-bridge",{"tool":35,"command":36},"bunx","bunx skills add abhijitbansal\u002Fclaude-skills --skill widget-appgroup-snapshot-bridge",{"tool":38,"command":39},"pnpm","pnpm dlx skills add abhijitbansal\u002Fclaude-skills --skill widget-appgroup-snapshot-bridge","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fios-dev\u002Fskills\u002Fwidget-appgroup-snapshot-bridge\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"references\u002Fsnapshot-bridge.md","REFERENCE","参考文档",3892,"https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fios-dev\u002Fskills\u002Fwidget-appgroup-snapshot-bridge\u002Freferences\u002Fsnapshot-bridge.md",[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"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":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"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":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"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":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"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":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"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":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"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",[],[]]