[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F2EBJB164SYYE7S3PC654W":3,"skill-same:01M7F2EBJB164SYYE7S3PC654W":264},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7F2EBJB164SYYE7S3PC654W","media-images-and-files",null,"Shows, picks and stores images - expo-image, picker, camera, a media store. Use when adding photos, avatars, attachments, uploads or save-to-Photos, or images flicker. Not for icons (icons-app-icon-and-splash).","zakariaf\u002FReactNative-Skills","zakariaf","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2259803?v=4","01M7DEF0YMPS6Y6RQ4WGA0JH9R","Zakaria Fatahi","01M7F1VKYEK96M7SYJE1EPGD0A",13,"MIT","https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: media-images-and-files\ndescription: Shows, picks and stores images - expo-image, picker, camera, a media store. Use when adding photos, avatars, attachments, uploads or save-to-Photos, or images flicker. Not for icons (icons-app-icon-and-splash).\n---\n\n# Media: images and files\n\nEvery content image is an expo-image view with a box, a cache policy for its kind of source, a recycling\nkey in recycled lists and a name (or a decorative mark); photos are picked or captured only from a\npress, through ports, the camera only after the permission gate; every picked file is downscaled and\nre-encoded once, copied into the app's media folder under a new name and its temporaries discarded;\nrecords hold that name (a MediaRef), never a file URI; files are never overwritten, swept when orphaned,\nand leave the device only through ports. A zero-dependency checker proves it on iOS and Android code alike.\n\n## Rules that must hold\n\n1. **Every content image renders with expo-image inside a box.** A `style` with width and height (or\n   one plus `aspectRatio`, or flex in a sized parent); `contentFit`, never React Native's `resizeMode`,\n   `defaultSource` or `fadeDuration`. Why: without a box the view is 0 x 0 or jumps when the image\n   loads, and the compatibility props are deprecated. (`image-size`, `image-legacy-prop`)\n2. **Every expo-image `\u003CImage>` is named or marked decorative.** `accessible` with\n   `accessibilityLabel={t(...)}` for content, `accessible={false}` for decoration. Why: expo-image is not\n   an accessibility element by default, so VoiceOver and TalkBack skip a photo silently. (`image-a11y`)\n3. **An image in a recycled list cell has a `recyclingKey`** (the row id). Why: FlashList reuses the\n   cell and its image view shows the previous row's photo until the new one loads. (`list-recycling-key`)\n4. **The cache policy matches the source.** Stored files `cachePolicy=\"memory\"` (they are on disk\n   already); public remote images the default disk cache; private images memory-only or caches cleared\n   on sign-out. Why: a disk cache duplicates stored files and keeps private photos after sign-out.\n5. **Pick and capture only from a press, through `MediaPickerPort`: images only, no base64, no EXIF.**\n   Why: a picker opened from an effect surprises the person and reopens after a cancel; base64 puts\n   megabytes on the JS heap; EXIF carries the GPS position. (`picker-on-press`, `picker-options`)\n6. **The camera opens only after the permission gate; only `src\u002Fservices\u002Fpermissions\u002F` asks.** The\n   library picker needs no permission on iOS 14+ and Android; the picker adapter reads the camera\n   state through the gate's access (injected), never through its own permission functions. Why: iOS\n   rejects `launchCameraAsync` without the grant and Android shows the system dialog with no\n   explanation; one gate handles denied, rationale and blocked on both. (`permission-outside-gate`)\n7. **The app config declares only the capture and library permissions the code uses.**\n   `cameraPermission: false` when nothing opens a camera, `microphonePermission: false` when nothing\n   records; these block the permission for the whole app, so never while expo-camera or expo-audio\n   needs it. A save-only app keeps `READ_MEDIA_IMAGES`\u002F`VIDEO` out. Why: the defaults add\n   `RECORD_AUDIO`, and Play restricts broad photo reads (its Photo and Video Permissions policy).\n   (`unused-permission`)\n8. **Every picked or captured image is downscaled and re-encoded once (2048 px long edge, JPEG 0.8),\n   one at a time, before it is stored; image bytes never live in JS.** Why: a 12 MP photo decodes to\n   49 MB; the re-encode drops EXIF and turns HEIC into JPEG; base64 data URIs cost memory twice and\n   defeat every cache. (`data-uri`)\n9. **Kept media lives in the media store (`Paths.document\u002Fmedia\u002F`), never in the cache, and records\n   hold a MediaRef (a plain file name), never a URI.** Resolve with `uriOf(ref)` at render time. Why:\n   the system purges the cache, and the absolute path of the app's folders changes after an update or a\n   restore, so a stored `file:\u002F\u002F` URI breaks. (`media-in-cache`, `stored-uri`)\n10. **A changed image is a new file under a new name; nothing is overwritten.** Write the partial file,\n    rename it into place, save the record, then remove the old file. Why: image caches are keyed by URI\n    and keep showing old pixels, and a crash mid-write corrupts the only copy. (`overwrite-in-place`)\n11. **Every stored file has one owner record, and an orphan sweep runs after startup and after a\n    restore.** Save the record first, then delete the file; the sweep keeps every file this process\n    imported and every file the restore's safety copy references (`protectedRefs`), and removes stale\n    partial copies. Why: crashes and abandoned imports leave files no record references, and nothing\n    else removes them; the undo of a restore needs its photos.\n    (`sweep-wired`)\n12. **Only current SDK 57 APIs.** expo-file-system's `File`\u002F`Directory`\u002F`Paths` and expo-media-library's\n    object API; never their legacy main-entry functions or `\u002Flegacy` entries. Why: in SDK 57 the old\n    functions compile (declared `@deprecated`) and throw at runtime; `documentDirectory` and\n    `cacheDirectory` are no longer exported (a tsc error, or `undefined` in untyped code). (`legacy-api`)\n13. **Images leave the device only through ports, from a press**: the share sheet (data-export-and-\n    restore's `ShareSheetPort`), `PhotoSaverPort`, and `FileTransferPort` for uploads and downloads,\n    with URLs from `src\u002Fapi` and headers from the session. Why: one adapter per SDK, the app's network\n    policy keeps its single entry per transport, and only re-encoded, metadata-free files leave.\n    (`transfer-outside-port`)\n\n## Workflow\n\n1. Read [references\u002Fdisplaying-images.md](references\u002Fdisplaying-images.md) for any image on screen, and\n   [references\u002Fpicking-and-capturing.md](references\u002Fpicking-and-capturing.md) plus\n   [references\u002Ffiles-and-storage.md](references\u002Ffiles-and-storage.md) when the person adds photos.\n2. Prerequisites: the Result module (error-handling-typed-results) and the composition root\n   (architecture-and-boundaries). Install:\n   `npx expo install expo-image-picker expo-image-manipulator expo-file-system expo-device expo-crypto`\n   (SDK 57: `~57.0.20`, `~57.0.20`, `~57.0.7`, `~57.0.2`, `~57.0.3`; `expo-image ~57.0.5` ships with the template, expo-file-system often arrives\n   with persistence-and-migrations; verified 2026-10-14; re-verify with `npx expo install --check`).\n3. Stop and ask the developer to classify the new SDKs (an architecture decision): merge\n   `examples\u002Fcontracts\u002Farchitecture.json` into `contracts\u002Farchitecture.json` and add the packages to\n   `VENDOR_SDK_PATHS` in `eslint.config.mjs` in one commit with a Gate-Change trailer.\n4. Copy the templates: `templates\u002Fsrc\u002Fcore\u002Fmedia\u002F`, `templates\u002Fsrc\u002Fservices\u002F{media-picker,media-store,image-resizer}\u002F`,\n   `templates\u002Fsrc\u002Fdata\u002Fmedia\u002F`, `templates\u002Fsrc\u002Fui\u002Fmedia\u002F` (list `StoredImage` in the component catalogue,\n   ui-component-library). Copy the resizer adapter from\n   `examples\u002Fsrc\u002Fservices\u002Fimage-resizer\u002F` once expo-image-manipulator is installed.\n5. Set the picker plugin options in `app.config.ts` (picking-and-capturing.md, section 8): purpose texts\n   from the catalogs (i18n-strings-and-catalogs), `false` for every permission no code uses (they block\n   it for the whole app: check expo-camera and expo-audio first).\n6. Compose once: the three adapters in `createDeviceServices` (fakes in `createTestServices`), the picker\n   with `isCameraAllowed: async () => isPermissionAllowed(await permissions.access.camera.permission())`\n   and `isCameraPresent: () => Platform.OS !== 'ios' || Device.isDevice` (expo-device; opening the camera\n   on the iOS simulator crashes, picking-and-capturing.md section 5), and `createMediaImporter({ picker, resizer, store, nextMediaId })`; features read `useServices()`.\n   In the startup work after the data layer opened (app-startup-and-bootstrap), `await\n   importer.importPendingPick()` first, then `sweepMedia(...)` with the safety copy's refs as\n   `protectedRefs` (files-and-storage.md section 9); sweep again after a restore. `nextMediaId` is\n   `() => randomUUID().toLowerCase()` from expo-crypto (Hermes has no global `crypto.randomUUID`).\n7. Store MediaRefs: a `*_ref TEXT` column through a migration (persistence-and-migrations) or a\n   `MediaRef` field in a store; a repository method lists every ref for the sweep.\n8. Build the feature from `examples\u002Fsrc\u002Ffeatures\u002Ftasks\u002F` (model hook, jobs, photo strip): \"Take photo\"\n   calls permissions-and-system-prompts' `usePermissionGate` `requestAccess` and the capture runs from\n   its `onAllowed`, the screen renders the gate's sheet; one message per failure kind, the busy state\n   blocking a second press, a failed record save removing the new files, remove = save then delete.\n9. Sharing, Photos, uploads: [references\u002Fsharing-and-transfer.md](references\u002Fsharing-and-transfer.md)\n   and `examples\u002Fsrc\u002Fservices\u002F{photo-saver,file-transfer}\u002F`; tell networking-and-server-state and\n   privacy-and-store-declarations about a new transport or data type before it ships.\n10. Run the tests ([references\u002Ftesting-and-checker.md](references\u002Ftesting-and-checker.md)):\n    `npx jest src\u002Fcore\u002Fmedia src\u002Fservices\u002Fmedia-picker src\u002Fservices\u002Fmedia-store src\u002Fservices\u002Fimage-resizer src\u002Fdata\u002Fmedia src\u002Fui\u002Fmedia --ci`\n    and `npm run typecheck`.\n11. After an adapter change, run the media drill on a named iOS simulator and Android emulator\n    (testing-and-checker.md, section 3), or say in the report that it is owed.\n12. Run `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-media.mjs .`; fix every `FAIL` line and rerun until it\n    prints `RESULT: PASS`.\n\n## Definition of done\n\n- [ ] Every expo-image `\u003CImage>` has a box, `contentFit` (no legacy props), a name or\n      `accessible={false}`, a cache policy fit for its source, and a `recyclingKey` in recycled cells.\n- [ ] Picks and captures run from presses through `MediaPickerPort`; images only, no base64, no EXIF;\n      the camera behind the permission gate; no plugin declares an unused capture or library permission.\n- [ ] Every picked image goes through the importer: downscaled to 2048 px, JPEG, one at a time, stored\n      under a new MediaRef in `Paths.document\u002Fmedia\u002F`, temporaries discarded, all or nothing per batch.\n- [ ] Records and stores hold MediaRefs, resolved with `uriOf` at render; nothing overwrites a stored\n      file; deletes save the record first; the sweep runs after startup and after a restore and keeps\n      the safety copy's refs (`protectedRefs`).\n- [ ] No legacy expo-file-system or expo-media-library API; uploads and downloads only in the\n      file-transfer adapter; sharing through `ShareSheetPort`.\n- [ ] The tests of workflow step 10 pass; after an adapter change the drill passed on iOS and Android,\n      or the report says it is owed.\n- [ ] `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-media.mjs .` prints `RESULT: PASS`. Expected only before the\n      app config exists: `SKIP app.config.ts [unused-permission] not yet created\n      (app-variants-and-environment creates it)`. An app without media code prints `NOT APPLICABLE: no\n      source file under src\u002F imports expo-image, expo-image-picker, expo-camera, expo-image-manipulator,\n      expo-media-library, expo-file-system, and there is no src\u002Fservices\u002Fmedia-store\u002F`.\n\n## Anti-patterns\n\n- **Saving `asset.uri` from the picker in a record.** It is a cache file the system purges, at an\n  absolute path that changes; import it and store the MediaRef.\n- **`base64: true` \"to upload it easily\", or a `data:image` URI.** Megabytes on the JS heap, decoded\n  twice, no cache; upload the stored file with `FileTransferPort`.\n- **Opening the picker in `useEffect` when a screen mounts.** It reopens after a cancel and on every\n  focus; open it from the press.\n- **Calling `requestCameraPermissionsAsync` in a screen.** No explanation, no blocked state; the gate.\n- **`cameraPermission: false` on the picker in an app with an expo-camera scanner.** The option strips\n  `CAMERA` from the merged manifest for every package; the scanner can never be granted.\n- **`granularPermissions` left at the default in a save-only app.** It declares `READ_MEDIA_IMAGES` and\n  `READ_MEDIA_VIDEO`, which Play reviews under its Photo and Video Permissions policy.\n- **Overwriting `photo.jpg` after a crop.** Every view keeps the old image; a new ref per change.\n- **Deleting the file, then saving the record.** A crash leaves a record pointing at nothing; record\n  first, the sweep removes leftovers.\n- **Shipping full-size camera photos.** 5 to 10 MB per file, 49 MB per decode, Android's 25 MB backup\n  quota gone after a few photos; downscale once on import.\n- **Sharing the picked original.** It carries the GPS position; share the stored, re-encoded file.\n- **`allowDownscaling={false}` or `contentFit=\"none\"` in a list.** Full-size decodes per cell.\n- **`saveToLibraryAsync` or `readAsStringAsync` from the main entries.** They throw in SDK 57; use the\n  object APIs.\n- **A second expo-sharing adapter.** Reuse data-export-and-restore's `ShareSheetPort`.\n\n## Files in this skill\n\n| File | What it is | Read\u002Frun when |\n|---|---|---|\n| [references\u002Fdisplaying-images.md](references\u002Fdisplaying-images.md) | expo-image API, sizing, cache policies, recycling, memory arithmetic, names, remote images, placeholders, platform differences, pitfalls | Workflow step 1, any image on screen |\n| [references\u002Fpicking-and-capturing.md](references\u002Fpicking-and-capturing.md) | Picker and camera API, permissions per platform (read in the native sources), the gate, Android's lost activity, returned files, app config, expo-camera | Workflow steps 1-3, 5, 8 |\n| [references\u002Ffiles-and-storage.md](references\u002Ffiles-and-storage.md) | The folders, MediaRef, the import, no overwrite, owners and the sweep, disk space and backups, the SDK 57 file-system API and its throwing legacy names, backups and media | Workflow steps 1, 6-7 |\n| [references\u002Fsharing-and-transfer.md](references\u002Fsharing-and-transfer.md) | Share sheet, saving to Photos (expo-media-library 57), the file-transfer port, privacy, receiving images | Workflow step 9 |\n| [references\u002Ftesting-and-checker.md](references\u002Ftesting-and-checker.md) | The shipped tests, testing with fakes, the media drill on named devices, every check-media rule with its fix, configuration | Workflow steps 10-12 |\n| `templates\u002Fsrc\u002Fcore\u002Fmedia\u002F` | `media-ref.ts` (MediaRef, extensions), `image-fit.ts` (fit, decoded bytes, `MEDIA_LIMITS`), `media-sweep.ts` (the sweep plan), each with its test | Workflow step 4 |\n| `templates\u002Fsrc\u002Fservices\u002F` | `media-picker\u002F`, `media-store\u002F`, `image-resizer\u002F`: ports, the picker and file-system adapters, fakes with tests | Workflow steps 4, 6 |\n| `templates\u002Fsrc\u002Fdata\u002Fmedia\u002F` | `media-importer.ts` (pick, downscale, store, discard; all or nothing; protected from the sweep from the moment each file is stored until the process ends) and `media-sweeper.ts` (stale partials, orphans), with tests | Workflow steps 4, 6 |\n| `templates\u002Fsrc\u002Fui\u002Fmedia\u002F` | `stored-image.tsx` (sized, memory-cached, recycled, named) and its test | Workflow step 4 |\n| `examples\u002Fsrc\u002Fservices\u002F` | `image-resizer\u002F` (expo-image-manipulator adapter), `photo-saver\u002F` (expo-media-library port and adapter), `file-transfer\u002F` (upload and download port and adapter), type-checked against their SDK 57 packages | Workflow steps 4, 9 |\n| `examples\u002Fsrc\u002Ffeatures\u002Ftasks\u002F` | A task's photos: model hook (the camera through `usePermissionGate`) and its test (allowed, refused, rationale, blocked, failed save), press jobs (import, save, remove, share), the photo strip (a FlatList: the list is bounded) | Workflow step 8 |\n| `examples\u002Fcontracts\u002Farchitecture.json` | The vendor SDK entries to merge | Workflow step 3 |\n| `examples\u002Ftask-photos-messages.en.json` | The example's catalog keys | Workflow step 8 |\n| `scripts\u002Fcheck-media.mjs` | The checker (15 rules; `--json`) | Workflow step 12, and at the end |\n| `scripts\u002Flib\u002Fmedia-rules.mjs` | The checker's rules | Never by hand |\n| `scripts\u002Flib\u002Fsource-scan.mjs` | Shared source scanner, synced from the library (do not edit here) | Never by hand |\n| `scripts\u002Fcheck-lib.mjs` | Shared script helper, synced from the library (do not edit here) | Never by hand |\n| `scripts\u002Fselftest.mjs` | Proves the checker passes the templates and examples and catches every planted bug | After changing a script, a template or an example |\n| `assets\u002Fshared.json` | The shared files this skill copies in | When adding a shared file |\n| `assets\u002Ftemplate-placeholders.json` | Template placeholder values (none) | When adding a placeholder |\n| `tests\u002F` | The fixture app (`bases\u002Fapp`) and the overlay cases of check-media (one planted bug per rule) | When adding a rule |\n\n## Related skills\n\n- `icons-app-icon-and-splash` - icons, the logo and illustrations drawn in code; bundled art.\n- `permissions-and-system-prompts` - the camera and photo-library permission gate.\n- `data-export-and-restore` - `ShareSheetPort`, backups (media refs vs files).\n- `architecture-and-boundaries` - ports, adapters, SDK classification, the composition root.\n- `persistence-and-migrations` - the MediaRef columns and their migrations.\n- `networking-and-server-state` - the ApiClient beside the file-transfer transport.\n- `privacy-and-store-declarations` - Photos or Videos in the store answers, the network audit.\n- `performance-budgets` - the memory budget and how to measure it on devices.\n- `accessibility-as-code` - image names, Reduce Motion for transitions.\n- `react-components-and-hooks` - lists, effects, `useIsAppActive` for a camera view.\n- `expo-prebuild-and-config-plugins`, `i18n-strings-and-catalogs` - plugin listing and purpose texts.\n- `auth-and-secure-storage` - headers for private images, clearing caches on sign-out.\n- `unit-and-component-tests`, `e2e-maestro` - test conventions and device flows.\n- `ios-simulator-build`, `android-emulator-build` - the builds the drill installs.\n","# Media: images and files\n\nEvery content image is an expo-image view with a box, a cache policy for its kind of source, a recycling\nkey in recycled lists and a name (or a decorative mark); photos are picked or captured only from a\npress, through ports, the camera only after the permission gate; every picked file is downscaled and\nre-encoded once, copied into the app's media folder under a new name and its temporaries discarded;\nrecords hold that name (a MediaRef), never a file URI; files are never overwritten, swept when orphaned,\nand leave the device only through ports. A zero-dependency checker proves it on iOS and Android code alike.\n\n## Rules that must hold\n\n1. **Every content image renders with expo-image inside a box.** A `style` with width and height (or\n   one plus `aspectRatio`, or flex in a sized parent); `contentFit`, never React Native's `resizeMode`,\n   `defaultSource` or `fadeDuration`. Why: without a box the view is 0 x 0 or jumps when the image\n   loads, and the compatibility props are deprecated. (`image-size`, `image-legacy-prop`)\n2. **Every expo-image `\u003CImage>` is named or marked decorative.** `accessible` with\n   `accessibilityLabel={t(...)}` for content, `accessible={false}` for decoration. Why: expo-image is not\n   an accessibility element by default, so VoiceOver and TalkBack skip a photo silently. (`image-a11y`)\n3. **An image in a recycled list cell has a `recyclingKey`** (the row id). Why: FlashList reuses the\n   cell and its image view shows the previous row's photo until the new one loads. (`list-recycling-key`)\n4. **The cache policy matches the source.** Stored files `cachePolicy=\"memory\"` (they are on disk\n   already); public remote images the default disk cache; private images memory-only or caches cleared\n   on sign-out. Why: a disk cache duplicates stored files and keeps private photos after sign-out.\n5. **Pick and capture only from a press, through `MediaPickerPort`: images only, no base64, no EXIF.**\n   Why: a picker opened from an effect surprises the person and reopens after a cancel; base64 puts\n   megabytes on the JS heap; EXIF carries the GPS position. (`picker-on-press`, `picker-options`)\n6. **The camera opens only after the permission gate; only `src\u002Fservices\u002Fpermissions\u002F` asks.** The\n   library picker needs no permission on iOS 14+ and Android; the picker adapter reads the camera\n   state through the gate's access (injected), never through its own permission functions. Why: iOS\n   rejects `launchCameraAsync` without the grant and Android shows the system dialog with no\n   explanation; one gate handles denied, rationale and blocked on both. (`permission-outside-gate`)\n7. **The app config declares only the capture and library permissions the code uses.**\n   `cameraPermission: false` when nothing opens a camera, `microphonePermission: false` when nothing\n   records; these block the permission for the whole app, so never while expo-camera or expo-audio\n   needs it. A save-only app keeps `READ_MEDIA_IMAGES`\u002F`VIDEO` out. Why: the defaults add\n   `RECORD_AUDIO`, and Play restricts broad photo reads (its Photo and Video Permissions policy).\n   (`unused-permission`)\n8. **Every picked or captured image is downscaled and re-encoded once (2048 px long edge, JPEG 0.8),\n   one at a time, before it is stored; image bytes never live in JS.** Why: a 12 MP photo decodes to\n   49 MB; the re-encode drops EXIF and turns HEIC into JPEG; base64 data URIs cost memory twice and\n   defeat every cache. (`data-uri`)\n9. **Kept media lives in the media store (`Paths.document\u002Fmedia\u002F`), never in the cache, and records\n   hold a MediaRef (a plain file name), never a URI.** Resolve with `uriOf(ref)` at render time. Why:\n   the system purges the cache, and the absolute path of the app's folders changes after an update or a\n   restore, so a stored `file:\u002F\u002F` URI breaks. (`media-in-cache`, `stored-uri`)\n10. **A changed image is a new file under a new name; nothing is overwritten.** Write the partial file,\n    rename it into place, save the record, then remove the old file. Why: image caches are keyed by URI\n    and keep showing old pixels, and a crash mid-write corrupts the only copy. (`overwrite-in-place`)\n11. **Every stored file has one owner record, and an orphan sweep runs after startup and after a\n    restore.** Save the record first, then delete the file; the sweep keeps every file this process\n    imported and every file the restore's safety copy references (`protectedRefs`), and removes stale\n    partial copies. Why: crashes and abandoned imports leave files no record references, and nothing\n    else removes them; the undo of a restore needs its photos.\n    (`sweep-wired`)\n12. **Only current SDK 57 APIs.** expo-file-system's `File`\u002F`Directory`\u002F`Paths` and expo-media-library's\n    object API; never their legacy main-entry functions or `\u002Flegacy` entries. Why: in SDK 57 the old\n    functions compile (declared `@deprecated`) and throw at runtime; `documentDirectory` and\n    `cacheDirectory` are no longer exported (a tsc error, or `undefined` in untyped code). (`legacy-api`)\n13. **Images leave the device only through ports, from a press**: the share sheet (data-export-and-\n    restore's `ShareSheetPort`), `PhotoSaverPort`, and `FileTransferPort` for uploads and downloads,\n    with URLs from `src\u002Fapi` and headers from the session. Why: one adapter per SDK, the app's network\n    policy keeps its single entry per transport, and only re-encoded, metadata-free files leave.\n    (`transfer-outside-port`)\n\n## Workflow\n\n1. Read [references\u002Fdisplaying-images.md](references\u002Fdisplaying-images.md) for any image on screen, and\n   [references\u002Fpicking-and-capturing.md](references\u002Fpicking-and-capturing.md) plus\n   [references\u002Ffiles-and-storage.md](references\u002Ffiles-and-storage.md) when the person adds photos.\n2. Prerequisites: the Result module (error-handling-typed-results) and the composition root\n   (architecture-and-boundaries). Install:\n   `npx expo install expo-image-picker expo-image-manipulator expo-file-system expo-device expo-crypto`\n   (SDK 57: `~57.0.20`, `~57.0.20`, `~57.0.7`, `~57.0.2`, `~57.0.3`; `expo-image ~57.0.5` ships with the template, expo-file-system often arrives\n   with persistence-and-migrations; verified 2026-10-14; re-verify with `npx expo install --check`).\n3. Stop and ask the developer to classify the new SDKs (an architecture decision): merge\n   `examples\u002Fcontracts\u002Farchitecture.json` into `contracts\u002Farchitecture.json` and add the packages to\n   `VENDOR_SDK_PATHS` in `eslint.config.mjs` in one commit with a Gate-Change trailer.\n4. Copy the templates: `templates\u002Fsrc\u002Fcore\u002Fmedia\u002F`, `templates\u002Fsrc\u002Fservices\u002F{media-picker,media-store,image-resizer}\u002F`,\n   `templates\u002Fsrc\u002Fdata\u002Fmedia\u002F`, `templates\u002Fsrc\u002Fui\u002Fmedia\u002F` (list `StoredImage` in the component catalogue,\n   ui-component-library). Copy the resizer adapter from\n   `examples\u002Fsrc\u002Fservices\u002Fimage-resizer\u002F` once expo-image-manipulator is installed.\n5. Set the picker plugin options in `app.config.ts` (picking-and-capturing.md, section 8): purpose texts\n   from the catalogs (i18n-strings-and-catalogs), `false` for every permission no code uses (they block\n   it for the whole app: check expo-camera and expo-audio first).\n6. Compose once: the three adapters in `createDeviceServices` (fakes in `createTestServices`), the picker\n   with `isCameraAllowed: async () => isPermissionAllowed(await permissions.access.camera.permission())`\n   and `isCameraPresent: () => Platform.OS !== 'ios' || Device.isDevice` (expo-device; opening the camera\n   on the iOS simulator crashes, picking-and-capturing.md section 5), and `createMediaImporter({ picker, resizer, store, nextMediaId })`; features read `useServices()`.\n   In the startup work after the data layer opened (app-startup-and-bootstrap), `await\n   importer.importPendingPick()` first, then `sweepMedia(...)` with the safety copy's refs as\n   `protectedRefs` (files-and-storage.md section 9); sweep again after a restore. `nextMediaId` is\n   `() => randomUUID().toLowerCase()` from expo-crypto (Hermes has no global `crypto.randomUUID`).\n7. Store MediaRefs: a `*_ref TEXT` column through a migration (persistence-and-migrations) or a\n   `MediaRef` field in a store; a repository method lists every ref for the sweep.\n8. Build the feature from `examples\u002Fsrc\u002Ffeatures\u002Ftasks\u002F` (model hook, jobs, photo strip): \"Take photo\"\n   calls permissions-and-system-prompts' `usePermissionGate` `requestAccess` and the capture runs from\n   its `onAllowed`, the screen renders the gate's sheet; one message per failure kind, the busy state\n   blocking a second press, a failed record save removing the new files, remove = save then delete.\n9. Sharing, Photos, uploads: [references\u002Fsharing-and-transfer.md](references\u002Fsharing-and-transfer.md)\n   and `examples\u002Fsrc\u002Fservices\u002F{photo-saver,file-transfer}\u002F`; tell networking-and-server-state and\n   privacy-and-store-declarations about a new transport or data type before it ships.\n10. Run the tests ([references\u002Ftesting-and-checker.md](references\u002Ftesting-and-checker.md)):\n    `npx jest src\u002Fcore\u002Fmedia src\u002Fservices\u002Fmedia-picker src\u002Fservices\u002Fmedia-store src\u002Fservices\u002Fimage-resizer src\u002Fdata\u002Fmedia src\u002Fui\u002Fmedia --ci`\n    and `npm run typecheck`.\n11. After an adapter change, run the media drill on a named iOS simulator and Android emulator\n    (testing-and-checker.md, section 3), or say in the report that it is owed.\n12. Run `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-media.mjs .`; fix every `FAIL` line and rerun until it\n    prints `RESULT: PASS`.\n\n## Definition of done\n\n- [ ] Every expo-image `\u003CImage>` has a box, `contentFit` (no legacy props), a name or\n      `accessible={false}`, a cache policy fit for its source, and a `recyclingKey` in recycled cells.\n- [ ] Picks and captures run from presses through `MediaPickerPort`; images only, no base64, no EXIF;\n      the camera behind the permission gate; no plugin declares an unused capture or library permission.\n- [ ] Every picked image goes through the importer: downscaled to 2048 px, JPEG, one at a time, stored\n      under a new MediaRef in `Paths.document\u002Fmedia\u002F`, temporaries discarded, all or nothing per batch.\n- [ ] Records and stores hold MediaRefs, resolved with `uriOf` at render; nothing overwrites a stored\n      file; deletes save the record first; the sweep runs after startup and after a restore and keeps\n      the safety copy's refs (`protectedRefs`).\n- [ ] No legacy expo-file-system or expo-media-library API; uploads and downloads only in the\n      file-transfer adapter; sharing through `ShareSheetPort`.\n- [ ] The tests of workflow step 10 pass; after an adapter change the drill passed on iOS and Android,\n      or the report says it is owed.\n- [ ] `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-media.mjs .` prints `RESULT: PASS`. Expected only before the\n      app config exists: `SKIP app.config.ts [unused-permission] not yet created\n      (app-variants-and-environment creates it)`. An app without media code prints `NOT APPLICABLE: no\n      source file under src\u002F imports expo-image, expo-image-picker, expo-camera, expo-image-manipulator,\n      expo-media-library, expo-file-system, and there is no src\u002Fservices\u002Fmedia-store\u002F`.\n\n## Anti-patterns\n\n- **Saving `asset.uri` from the picker in a record.** It is a cache file the system purges, at an\n  absolute path that changes; import it and store the MediaRef.\n- **`base64: true` \"to upload it easily\", or a `data:image` URI.** Megabytes on the JS heap, decoded\n  twice, no cache; upload the stored file with `FileTransferPort`.\n- **Opening the picker in `useEffect` when a screen mounts.** It reopens after a cancel and on every\n  focus; open it from the press.\n- **Calling `requestCameraPermissionsAsync` in a screen.** No explanation, no blocked state; the gate.\n- **`cameraPermission: false` on the picker in an app with an expo-camera scanner.** The option strips\n  `CAMERA` from the merged manifest for every package; the scanner can never be granted.\n- **`granularPermissions` left at the default in a save-only app.** It declares `READ_MEDIA_IMAGES` and\n  `READ_MEDIA_VIDEO`, which Play reviews under its Photo and Video Permissions policy.\n- **Overwriting `photo.jpg` after a crop.** Every view keeps the old image; a new ref per change.\n- **Deleting the file, then saving the record.** A crash leaves a record pointing at nothing; record\n  first, the sweep removes leftovers.\n- **Shipping full-size camera photos.** 5 to 10 MB per file, 49 MB per decode, Android's 25 MB backup\n  quota gone after a few photos; downscale once on import.\n- **Sharing the picked original.** It carries the GPS position; share the stored, re-encoded file.\n- **`allowDownscaling={false}` or `contentFit=\"none\"` in a list.** Full-size decodes per cell.\n- **`saveToLibraryAsync` or `readAsStringAsync` from the main entries.** They throw in SDK 57; use the\n  object APIs.\n- **A second expo-sharing adapter.** Reuse data-export-and-restore's `ShareSheetPort`.\n\n## Files in this skill\n\n| File | What it is | Read\u002Frun when |\n|---|---|---|\n| [references\u002Fdisplaying-images.md](references\u002Fdisplaying-images.md) | expo-image API, sizing, cache policies, recycling, memory arithmetic, names, remote images, placeholders, platform differences, pitfalls | Workflow step 1, any image on screen |\n| [references\u002Fpicking-and-capturing.md](references\u002Fpicking-and-capturing.md) | Picker and camera API, permissions per platform (read in the native sources), the gate, Android's lost activity, returned files, app config, expo-camera | Workflow steps 1-3, 5, 8 |\n| [references\u002Ffiles-and-storage.md](references\u002Ffiles-and-storage.md) | The folders, MediaRef, the import, no overwrite, owners and the sweep, disk space and backups, the SDK 57 file-system API and its throwing legacy names, backups and media | Workflow steps 1, 6-7 |\n| [references\u002Fsharing-and-transfer.md](references\u002Fsharing-and-transfer.md) | Share sheet, saving to Photos (expo-media-library 57), the file-transfer port, privacy, receiving images | Workflow step 9 |\n| [references\u002Ftesting-and-checker.md](references\u002Ftesting-and-checker.md) | The shipped tests, testing with fakes, the media drill on named devices, every check-media rule with its fix, configuration | Workflow steps 10-12 |\n| `templates\u002Fsrc\u002Fcore\u002Fmedia\u002F` | `media-ref.ts` (MediaRef, extensions), `image-fit.ts` (fit, decoded bytes, `MEDIA_LIMITS`), `media-sweep.ts` (the sweep plan), each with its test | Workflow step 4 |\n| `templates\u002Fsrc\u002Fservices\u002F` | `media-picker\u002F`, `media-store\u002F`, `image-resizer\u002F`: ports, the picker and file-system adapters, fakes with tests | Workflow steps 4, 6 |\n| `templates\u002Fsrc\u002Fdata\u002Fmedia\u002F` | `media-importer.ts` (pick, downscale, store, discard; all or nothing; protected from the sweep from the moment each file is stored until the process ends) and `media-sweeper.ts` (stale partials, orphans), with tests | Workflow steps 4, 6 |\n| `templates\u002Fsrc\u002Fui\u002Fmedia\u002F` | `stored-image.tsx` (sized, memory-cached, recycled, named) and its test | Workflow step 4 |\n| `examples\u002Fsrc\u002Fservices\u002F` | `image-resizer\u002F` (expo-image-manipulator adapter), `photo-saver\u002F` (expo-media-library port and adapter), `file-transfer\u002F` (upload and download port and adapter), type-checked against their SDK 57 packages | Workflow steps 4, 9 |\n| `examples\u002Fsrc\u002Ffeatures\u002Ftasks\u002F` | A task's photos: model hook (the camera through `usePermissionGate`) and its test (allowed, refused, rationale, blocked, failed save), press jobs (import, save, remove, share), the photo strip (a FlatList: the list is bounded) | Workflow step 8 |\n| `examples\u002Fcontracts\u002Farchitecture.json` | The vendor SDK entries to merge | Workflow step 3 |\n| `examples\u002Ftask-photos-messages.en.json` | The example's catalog keys | Workflow step 8 |\n| `scripts\u002Fcheck-media.mjs` | The checker (15 rules; `--json`) | Workflow step 12, and at the end |\n| `scripts\u002Flib\u002Fmedia-rules.mjs` | The checker's rules | Never by hand |\n| `scripts\u002Flib\u002Fsource-scan.mjs` | Shared source scanner, synced from the library (do not edit here) | Never by hand |\n| `scripts\u002Fcheck-lib.mjs` | Shared script helper, synced from the library (do not edit here) | Never by hand |\n| `scripts\u002Fselftest.mjs` | Proves the checker passes the templates and examples and catches every planted bug | After changing a script, a template or an example |\n| `assets\u002Fshared.json` | The shared files this skill copies in | When adding a shared file |\n| `assets\u002Ftemplate-placeholders.json` | Template placeholder values (none) | When adding a placeholder |\n| `tests\u002F` | The fixture app (`bases\u002Fapp`) and the overlay cases of check-media (one planted bug per rule) | When adding a rule |\n\n## Related skills\n\n- `icons-app-icon-and-splash` - icons, the logo and illustrations drawn in code; bundled art.\n- `permissions-and-system-prompts` - the camera and photo-library permission gate.\n- `data-export-and-restore` - `ShareSheetPort`, backups (media refs vs files).\n- `architecture-and-boundaries` - ports, adapters, SDK classification, the composition root.\n- `persistence-and-migrations` - the MediaRef columns and their migrations.\n- `networking-and-server-state` - the ApiClient beside the file-transfer transport.\n- `privacy-and-store-declarations` - Photos or Videos in the store answers, the network audit.\n- `performance-budgets` - the memory budget and how to measure it on devices.\n- `accessibility-as-code` - image names, Reduce Motion for transitions.\n- `react-components-and-hooks` - lists, effects, `useIsAppActive` for a camera view.\n- `expo-prebuild-and-config-plugins`, `i18n-strings-and-catalogs` - plugin listing and purpose texts.\n- `auth-and-secure-storage` - headers for private images, clearing caches on sign-out.\n- `unit-and-component-tests`, `e2e-maestro` - test conventions and device flows.\n- `ios-simulator-build`, `android-emulator-build` - the builds the drill installs.\n",{"name":5,"description":7},"main","41a0e66d4d09de5b46e6537f59a97c7192473486","skills\u002Fmedia-images-and-files",2,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills","https:\u002F\u002Fzakaria.dev\u002FReactNative-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fzakariaf","https:\u002F\u002Fzakaria.dev","Seniore Software Engineer","2026-10-22 07:05:00",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add zakariaf\u002FReactNative-Skills --skill media-images-and-files",{"tool":40,"command":41},"bunx","bunx skills add zakariaf\u002FReactNative-Skills --skill media-images-and-files",{"tool":43,"command":44},"pnpm","pnpm dlx skills add zakariaf\u002FReactNative-Skills --skill media-images-and-files","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002FSKILL.md",true,[48,54,58,64,70,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"assets\u002Fshared.json","ASSET","资产文件",155,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fassets\u002Fshared.json",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"assets\u002Ftemplate-placeholders.json",3,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fassets\u002Ftemplate-placeholders.json",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"examples\u002Fcontracts\u002Farchitecture.json","REFERENCE","参考文档",645,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fcontracts\u002Farchitecture.json",{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"examples\u002Fsrc\u002Ffeatures\u002Ftasks\u002Fcomponents\u002Ftask-photo-strip.tsx","OTHER","其他",1776,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Ffeatures\u002Ftasks\u002Fcomponents\u002Ftask-photo-strip.tsx",{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"examples\u002Fsrc\u002Ffeatures\u002Ftasks\u002Ftask-photos-jobs.ts","SCRIPT","脚本",5403,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Ffeatures\u002Ftasks\u002Ftask-photos-jobs.ts",{"path":77,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":78,"sourceHtmlUrl":79},"examples\u002Fsrc\u002Ffeatures\u002Ftasks\u002Fuse-task-photos-model.test.tsx",6529,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Ffeatures\u002Ftasks\u002Fuse-task-photos-model.test.tsx",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"examples\u002Fsrc\u002Ffeatures\u002Ftasks\u002Fuse-task-photos-model.ts",5875,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Ffeatures\u002Ftasks\u002Fuse-task-photos-model.ts",{"path":85,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":86,"sourceHtmlUrl":87},"examples\u002Fsrc\u002Fservices\u002Ffile-transfer\u002Fexpo-file-system-file-transfer-adapter.ts",4203,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Fservices\u002Ffile-transfer\u002Fexpo-file-system-file-transfer-adapter.ts",{"path":89,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":90,"sourceHtmlUrl":91},"examples\u002Fsrc\u002Fservices\u002Ffile-transfer\u002Ffile-transfer-port.ts",2539,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Fservices\u002Ffile-transfer\u002Ffile-transfer-port.ts",{"path":93,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":94,"sourceHtmlUrl":95},"examples\u002Fsrc\u002Fservices\u002Fimage-resizer\u002Fexpo-image-manipulator-image-resizer-adapter.ts",2942,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Fservices\u002Fimage-resizer\u002Fexpo-image-manipulator-image-resizer-adapter.ts",{"path":97,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":98,"sourceHtmlUrl":99},"examples\u002Fsrc\u002Fservices\u002Fphoto-saver\u002Fexpo-media-library-photo-saver-adapter.ts",2334,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Fservices\u002Fphoto-saver\u002Fexpo-media-library-photo-saver-adapter.ts",{"path":101,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":102,"sourceHtmlUrl":103},"examples\u002Fsrc\u002Fservices\u002Fphoto-saver\u002Fphoto-saver-port.ts",832,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Fsrc\u002Fservices\u002Fphoto-saver\u002Fphoto-saver-port.ts",{"path":105,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":106,"sourceHtmlUrl":107},"examples\u002Ftask-photos-messages.en.json",728,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fexamples\u002Ftask-photos-messages.en.json",{"path":109,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Fdisplaying-images.md",12817,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Freferences\u002Fdisplaying-images.md",{"path":113,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Ffiles-and-storage.md",14715,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Freferences\u002Ffiles-and-storage.md",{"path":117,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Fpicking-and-capturing.md",17179,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Freferences\u002Fpicking-and-capturing.md",{"path":121,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":122,"sourceHtmlUrl":123},"references\u002Fsharing-and-transfer.md",12535,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Freferences\u002Fsharing-and-transfer.md",{"path":125,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Ftesting-and-checker.md",14979,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Freferences\u002Ftesting-and-checker.md",{"path":129,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":130,"sourceHtmlUrl":131},"scripts\u002Fcheck-lib.mjs",119923,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fscripts\u002Fcheck-lib.mjs",{"path":133,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":134,"sourceHtmlUrl":135},"scripts\u002Fcheck-media.mjs",10058,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fscripts\u002Fcheck-media.mjs",{"path":137,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":138,"sourceHtmlUrl":139},"scripts\u002Flib\u002Fmedia-rules.mjs",27202,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fscripts\u002Flib\u002Fmedia-rules.mjs",{"path":141,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":142,"sourceHtmlUrl":143},"scripts\u002Flib\u002Fsource-scan.mjs",35908,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fscripts\u002Flib\u002Fsource-scan.mjs",{"path":145,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":146,"sourceHtmlUrl":147},"scripts\u002Fselftest.mjs",818,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Fscripts\u002Fselftest.mjs",{"path":149,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":150,"sourceHtmlUrl":151},"templates\u002Fsrc\u002Fcore\u002Fmedia\u002Fimage-fit.test.ts",3174,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fcore\u002Fmedia\u002Fimage-fit.test.ts",{"path":153,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":154,"sourceHtmlUrl":155},"templates\u002Fsrc\u002Fcore\u002Fmedia\u002Fimage-fit.ts",2620,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fcore\u002Fmedia\u002Fimage-fit.ts",{"path":157,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":158,"sourceHtmlUrl":159},"templates\u002Fsrc\u002Fcore\u002Fmedia\u002Fmedia-ref.test.ts",2640,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fcore\u002Fmedia\u002Fmedia-ref.test.ts",{"path":161,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":162,"sourceHtmlUrl":163},"templates\u002Fsrc\u002Fcore\u002Fmedia\u002Fmedia-ref.ts",3761,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fcore\u002Fmedia\u002Fmedia-ref.ts",{"path":165,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":166,"sourceHtmlUrl":167},"templates\u002Fsrc\u002Fcore\u002Fmedia\u002Fmedia-sweep.test.ts",1717,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fcore\u002Fmedia\u002Fmedia-sweep.test.ts",{"path":169,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":170,"sourceHtmlUrl":171},"templates\u002Fsrc\u002Fcore\u002Fmedia\u002Fmedia-sweep.ts",2315,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fcore\u002Fmedia\u002Fmedia-sweep.ts",{"path":173,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":174,"sourceHtmlUrl":175},"templates\u002Fsrc\u002Fdata\u002Fmedia\u002Fmedia-importer.test.ts",8253,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fdata\u002Fmedia\u002Fmedia-importer.test.ts",{"path":177,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":178,"sourceHtmlUrl":179},"templates\u002Fsrc\u002Fdata\u002Fmedia\u002Fmedia-importer.ts",5592,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fdata\u002Fmedia\u002Fmedia-importer.ts",{"path":181,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":182,"sourceHtmlUrl":183},"templates\u002Fsrc\u002Fdata\u002Fmedia\u002Fmedia-sweeper.test.ts",3007,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fdata\u002Fmedia\u002Fmedia-sweeper.test.ts",{"path":185,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":186,"sourceHtmlUrl":187},"templates\u002Fsrc\u002Fdata\u002Fmedia\u002Fmedia-sweeper.ts",2574,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fdata\u002Fmedia\u002Fmedia-sweeper.ts",{"path":189,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":190,"sourceHtmlUrl":191},"templates\u002Fsrc\u002Fservices\u002Fimage-resizer\u002Ffake-image-resizer.test.ts",1194,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fimage-resizer\u002Ffake-image-resizer.test.ts",{"path":193,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":194,"sourceHtmlUrl":195},"templates\u002Fsrc\u002Fservices\u002Fimage-resizer\u002Ffake-image-resizer.ts",1635,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fimage-resizer\u002Ffake-image-resizer.ts",{"path":197,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":198,"sourceHtmlUrl":199},"templates\u002Fsrc\u002Fservices\u002Fimage-resizer\u002Fimage-resizer-port.ts",1469,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fimage-resizer\u002Fimage-resizer-port.ts",{"path":201,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":202,"sourceHtmlUrl":203},"templates\u002Fsrc\u002Fservices\u002Fmedia-picker\u002Fexpo-image-picker-media-picker-adapter.ts",4860,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fmedia-picker\u002Fexpo-image-picker-media-picker-adapter.ts",{"path":205,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":206,"sourceHtmlUrl":207},"templates\u002Fsrc\u002Fservices\u002Fmedia-picker\u002Ffake-media-picker.test.ts",2359,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fmedia-picker\u002Ffake-media-picker.test.ts",{"path":209,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":210,"sourceHtmlUrl":211},"templates\u002Fsrc\u002Fservices\u002Fmedia-picker\u002Ffake-media-picker.ts",2999,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fmedia-picker\u002Ffake-media-picker.ts",{"path":213,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":214,"sourceHtmlUrl":215},"templates\u002Fsrc\u002Fservices\u002Fmedia-picker\u002Fmedia-picker-port.ts",2677,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fmedia-picker\u002Fmedia-picker-port.ts",{"path":217,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":218,"sourceHtmlUrl":219},"templates\u002Fsrc\u002Fservices\u002Fmedia-store\u002Fexpo-file-system-media-store-adapter.ts",5435,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fmedia-store\u002Fexpo-file-system-media-store-adapter.ts",{"path":221,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":222,"sourceHtmlUrl":223},"templates\u002Fsrc\u002Fservices\u002Fmedia-store\u002Ffake-media-store.test.ts",3158,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fmedia-store\u002Ffake-media-store.test.ts",{"path":225,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":226,"sourceHtmlUrl":227},"templates\u002Fsrc\u002Fservices\u002Fmedia-store\u002Ffake-media-store.ts",3668,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fmedia-store\u002Ffake-media-store.ts",{"path":229,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":230,"sourceHtmlUrl":231},"templates\u002Fsrc\u002Fservices\u002Fmedia-store\u002Fmedia-store-port.ts",2764,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fservices\u002Fmedia-store\u002Fmedia-store-port.ts",{"path":233,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":234,"sourceHtmlUrl":235},"templates\u002Fsrc\u002Fui\u002Fmedia\u002Fstored-image.test.tsx",1309,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fui\u002Fmedia\u002Fstored-image.test.tsx",{"path":237,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":238,"sourceHtmlUrl":239},"templates\u002Fsrc\u002Fui\u002Fmedia\u002Fstored-image.tsx",1743,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftemplates\u002Fsrc\u002Fui\u002Fmedia\u002Fstored-image.tsx",{"path":241,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":242,"sourceHtmlUrl":243},"tests\u002Fbases\u002Fapp\u002Fapp.config.ts",971,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftests\u002Fbases\u002Fapp\u002Fapp.config.ts",{"path":245,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":246,"sourceHtmlUrl":247},"tests\u002Fbases\u002Fapp\u002Fpackage.json",301,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftests\u002Fbases\u002Fapp\u002Fpackage.json",{"path":249,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":250,"sourceHtmlUrl":251},"tests\u002Fbases\u002Fapp\u002Ftsconfig.json",147,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftests\u002Fbases\u002Fapp\u002Ftsconfig.json",{"path":253,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":254,"sourceHtmlUrl":255},"tests\u002Ffixtures\u002Fcheck-media\u002FCASES.json",33672,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftests\u002Ffixtures\u002Fcheck-media\u002FCASES.json",{"path":257,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":258,"sourceHtmlUrl":259},"tests\u002Ffixtures\u002Fcheck-media\u002Fgood\u002FEXPECT.txt",27,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftests\u002Ffixtures\u002Fcheck-media\u002Fgood\u002FEXPECT.txt",{"path":261,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":262,"sourceHtmlUrl":263},"tests\u002Ffixtures\u002Fcheck-media\u002FSUITE.json",145,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fmedia-images-and-files\u002Ftests\u002Ffixtures\u002Fcheck-media\u002FSUITE.json",[265,272,278,285,292,299],{"skillNo":266,"name":267,"nameZh":6,"description":268,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":269,"categories":270,"keywords":271,"publishedAt":19},"01M7F2S4KZG97D21GEJ2GKKYK1","demo","Planted skill folder (never scanned).","https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-support\u002Ftests\u002Fbases\u002Fapp\u002Fskills\u002Fdemo\u002FSKILL.md",[],[],{"skillNo":273,"name":267,"nameZh":6,"description":274,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":275,"categories":276,"keywords":277,"publishedAt":19},"01M7F2S1F4ATZ49909EDKWA9E6","Planted installed skill (its files must never be scanned).","https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-support\u002Ftests\u002Fbases\u002Fapp\u002F.agents\u002Fskills\u002Fdemo\u002FSKILL.md",[],[],{"skillNo":279,"name":280,"nameZh":6,"description":281,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":282,"categories":283,"keywords":284,"publishedAt":19},"01M7F2RXGPZJ5Q1FV2HQ1PJ6AX","web-support","Ships the web build of an Expo app: platform files, APIs missing in react-native-web, expo-sqlite headers. Use when adding web, a .web.tsx file or expo export --platform web. Not for responsive layout (adaptive-layout).","https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-support\u002FSKILL.md",[],[],{"skillNo":286,"name":287,"nameZh":6,"description":288,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":289,"categories":290,"keywords":291,"publishedAt":19},"01M7F2RQ43JFA4QFWQEHBET08G","value-objects-money-and-units","Stores money as ISO 4217 minor units, quantities in canonical units, instants as epoch ms. Use when adding a price, currency, tax, split, unit or timestamp, or a total is a cent off. Not for calendar days (dates-streaks-and-statistics).","https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalue-objects-money-and-units\u002FSKILL.md",[],[],{"skillNo":293,"name":294,"nameZh":6,"description":295,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":296,"categories":297,"keywords":298,"publishedAt":19},"01M7F2RHR7H8VVZDP16FJNJV11","unit-and-component-tests","Sets up Jest, checks unit, component and route tests (RNTL 14, renderWithProviders, SDK mocks, fakes, fast-check, Stryker). Use when writing a test or mock, or Jest fails or flakes. Not for goldens (golden-and-snapshot-tests).","https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Funit-and-component-tests\u002FSKILL.md",[],[],{"skillNo":300,"name":301,"nameZh":6,"description":302,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":303,"categories":304,"keywords":305,"publishedAt":19},"01M7F2RAEDWQ6H4514HFRWJAE6","ui-states-and-feedback","Builds loading, empty, failed and offline states, delayed skeletons, toasts, banners, confirms, Undo. Use when a screen loads data, shows a spinner, toast, retry or delete prompt. Not for failure values (error-handling-typed-results).","https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fui-states-and-feedback\u002FSKILL.md",[],[]]