[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74XGXJ680CK2TDJ7NBAHTK6":3,"skill-same:01M74XGXJ680CK2TDJ7NBAHTK6":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},"01M74XGXJ680CK2TDJ7NBAHTK6","file-handoff-inbox-backstop",null,"App boot-loops after receiving a share — every cold launch is jetsam-killed mid-import (a 24MP EXIF-rotated image decodes to a ~880MB bitmap), and widget-timeline launches keep re-triggering the same crash; or shared items import twice \u002F silently vanish because the host drained a half-written batch. Use when a share\u002Faction extension hands files to its host app through an App Group inbox — the drain needs a manifest ready-marker, a per-batch attempt cap persisted BEFORE heavy work, quarantine for poison batches, a launch re-entrancy guard, and an injectable inbox root for tests\u002FCI.","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\u002Ffile-handoff-inbox-backstop\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: file-handoff-inbox-backstop\ndescription: App boot-loops after receiving a share — every cold launch is jetsam-killed mid-import (a 24MP EXIF-rotated image decodes to a ~880MB bitmap), and widget-timeline launches keep re-triggering the same crash; or shared items import twice \u002F silently vanish because the host drained a half-written batch. Use when a share\u002Faction extension hands files to its host app through an App Group inbox — the drain needs a manifest ready-marker, a per-batch attempt cap persisted BEFORE heavy work, quarantine for poison batches, a launch re-entrancy guard, and an injectable inbox root for tests\u002FCI.\n---\n\n# Share-Extension Inbox: Backstop the Drain Against Poison Batches\n\n## Symptom\n\n- App crashes on launch, **every** launch, after a user shares a large item.\n  A private document-scanner app's case: a 24MP EXIF-rotated shared image decoded to a ~880MB bitmap\n  → jetsam during the inbox drain → drain died before clearing the batch →\n  cold-launch boot-loop. Widget timeline launches re-triggered it too.\n- Shared items imported twice (drain ran concurrently) or never appeared\n  (host drained a batch the extension was still writing).\n\n## Root cause\n\nThe naive inbox — extension writes files into the App Group container, host\nimports-then-deletes on launch — has no failure story. A crash *during* import\nleaves the batch in place, so the very work that crashed runs again on the next\nlaunch, unconditionally. And launch has multiple triggers (`onAppear`,\n`scenePhase .active`, widget timeline reloads), so drains overlap.\n\n## Fix\n\n**Layout** — batch dir per share; `manifest.json` written LAST is the ready marker:\n\n```\n\u003CAppGroup>\u002FShareInbox\u002F\u003CbatchID>\u002Fitem-0.jpg … manifest.json\n\u003CAppGroup>\u002FShareInboxFailed\u002F          # quarantined poison batches\n```\n\n**Read `references\u002Finbox-drain.md` before implementing** — has the full\nextension-side manifest writer, the host-side drain loop (attempt cap +\nquarantine + re-entrancy guard), and the injectable `ShareInbox` root\nwrapper. Rules that live only in that code and matter before you open it:\n\n- The manifest's `files` list stores paths **relative to the batch dir**,\n  never absolute URLs.\n- `onAppear` AND `scenePhase == .active` both fire on cold launch — the\n  drain loop must **guard** re-entrancy, not try to dedupe its callers.\n- `importBatch`'s heavy decode work happens **off-main**, inside the guarded\n  drain loop.\n- A caught import error **leaves the batch in place** — the already-burned\n  attempt count is the backstop, not a retry-immediately.\n- `ShareInbox.appGroup(id:)` returns `nil` **silently** when the App Group\n  entitlement is missing on that specific target — check the entitlement\n  per target, not once app-wide.\n\n**Image normalization** — the actual jetsam trigger. `UIGraphicsImageRenderer`\ndefaults to device scale, so a 24MP image renders at 3× pixels:\n\n```swift\nlet format = UIGraphicsImageRendererFormat()\nformat.scale = 1   \u002F\u002F NOT device scale — 24MP @3x ≈ 880 MB bitmap → jetsam\nlet out = UIGraphicsImageRenderer(size: targetSize, format: format).image { _ in\n    image.draw(in: CGRect(origin: .zero, size: targetSize))  \u002F\u002F also bakes in EXIF rotation\n}\n```\n\n## Invariants\n\n1. Manifest written last; no manifest ⇒ batch does not exist to the drain.\n2. Attempt counter hits disk **before** decode work — a crash burns an attempt.\n3. After `maxDrainAttempts` (3): quarantine to `ShareInboxFailed\u002F`, never delete.\n4. One drain at a time; every launch path (view appear, scene activation,\n   widget-triggered launch) funnels through the same guarded entry point.\n5. Renderer `scale = 1` when normalizing shared images.\n6. Inbox root is injected, never read from the entitlement inside the logic.\n\n## Evidence\n\n- a private document-scanner app (5 targets incl. share extension + `ShareExtensionInbox`\n  helper): `stop launch boot-loop on large rotated shared images`,\n  `cap drain attempts and quarantine poison batches`.\n\n## Related skills\n\n- `widget-appgroup-snapshot-bridge` — the read-only sibling over the same App\n  Group; its timeline reloads are one of the launch paths that re-trigger drains.\n- `deep-link-resolver-applock-pathtraversal` — hardening the other cold-launch\n  entry point (URLs) with the same one-guarded-funnel discipline.\n- `mainactor-launch-watchdog-audit` — the general launch rule this instantiates:\n  record progress before the loop body, and keep heavy launch work off-main.\n- `swiftdata-inmemory-test-harness` — same injectable-root discipline applied to\n  the persistence layer.\n- `swift6-mainactor-compile-fixes` — if moving `importBatch` decode work off-main\n  trips \"main actor-isolated X\" errors.\n","# Share-Extension Inbox: Backstop the Drain Against Poison Batches\n\n## Symptom\n\n- App crashes on launch, **every** launch, after a user shares a large item.\n  A private document-scanner app's case: a 24MP EXIF-rotated shared image decoded to a ~880MB bitmap\n  → jetsam during the inbox drain → drain died before clearing the batch →\n  cold-launch boot-loop. Widget timeline launches re-triggered it too.\n- Shared items imported twice (drain ran concurrently) or never appeared\n  (host drained a batch the extension was still writing).\n\n## Root cause\n\nThe naive inbox — extension writes files into the App Group container, host\nimports-then-deletes on launch — has no failure story. A crash *during* import\nleaves the batch in place, so the very work that crashed runs again on the next\nlaunch, unconditionally. And launch has multiple triggers (`onAppear`,\n`scenePhase .active`, widget timeline reloads), so drains overlap.\n\n## Fix\n\n**Layout** — batch dir per share; `manifest.json` written LAST is the ready marker:\n\n```\n\u003CAppGroup>\u002FShareInbox\u002F\u003CbatchID>\u002Fitem-0.jpg … manifest.json\n\u003CAppGroup>\u002FShareInboxFailed\u002F          # quarantined poison batches\n```\n\n**Read `references\u002Finbox-drain.md` before implementing** — has the full\nextension-side manifest writer, the host-side drain loop (attempt cap +\nquarantine + re-entrancy guard), and the injectable `ShareInbox` root\nwrapper. Rules that live only in that code and matter before you open it:\n\n- The manifest's `files` list stores paths **relative to the batch dir**,\n  never absolute URLs.\n- `onAppear` AND `scenePhase == .active` both fire on cold launch — the\n  drain loop must **guard** re-entrancy, not try to dedupe its callers.\n- `importBatch`'s heavy decode work happens **off-main**, inside the guarded\n  drain loop.\n- A caught import error **leaves the batch in place** — the already-burned\n  attempt count is the backstop, not a retry-immediately.\n- `ShareInbox.appGroup(id:)` returns `nil` **silently** when the App Group\n  entitlement is missing on that specific target — check the entitlement\n  per target, not once app-wide.\n\n**Image normalization** — the actual jetsam trigger. `UIGraphicsImageRenderer`\ndefaults to device scale, so a 24MP image renders at 3× pixels:\n\n```swift\nlet format = UIGraphicsImageRendererFormat()\nformat.scale = 1   \u002F\u002F NOT device scale — 24MP @3x ≈ 880 MB bitmap → jetsam\nlet out = UIGraphicsImageRenderer(size: targetSize, format: format).image { _ in\n    image.draw(in: CGRect(origin: .zero, size: targetSize))  \u002F\u002F also bakes in EXIF rotation\n}\n```\n\n## Invariants\n\n1. Manifest written last; no manifest ⇒ batch does not exist to the drain.\n2. Attempt counter hits disk **before** decode work — a crash burns an attempt.\n3. After `maxDrainAttempts` (3): quarantine to `ShareInboxFailed\u002F`, never delete.\n4. One drain at a time; every launch path (view appear, scene activation,\n   widget-triggered launch) funnels through the same guarded entry point.\n5. Renderer `scale = 1` when normalizing shared images.\n6. Inbox root is injected, never read from the entitlement inside the logic.\n\n## Evidence\n\n- a private document-scanner app (5 targets incl. share extension + `ShareExtensionInbox`\n  helper): `stop launch boot-loop on large rotated shared images`,\n  `cap drain attempts and quarantine poison batches`.\n\n## Related skills\n\n- `widget-appgroup-snapshot-bridge` — the read-only sibling over the same App\n  Group; its timeline reloads are one of the launch paths that re-trigger drains.\n- `deep-link-resolver-applock-pathtraversal` — hardening the other cold-launch\n  entry point (URLs) with the same one-guarded-funnel discipline.\n- `mainactor-launch-watchdog-audit` — the general launch rule this instantiates:\n  record progress before the loop body, and keep heavy launch work off-main.\n- `swiftdata-inmemory-test-harness` — same injectable-root discipline applied to\n  the persistence layer.\n- `swift6-mainactor-compile-fixes` — if moving `importBatch` decode work off-main\n  trips \"main actor-isolated X\" errors.\n",{"name":5,"description":7},"main","153711dd9432743d97f0b33b080ada5798ea623c","plugins\u002Fios-dev\u002Fskills\u002Ffile-handoff-inbox-backstop","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 file-handoff-inbox-backstop",{"tool":35,"command":36},"bunx","bunx skills add abhijitbansal\u002Fclaude-skills --skill file-handoff-inbox-backstop",{"tool":38,"command":39},"pnpm","pnpm dlx skills add abhijitbansal\u002Fclaude-skills --skill file-handoff-inbox-backstop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fios-dev\u002Fskills\u002Ffile-handoff-inbox-backstop\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"references\u002Finbox-drain.md","REFERENCE","参考文档",3320,"https:\u002F\u002Fgithub.com\u002Fabhijitbansal\u002Fclaude-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fios-dev\u002Fskills\u002Ffile-handoff-inbox-backstop\u002Freferences\u002Finbox-drain.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",[],[]]