[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F2D233GC4YMKXZWGP70P55":3,"skill-same:01M7F2D233GC4YMKXZWGP70P55":195},{"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},"01M7F2D233GC4YMKXZWGP70P55","golden-and-snapshot-tests",null,"Guards data and pixel goldens - *.golden.test.ts snapshots, append-only [contract] entries, Skia tolerance, jest -u rules. Use when adding a golden or snapshot test or a .snap diff appears. Not for device screenshots (e2e-maestro).","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\u002Fgolden-and-snapshot-tests\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: golden-and-snapshot-tests\ndescription: Guards data and pixel goldens - *.golden.test.ts snapshots, append-only [contract] entries, Skia tolerance, jest -u rules. Use when adding a golden or snapshot test or a .snap diff appears. Not for device screenshots (e2e-maestro).\n---\n\n# Golden and snapshot tests\n\nGoldens are the frozen answers of an app: the readable text a pure unit produces for fixed inputs,\nthe output every installed version must reproduce, the pixels a Skia surface draws. They change only\non purpose, after a real look, in a commit that says why, and contract entries never change at all.\nThis skill writes them in the Jest `golden` project and its two checkers prove that the tree and the\ngit history keep that policy.\n\n## Rules that must hold\n\n1. **A golden changes only by hand, one file at a time:** `npx jest \u003Cfile> --selectProjects golden -u`,\n   path first. Every script, hook and CI job runs `jest --ci`, which refuses to write a missing\n   snapshot. No `-u`, `--updateSnapshot`, `--ci=false`, `CI=false` or baseline `--update` in\n   `package.json`, git hooks (lefthook, husky, lint-staged), CI (GitHub Actions, EAS Workflows) or\n   agent hooks. Why: an agent rubber-stamps whatever `-u` writes, and after `--selectProjects` a path\n   is read as another project name, so every golden is rewritten (verified with `--listTests`).\n2. **Look before accepting.** Read the `.snap.ios` diff line by line, open every new or changed PNG\n   and its diff image, then `CI=1 npx jest --ci --selectProjects golden` passes. Why: an unread golden\n   freezes a bug for every later run.\n3. **Every commit that adds, changes or deletes a golden path carries\n   `Gate-Change: \u003Cwhich goldens, why, what you looked at>`** (at least 10 characters). Golden paths:\n   `**\u002F*.golden.test.ts.snap(.ios|.android)`, `**\u002F__image_snapshots__\u002F**`, the pixel matcher\n   `test\u002Fgoldens\u002Fskia-golden.ts`, `.maestro\u002Fbaselines\u002F**`, plus `goldenPaths` in\n   `contracts\u002Fgoldens.json`. Why: one `git log --grep='^Gate-Change:'` lists every gate change later.\n4. **`[contract]` entries are append-only.** Output that every installed version, every device or a\n   file a user keeps must reproduce exactly (a backup or export format, a share code, a derived\n   identifier such as a scheduled notification id, a date-keyed pick) is pinned in a describe titled\n   `[contract] \u003Cunit> goldens`, registered in `contracts\u002Fgoldens.json`, with at least three keys and,\n   for date keys, a year-end\u002Fnew-year pair. An existing entry is never edited, deleted or renamed, not\n   even with a trailer; adding keys is fine. If the producing code must change, stop and ask: ship a\n   versioned format next to the old one, or switch inputs from a future date. Why: users on the old\n   and the new version would get different results from the same input; renaming a title deletes\n   the entry (the key is the title).\n5. **Data goldens are readable text from pure code.** `\u003Cunit>.golden.test.ts` next to the unit, one\n   string per case (a header line with the inputs and headline numbers, then short lines or an ASCII\n   grid), stored by jest-expo as `\u003Cfile>.golden.test.ts.snap.ios` next to the test; at most 120 lines\n   per entry (aim for 60); no clock, machine locale or unseeded randomness; no rendering. Why: a golden\n   is reviewed by reading its diff, and a machine-dependent golden differs between runs.\n6. **No component-tree snapshots and no inline snapshots, anywhere.** A `.snap` of a non-golden test\n   is deleted and replaced by assertions on roles and text; `toMatchInlineSnapshot` is never used.\n   Why: component trees churn on every style change and train `-u` reflexes; `-u` would rewrite the\n   test file itself, and Jest 29 with Prettier 3 fails the suite outright (verified).\n7. **Pixel goldens (apps that draw with Skia) render the production draw function** offscreen in the\n   CanvasKit `golden` project, under `test\u002Fgoldens\u002F`, at three canvas sizes (narrow 320x400, phone\n   390x560, tablet 1024x700; a fixed-size drawing says `\u002F\u002F fixed-size: \u003Cwhy>`, and a pipeline smoke\n   test that draws a function defined in the test is exempt) and, when it animates,\n   at moments 0, 0.5 and 1, with fonts loaded explicitly, through the one matcher\n   `test\u002Fgoldens\u002Fskia-golden.ts` (`toMatchPixelGolden`), never a per-call threshold.\n   `jest-image-snapshot` 6.5.2 and `@types\u002Fjest-image-snapshot` 6.4.2 are pinned exactly. Why: goldens\n   catch what assertions forget only when they draw what users see, at the sizes they see it.\n8. **Tolerances are gates:** 0.1% of pixels for Skia goldens (the matcher), 0.2% for simulator and\n   emulator screenshots (e2e-maestro). Never raise one to hide a diff; a raise needs the reviewer's\n   agreement first, then the matcher and `contracts\u002Fgoldens.json` `maxPixelTolerance` change together\n   in a commit with `Gate-Change: \u003Cname> \u003Cold> -> \u003Cnew> approved by \u003Creviewer>: \u003Creason>`. Why: a\n   raised tolerance silently accepts every future regression below it.\n9. **Snapshots never outlive their tests and diffs never reach git.** An obsolete entry is removed with\n   `-u` on that one file; an orphan `.snap` or baseline PNG is deleted with its test\n   (`baseline-orphan`); `.gitignore` lists `reports\u002F` and `**\u002F__image_snapshots__\u002F__diff_output__\u002F`; `quality-gates.json` `gatedPaths` lists the golden paths.\n   Why: an obsolete entry makes `jest --ci` exit 1 even when every test passed (verified), and a\n   golden path missing from the gate is changed without a trailer.\n10. **A failing golden is investigated, not re-accepted.** Decide: a bug (fix the code, keep the\n    golden), intended (update that one file, rules 1 to 3) or a contract entry (always a bug). A\n    golden that differs between two runs of the same commit means the code reads time or randomness.\n    Why: the generators, formatters and CanvasKit are deterministic, so noise is a bug.\n\n## Workflow\n\n1. **Know the policy** once per session: read [references\u002Fgolden-policy.md](references\u002Fgolden-policy.md)\n   (the kinds of golden, where each lives, the only way to change one, contract entries, failure\n   triage, iOS and Android notes, \"When multi-package\").\n2. **Pick the kind.** Readable output a reviewer checks: a data golden. Output installed versions\n   must reproduce: a `[contract]` describe in a data golden. A Skia surface: a pixel golden. A whole\n   screen on a device: a screenshot baseline (e2e-maestro). Seeded generator output: golden vectors\n   (seeded-determinism-and-golden-vectors). Then read\n   [references\u002Fdata-goldens.md](references\u002Fdata-goldens.md) or\n   [references\u002Fpixel-goldens.md](references\u002Fpixel-goldens.md).\n3. **A data golden:** if `test\u002Fgoldens\u002Fgolden-text.ts` is missing, copy it and its test from\n   `templates\u002Ftest\u002Fgoldens\u002F`. Imitate `templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts`\n   (the digest unit and its reviewed `.snap.ios` show a complete, verified pair): a `describe\u003CUnit>()`\n   function that returns one string, fixed inputs, titles that start with a third-person verb.\n4. **A contract:** put its cases in `describe('[contract] \u003Cunit> goldens', ...)`, pin at least three\n   keys (a year-end\u002Fnew-year pair for date keys, and a leap day), and register it in\n   `contracts\u002Fgoldens.json` (the first time, copy `templates\u002Fcontracts\u002Fgoldens.json` and its schema and\n   replace the sample digest entry with yours; the checker fails a marked describe the register does\n   not list, and an app with no contract needs no register). [examples\u002Fbackup-envelope.golden.test.ts](examples\u002Fbackup-envelope.golden.test.ts)\n   shows a format contract.\n5. **A pixel golden:** if `test\u002Fgoldens\u002Fskia-golden.ts` is missing, copy\n   [templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts](templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts) and run\n   `npm install --save-dev --save-exact jest-image-snapshot@6.5.2 @types\u002Fjest-image-snapshot@6.4.2`\n   (without the types, `npm run typecheck` fails with TS7016). The surface's golden test, draw code and\n   layout come from skia-canvas-rendering's template.\n6. **Create the goldens deliberately:** `npx jest \u003Cfile> --selectProjects golden --listTests` (it must\n   list only that file), then `npx jest \u003Cfile> --selectProjects golden -u`. Read every new entry or\n   open every new PNG with your file-reading tool, compare it with what users should get, then\n   `CI=1 npx jest --ci --selectProjects golden`.\n7. **Check the tree:** `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-goldens.mjs .` and fix every `FAIL`\n   line (file, rule, fix); rerun until `RESULT: PASS`. Rules and options:\n   [references\u002Fcheckers.md](references\u002Fcheckers.md).\n8. **Commit with the trailer** ([examples\u002Fgate-change-commit.txt](examples\u002Fgate-change-commit.txt)):\n   write the message to a file, stage, run\n   `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-golden-changes.mjs . --staged --message \u003Cfile>`, commit. At\n   the end of the session run it with `--range \u003Cbase>..HEAD` (base: the commit before the session's\n   first); in CI, `--range origin\u002Fmain..HEAD`.\n9. **When a golden fails later:** follow \"When a golden fails\" in the policy reference. Bug: fix the\n   code. Intended: step 6 for that one file, then step 8. A contract entry changed: revert, or stop and\n   ask the reviewer. A wide re-acceptance (a Skia or font upgrade) follows run-goldens-rebaseline;\n   after a Jest major (SDK 58 brings Jest 30) every file fails on its header: \"Jest upgrades\" in the policy.\n\n## Definition of done\n\n- [ ] Every data golden has its `.snap.ios`, every pixel golden its baselines, and\n      `CI=1 npx jest --ci --selectProjects golden` passes with no obsolete snapshot.\n- [ ] Every new or changed entry was read and every new or changed PNG opened; the report names them\n      and why they changed.\n- [ ] Every contract is registered in `contracts\u002Fgoldens.json`, pins at least three keys (a\n      year-boundary pair for date keys), and no existing `[contract]` entry changed.\n- [ ] No script, hook or CI job writes goldens; no tolerance went up without an approval trailer.\n- [ ] Every golden change sits in a commit with a `Gate-Change:` trailer, and\n      `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-golden-changes.mjs . --range \u003Cbase>..HEAD` prints\n      `RESULT: PASS`.\n- [ ] `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-goldens.mjs .` prints `RESULT: PASS` (allowed while\n      adopting: `SKIP quality-gates.json [gated-path-missing] not yet created (quality-gates creates it)`,\n      `SKIP .gitignore [diff-output-ignored] not yet created (typescript-and-lint-rules creates it)`)\n\n## Anti-patterns\n\n- **`npx jest -u` to make a red suite green.** It rewrites every golden that differs, bugs included.\n  Read the failure, fix the code, and update only the one file you meant to change.\n- **`npx jest --selectProjects golden \u003Cfile> -u`.** The path becomes a second project name and every\n  golden is rewritten. Put the path first and preview with `--listTests`.\n- **Editing a `.snap.ios` by hand.** The next `-u` or a renamed test undoes it, and it hides what the\n  code really produces. Change the code, then regenerate that file.\n- **Re-accepting a `[contract]` entry \"because the format improved\".** Installed versions and files\n  users kept still expect the old output. Version the format or ask the reviewer.\n- **Renaming a contract describe \"for consistency\".** The snapshot key is the title, so the history\n  check sees the old entry deleted. Keep the title; add a comment instead.\n- **A 400-line JSON dump as a golden.** Nobody reviews it, so any change gets accepted. Describe the\n  output as a header line and the fields that matter.\n- **`expect(screen.toJSON()).toMatchSnapshot()` on a component.** It churns on every style tweak.\n  Assert roles and text (unit-and-component-tests); screens are covered by screenshots.\n- **`new Date()` or `toLocaleDateString()` in a golden.** It passes today on this machine only. Pass a\n  date key or an instant literal and an explicit locale.\n- **`failureThreshold: 0.01` in a test \"because CanvasKit is noisy\".** CanvasKit renders are\n  byte-identical run to run; noise means the draw path reads time or randomness.\n- **A pixel golden at one size or without the 0 and 1 moments.** Clipping at narrow sizes and wrong\n  start or end states are the most common canvas bugs.\n\n## Files in this skill\n\n| File | What it is | Read\u002Frun when |\n|---|---|---|\n| [references\u002Fgolden-policy.md](references\u002Fgolden-policy.md) | The kinds of golden and where they live, the only way to change one (verified Jest facts), gated paths and the trailer, contract entries, failure triage, obsolete and orphan snapshots, Jest upgrades (the snapshot header), iOS and Android, When multi-package | Workflow step 1, and whenever a golden fails |\n| [references\u002Fdata-goldens.md](references\u002Fdata-goldens.md) | What deserves a data golden, readable text, the template pair, the snapshot file, reading a diff, writing and evolving contracts, formats worth pinning, the games appendix | Workflow steps 3 and 4 |\n| [references\u002Fpixel-goldens.md](references\u002Fpixel-goldens.md) | The golden project and matcher, sizes and moments, fonts, accepting baselines, reading a failure, Skia upgrades, screenshot baselines on iOS and Android, headless previews | Workflow step 5 |\n| [references\u002Fcheckers.md](references\u002Fcheckers.md) | Both checkers: rules, options, rn-skills.config.json keys, the contract file, SKIP lines, the log capture, CI use, troubleshooting | Workflow steps 7 and 8 |\n| `templates\u002Ftest\u002Fgoldens\u002Fgolden-text.ts` | `headerLine`, `goldenText`, `renderGrid`: readable golden text | Workflow step 3, when missing |\n| `templates\u002Ftest\u002Fgoldens\u002Fgolden-text.test.ts` | Its unit test | Copied with it |\n| [templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts](templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts) | `toMatchPixelGolden`: 0.1% of pixels, diffs to `reports\u002Fvisual\u002Fdiff\u002F` (canonical, synced; this skill owns it) | Workflow step 5, when missing |\n| `templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.ts` | A pure Tasks unit to pin: the daily digest plan and its notification id | Workflow step 3, as the shape of a pinned unit |\n| `templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts` | The data golden pattern: a describe function, fixed inputs, a `[contract]` describe | Workflow steps 3 and 4 |\n| `templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts.snap.ios` | Its reviewed snapshot (what readable entries look like) | Workflow step 3 |\n| `templates\u002Fcontracts\u002Fgoldens.json` | The contract register both checkers read; its digest entry is a sample to replace (canonical, synced; this skill owns it) | Workflow step 4 |\n| `templates\u002Fcontracts\u002Fgoldens.schema.json` | Its JSON schema (keys and meaning; canonical, synced) | Workflow step 4 |\n| [examples\u002Fbackup-envelope.golden.test.ts](examples\u002Fbackup-envelope.golden.test.ts) | A format contract: backup format 1 pinned for boundary inputs | Workflow step 4 |\n| [examples\u002Fbackup-envelope.golden.test.ts.snap.ios](examples\u002Fbackup-envelope.golden.test.ts.snap.ios) | Its snapshot | Workflow step 4 |\n| [examples\u002Fgate-change-commit.txt](examples\u002Fgate-change-commit.txt) | Commit messages with the Gate-Change trailer (created, re-accepted, contract key added, tolerance approved) | Workflow step 8 |\n| `scripts\u002Fcheck-goldens.mjs` | Checks the tree: snapshots present, readable and owned, no component or inline snapshots, no ambient input or UI in goldens, contracts, pixel matcher, sizes, baselines, no automated `-u`, `jest --ci` everywhere, gated paths, ignored diffs | Workflow step 7 and the definition of done |\n| `scripts\u002Fcheck-golden-changes.mjs` | Checks commits or the staged change: Gate-Change trailers, `[contract]` entries never edited or deleted, tolerances never raised without approval | Workflow step 8 and the definition of done |\n| `scripts\u002Flib\u002Fgolden-config.mjs` | The checkers' shared reader of paths, rn-skills.config.json keys and `contracts\u002Fgoldens.json` | When a checker changes |\n| `scripts\u002Fselftest.mjs` | Proves both checkers pass the templates and catch every planted bug | After changing a checker or a template |\n| `scripts\u002Fcheck-lib.mjs` | Shared script library (synced; do not edit here) | Never by hand |\n| `assets\u002Fshared.json` | Declares the synced files (check-lib, the pixel matcher, the register and its schema) | When adding a shared file |\n| `assets\u002Ftemplate-placeholders.json` | The placeholder values the template verification and the self-test use | When adding a placeholder |\n| `tests\u002Fbases\u002Fapp\u002F` | The minimal app the fixtures lay the templates on | When the fixture base changes |\n| `tests\u002Ffixtures\u002F` | Overlay suites: `good\u002F`, one `bad-*` per rule, `pass-*` and `error-*` cases; real `git log` captures for the history checker | When adding a checker rule |\n\n## Related skills\n\n- `unit-and-component-tests` - the Jest projects (the golden project's config), component tests and their `component-snapshot` rule.\n- `run-goldens-rebaseline` - the manual ritual for re-accepting many goldens at once.\n- `skia-canvas-rendering` - the surface draw code, its golden test template and draw-call label tests.\n- `seeded-determinism-and-golden-vectors` - seeded generators and their oracle-filled vectors.\n- `e2e-maestro` - simulator and emulator screenshot baselines (same policy, 0.2% tolerance).\n- `git-commits-and-reporting` - the commit format, the Gate-Change trailer and the change report.\n- `quality-gates` - `quality-gates.json` gated paths and the commit-msg hook that asks for the trailer.\n- `data-export-and-restore` - backup and export formats that contract goldens pin.\n- `level-generation-and-solvers` - level and daily-level goldens in games.\n","# Golden and snapshot tests\n\nGoldens are the frozen answers of an app: the readable text a pure unit produces for fixed inputs,\nthe output every installed version must reproduce, the pixels a Skia surface draws. They change only\non purpose, after a real look, in a commit that says why, and contract entries never change at all.\nThis skill writes them in the Jest `golden` project and its two checkers prove that the tree and the\ngit history keep that policy.\n\n## Rules that must hold\n\n1. **A golden changes only by hand, one file at a time:** `npx jest \u003Cfile> --selectProjects golden -u`,\n   path first. Every script, hook and CI job runs `jest --ci`, which refuses to write a missing\n   snapshot. No `-u`, `--updateSnapshot`, `--ci=false`, `CI=false` or baseline `--update` in\n   `package.json`, git hooks (lefthook, husky, lint-staged), CI (GitHub Actions, EAS Workflows) or\n   agent hooks. Why: an agent rubber-stamps whatever `-u` writes, and after `--selectProjects` a path\n   is read as another project name, so every golden is rewritten (verified with `--listTests`).\n2. **Look before accepting.** Read the `.snap.ios` diff line by line, open every new or changed PNG\n   and its diff image, then `CI=1 npx jest --ci --selectProjects golden` passes. Why: an unread golden\n   freezes a bug for every later run.\n3. **Every commit that adds, changes or deletes a golden path carries\n   `Gate-Change: \u003Cwhich goldens, why, what you looked at>`** (at least 10 characters). Golden paths:\n   `**\u002F*.golden.test.ts.snap(.ios|.android)`, `**\u002F__image_snapshots__\u002F**`, the pixel matcher\n   `test\u002Fgoldens\u002Fskia-golden.ts`, `.maestro\u002Fbaselines\u002F**`, plus `goldenPaths` in\n   `contracts\u002Fgoldens.json`. Why: one `git log --grep='^Gate-Change:'` lists every gate change later.\n4. **`[contract]` entries are append-only.** Output that every installed version, every device or a\n   file a user keeps must reproduce exactly (a backup or export format, a share code, a derived\n   identifier such as a scheduled notification id, a date-keyed pick) is pinned in a describe titled\n   `[contract] \u003Cunit> goldens`, registered in `contracts\u002Fgoldens.json`, with at least three keys and,\n   for date keys, a year-end\u002Fnew-year pair. An existing entry is never edited, deleted or renamed, not\n   even with a trailer; adding keys is fine. If the producing code must change, stop and ask: ship a\n   versioned format next to the old one, or switch inputs from a future date. Why: users on the old\n   and the new version would get different results from the same input; renaming a title deletes\n   the entry (the key is the title).\n5. **Data goldens are readable text from pure code.** `\u003Cunit>.golden.test.ts` next to the unit, one\n   string per case (a header line with the inputs and headline numbers, then short lines or an ASCII\n   grid), stored by jest-expo as `\u003Cfile>.golden.test.ts.snap.ios` next to the test; at most 120 lines\n   per entry (aim for 60); no clock, machine locale or unseeded randomness; no rendering. Why: a golden\n   is reviewed by reading its diff, and a machine-dependent golden differs between runs.\n6. **No component-tree snapshots and no inline snapshots, anywhere.** A `.snap` of a non-golden test\n   is deleted and replaced by assertions on roles and text; `toMatchInlineSnapshot` is never used.\n   Why: component trees churn on every style change and train `-u` reflexes; `-u` would rewrite the\n   test file itself, and Jest 29 with Prettier 3 fails the suite outright (verified).\n7. **Pixel goldens (apps that draw with Skia) render the production draw function** offscreen in the\n   CanvasKit `golden` project, under `test\u002Fgoldens\u002F`, at three canvas sizes (narrow 320x400, phone\n   390x560, tablet 1024x700; a fixed-size drawing says `\u002F\u002F fixed-size: \u003Cwhy>`, and a pipeline smoke\n   test that draws a function defined in the test is exempt) and, when it animates,\n   at moments 0, 0.5 and 1, with fonts loaded explicitly, through the one matcher\n   `test\u002Fgoldens\u002Fskia-golden.ts` (`toMatchPixelGolden`), never a per-call threshold.\n   `jest-image-snapshot` 6.5.2 and `@types\u002Fjest-image-snapshot` 6.4.2 are pinned exactly. Why: goldens\n   catch what assertions forget only when they draw what users see, at the sizes they see it.\n8. **Tolerances are gates:** 0.1% of pixels for Skia goldens (the matcher), 0.2% for simulator and\n   emulator screenshots (e2e-maestro). Never raise one to hide a diff; a raise needs the reviewer's\n   agreement first, then the matcher and `contracts\u002Fgoldens.json` `maxPixelTolerance` change together\n   in a commit with `Gate-Change: \u003Cname> \u003Cold> -> \u003Cnew> approved by \u003Creviewer>: \u003Creason>`. Why: a\n   raised tolerance silently accepts every future regression below it.\n9. **Snapshots never outlive their tests and diffs never reach git.** An obsolete entry is removed with\n   `-u` on that one file; an orphan `.snap` or baseline PNG is deleted with its test\n   (`baseline-orphan`); `.gitignore` lists `reports\u002F` and `**\u002F__image_snapshots__\u002F__diff_output__\u002F`; `quality-gates.json` `gatedPaths` lists the golden paths.\n   Why: an obsolete entry makes `jest --ci` exit 1 even when every test passed (verified), and a\n   golden path missing from the gate is changed without a trailer.\n10. **A failing golden is investigated, not re-accepted.** Decide: a bug (fix the code, keep the\n    golden), intended (update that one file, rules 1 to 3) or a contract entry (always a bug). A\n    golden that differs between two runs of the same commit means the code reads time or randomness.\n    Why: the generators, formatters and CanvasKit are deterministic, so noise is a bug.\n\n## Workflow\n\n1. **Know the policy** once per session: read [references\u002Fgolden-policy.md](references\u002Fgolden-policy.md)\n   (the kinds of golden, where each lives, the only way to change one, contract entries, failure\n   triage, iOS and Android notes, \"When multi-package\").\n2. **Pick the kind.** Readable output a reviewer checks: a data golden. Output installed versions\n   must reproduce: a `[contract]` describe in a data golden. A Skia surface: a pixel golden. A whole\n   screen on a device: a screenshot baseline (e2e-maestro). Seeded generator output: golden vectors\n   (seeded-determinism-and-golden-vectors). Then read\n   [references\u002Fdata-goldens.md](references\u002Fdata-goldens.md) or\n   [references\u002Fpixel-goldens.md](references\u002Fpixel-goldens.md).\n3. **A data golden:** if `test\u002Fgoldens\u002Fgolden-text.ts` is missing, copy it and its test from\n   `templates\u002Ftest\u002Fgoldens\u002F`. Imitate `templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts`\n   (the digest unit and its reviewed `.snap.ios` show a complete, verified pair): a `describe\u003CUnit>()`\n   function that returns one string, fixed inputs, titles that start with a third-person verb.\n4. **A contract:** put its cases in `describe('[contract] \u003Cunit> goldens', ...)`, pin at least three\n   keys (a year-end\u002Fnew-year pair for date keys, and a leap day), and register it in\n   `contracts\u002Fgoldens.json` (the first time, copy `templates\u002Fcontracts\u002Fgoldens.json` and its schema and\n   replace the sample digest entry with yours; the checker fails a marked describe the register does\n   not list, and an app with no contract needs no register). [examples\u002Fbackup-envelope.golden.test.ts](examples\u002Fbackup-envelope.golden.test.ts)\n   shows a format contract.\n5. **A pixel golden:** if `test\u002Fgoldens\u002Fskia-golden.ts` is missing, copy\n   [templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts](templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts) and run\n   `npm install --save-dev --save-exact jest-image-snapshot@6.5.2 @types\u002Fjest-image-snapshot@6.4.2`\n   (without the types, `npm run typecheck` fails with TS7016). The surface's golden test, draw code and\n   layout come from skia-canvas-rendering's template.\n6. **Create the goldens deliberately:** `npx jest \u003Cfile> --selectProjects golden --listTests` (it must\n   list only that file), then `npx jest \u003Cfile> --selectProjects golden -u`. Read every new entry or\n   open every new PNG with your file-reading tool, compare it with what users should get, then\n   `CI=1 npx jest --ci --selectProjects golden`.\n7. **Check the tree:** `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-goldens.mjs .` and fix every `FAIL`\n   line (file, rule, fix); rerun until `RESULT: PASS`. Rules and options:\n   [references\u002Fcheckers.md](references\u002Fcheckers.md).\n8. **Commit with the trailer** ([examples\u002Fgate-change-commit.txt](examples\u002Fgate-change-commit.txt)):\n   write the message to a file, stage, run\n   `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-golden-changes.mjs . --staged --message \u003Cfile>`, commit. At\n   the end of the session run it with `--range \u003Cbase>..HEAD` (base: the commit before the session's\n   first); in CI, `--range origin\u002Fmain..HEAD`.\n9. **When a golden fails later:** follow \"When a golden fails\" in the policy reference. Bug: fix the\n   code. Intended: step 6 for that one file, then step 8. A contract entry changed: revert, or stop and\n   ask the reviewer. A wide re-acceptance (a Skia or font upgrade) follows run-goldens-rebaseline;\n   after a Jest major (SDK 58 brings Jest 30) every file fails on its header: \"Jest upgrades\" in the policy.\n\n## Definition of done\n\n- [ ] Every data golden has its `.snap.ios`, every pixel golden its baselines, and\n      `CI=1 npx jest --ci --selectProjects golden` passes with no obsolete snapshot.\n- [ ] Every new or changed entry was read and every new or changed PNG opened; the report names them\n      and why they changed.\n- [ ] Every contract is registered in `contracts\u002Fgoldens.json`, pins at least three keys (a\n      year-boundary pair for date keys), and no existing `[contract]` entry changed.\n- [ ] No script, hook or CI job writes goldens; no tolerance went up without an approval trailer.\n- [ ] Every golden change sits in a commit with a `Gate-Change:` trailer, and\n      `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-golden-changes.mjs . --range \u003Cbase>..HEAD` prints\n      `RESULT: PASS`.\n- [ ] `node ${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fcheck-goldens.mjs .` prints `RESULT: PASS` (allowed while\n      adopting: `SKIP quality-gates.json [gated-path-missing] not yet created (quality-gates creates it)`,\n      `SKIP .gitignore [diff-output-ignored] not yet created (typescript-and-lint-rules creates it)`)\n\n## Anti-patterns\n\n- **`npx jest -u` to make a red suite green.** It rewrites every golden that differs, bugs included.\n  Read the failure, fix the code, and update only the one file you meant to change.\n- **`npx jest --selectProjects golden \u003Cfile> -u`.** The path becomes a second project name and every\n  golden is rewritten. Put the path first and preview with `--listTests`.\n- **Editing a `.snap.ios` by hand.** The next `-u` or a renamed test undoes it, and it hides what the\n  code really produces. Change the code, then regenerate that file.\n- **Re-accepting a `[contract]` entry \"because the format improved\".** Installed versions and files\n  users kept still expect the old output. Version the format or ask the reviewer.\n- **Renaming a contract describe \"for consistency\".** The snapshot key is the title, so the history\n  check sees the old entry deleted. Keep the title; add a comment instead.\n- **A 400-line JSON dump as a golden.** Nobody reviews it, so any change gets accepted. Describe the\n  output as a header line and the fields that matter.\n- **`expect(screen.toJSON()).toMatchSnapshot()` on a component.** It churns on every style tweak.\n  Assert roles and text (unit-and-component-tests); screens are covered by screenshots.\n- **`new Date()` or `toLocaleDateString()` in a golden.** It passes today on this machine only. Pass a\n  date key or an instant literal and an explicit locale.\n- **`failureThreshold: 0.01` in a test \"because CanvasKit is noisy\".** CanvasKit renders are\n  byte-identical run to run; noise means the draw path reads time or randomness.\n- **A pixel golden at one size or without the 0 and 1 moments.** Clipping at narrow sizes and wrong\n  start or end states are the most common canvas bugs.\n\n## Files in this skill\n\n| File | What it is | Read\u002Frun when |\n|---|---|---|\n| [references\u002Fgolden-policy.md](references\u002Fgolden-policy.md) | The kinds of golden and where they live, the only way to change one (verified Jest facts), gated paths and the trailer, contract entries, failure triage, obsolete and orphan snapshots, Jest upgrades (the snapshot header), iOS and Android, When multi-package | Workflow step 1, and whenever a golden fails |\n| [references\u002Fdata-goldens.md](references\u002Fdata-goldens.md) | What deserves a data golden, readable text, the template pair, the snapshot file, reading a diff, writing and evolving contracts, formats worth pinning, the games appendix | Workflow steps 3 and 4 |\n| [references\u002Fpixel-goldens.md](references\u002Fpixel-goldens.md) | The golden project and matcher, sizes and moments, fonts, accepting baselines, reading a failure, Skia upgrades, screenshot baselines on iOS and Android, headless previews | Workflow step 5 |\n| [references\u002Fcheckers.md](references\u002Fcheckers.md) | Both checkers: rules, options, rn-skills.config.json keys, the contract file, SKIP lines, the log capture, CI use, troubleshooting | Workflow steps 7 and 8 |\n| `templates\u002Ftest\u002Fgoldens\u002Fgolden-text.ts` | `headerLine`, `goldenText`, `renderGrid`: readable golden text | Workflow step 3, when missing |\n| `templates\u002Ftest\u002Fgoldens\u002Fgolden-text.test.ts` | Its unit test | Copied with it |\n| [templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts](templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts) | `toMatchPixelGolden`: 0.1% of pixels, diffs to `reports\u002Fvisual\u002Fdiff\u002F` (canonical, synced; this skill owns it) | Workflow step 5, when missing |\n| `templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.ts` | A pure Tasks unit to pin: the daily digest plan and its notification id | Workflow step 3, as the shape of a pinned unit |\n| `templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts` | The data golden pattern: a describe function, fixed inputs, a `[contract]` describe | Workflow steps 3 and 4 |\n| `templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts.snap.ios` | Its reviewed snapshot (what readable entries look like) | Workflow step 3 |\n| `templates\u002Fcontracts\u002Fgoldens.json` | The contract register both checkers read; its digest entry is a sample to replace (canonical, synced; this skill owns it) | Workflow step 4 |\n| `templates\u002Fcontracts\u002Fgoldens.schema.json` | Its JSON schema (keys and meaning; canonical, synced) | Workflow step 4 |\n| [examples\u002Fbackup-envelope.golden.test.ts](examples\u002Fbackup-envelope.golden.test.ts) | A format contract: backup format 1 pinned for boundary inputs | Workflow step 4 |\n| [examples\u002Fbackup-envelope.golden.test.ts.snap.ios](examples\u002Fbackup-envelope.golden.test.ts.snap.ios) | Its snapshot | Workflow step 4 |\n| [examples\u002Fgate-change-commit.txt](examples\u002Fgate-change-commit.txt) | Commit messages with the Gate-Change trailer (created, re-accepted, contract key added, tolerance approved) | Workflow step 8 |\n| `scripts\u002Fcheck-goldens.mjs` | Checks the tree: snapshots present, readable and owned, no component or inline snapshots, no ambient input or UI in goldens, contracts, pixel matcher, sizes, baselines, no automated `-u`, `jest --ci` everywhere, gated paths, ignored diffs | Workflow step 7 and the definition of done |\n| `scripts\u002Fcheck-golden-changes.mjs` | Checks commits or the staged change: Gate-Change trailers, `[contract]` entries never edited or deleted, tolerances never raised without approval | Workflow step 8 and the definition of done |\n| `scripts\u002Flib\u002Fgolden-config.mjs` | The checkers' shared reader of paths, rn-skills.config.json keys and `contracts\u002Fgoldens.json` | When a checker changes |\n| `scripts\u002Fselftest.mjs` | Proves both checkers pass the templates and catch every planted bug | After changing a checker or a template |\n| `scripts\u002Fcheck-lib.mjs` | Shared script library (synced; do not edit here) | Never by hand |\n| `assets\u002Fshared.json` | Declares the synced files (check-lib, the pixel matcher, the register and its schema) | When adding a shared file |\n| `assets\u002Ftemplate-placeholders.json` | The placeholder values the template verification and the self-test use | When adding a placeholder |\n| `tests\u002Fbases\u002Fapp\u002F` | The minimal app the fixtures lay the templates on | When the fixture base changes |\n| `tests\u002Ffixtures\u002F` | Overlay suites: `good\u002F`, one `bad-*` per rule, `pass-*` and `error-*` cases; real `git log` captures for the history checker | When adding a checker rule |\n\n## Related skills\n\n- `unit-and-component-tests` - the Jest projects (the golden project's config), component tests and their `component-snapshot` rule.\n- `run-goldens-rebaseline` - the manual ritual for re-accepting many goldens at once.\n- `skia-canvas-rendering` - the surface draw code, its golden test template and draw-call label tests.\n- `seeded-determinism-and-golden-vectors` - seeded generators and their oracle-filled vectors.\n- `e2e-maestro` - simulator and emulator screenshot baselines (same policy, 0.2% tolerance).\n- `git-commits-and-reporting` - the commit format, the Gate-Change trailer and the change report.\n- `quality-gates` - `quality-gates.json` gated paths and the commit-msg hook that asks for the trailer.\n- `data-export-and-restore` - backup and export formats that contract goldens pin.\n- `level-generation-and-solvers` - level and daily-level goldens in games.\n",{"name":5,"description":7},"main","41a0e66d4d09de5b46e6537f59a97c7192473486","skills\u002Fgolden-and-snapshot-tests",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 golden-and-snapshot-tests",{"tool":40,"command":41},"bunx","bunx skills add zakariaf\u002FReactNative-Skills --skill golden-and-snapshot-tests",{"tool":43,"command":44},"pnpm","pnpm dlx skills add zakariaf\u002FReactNative-Skills --skill golden-and-snapshot-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\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,191],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"assets\u002Fshared.json","ASSET","资产文件",388,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fassets\u002Fshared.json",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"assets\u002Ftemplate-placeholders.json",176,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fassets\u002Ftemplate-placeholders.json",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"examples\u002Fbackup-envelope.golden.test.ts","SCRIPT","脚本",1588,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fexamples\u002Fbackup-envelope.golden.test.ts",{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"examples\u002Fbackup-envelope.golden.test.ts.snap.ios","OTHER","其他",1072,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fexamples\u002Fbackup-envelope.golden.test.ts.snap.ios",{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"examples\u002Fgate-change-commit.txt","REFERENCE","参考文档",2410,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fexamples\u002Fgate-change-commit.txt",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fcheckers.md",12444,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Freferences\u002Fcheckers.md",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fdata-goldens.md",9788,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Freferences\u002Fdata-goldens.md",{"path":85,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fgolden-policy.md",16484,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Freferences\u002Fgolden-policy.md",{"path":89,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fpixel-goldens.md",9154,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Freferences\u002Fpixel-goldens.md",{"path":93,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":94,"sourceHtmlUrl":95},"scripts\u002Fcheck-golden-changes.mjs",11887,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fscripts\u002Fcheck-golden-changes.mjs",{"path":97,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":98,"sourceHtmlUrl":99},"scripts\u002Fcheck-goldens.mjs",34320,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fscripts\u002Fcheck-goldens.mjs",{"path":101,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Fcheck-lib.mjs",119923,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fscripts\u002Fcheck-lib.mjs",{"path":105,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Flib\u002Fgolden-config.mjs",7508,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fscripts\u002Flib\u002Fgolden-config.mjs",{"path":109,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Fselftest.mjs",638,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Fscripts\u002Fselftest.mjs",{"path":113,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":114,"sourceHtmlUrl":115},"templates\u002Fcontracts\u002Fgoldens.json",572,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftemplates\u002Fcontracts\u002Fgoldens.json",{"path":117,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":118,"sourceHtmlUrl":119},"templates\u002Fcontracts\u002Fgoldens.schema.json",3059,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftemplates\u002Fcontracts\u002Fgoldens.schema.json",{"path":121,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":122,"sourceHtmlUrl":123},"templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts",2606,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftemplates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts",{"path":125,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":126,"sourceHtmlUrl":127},"templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts.snap.ios",1503,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftemplates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.golden.test.ts.snap.ios",{"path":129,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":130,"sourceHtmlUrl":131},"templates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.ts",2431,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftemplates\u002Fsrc\u002Ffeatures\u002F__FEATURE__\u002F__FEATURE__-digest.ts",{"path":133,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":134,"sourceHtmlUrl":135},"templates\u002Ftest\u002Fgoldens\u002Fgolden-text.test.ts",1405,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftemplates\u002Ftest\u002Fgoldens\u002Fgolden-text.test.ts",{"path":137,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":138,"sourceHtmlUrl":139},"templates\u002Ftest\u002Fgoldens\u002Fgolden-text.ts",1520,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftemplates\u002Ftest\u002Fgoldens\u002Fgolden-text.ts",{"path":141,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":142,"sourceHtmlUrl":143},"templates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts",686,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftemplates\u002Ftest\u002Fgoldens\u002Fskia-golden.ts",{"path":145,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":146,"sourceHtmlUrl":147},"tests\u002Fbases\u002Fapp\u002F.github\u002Fworkflows\u002Fci.yml",182,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Fbases\u002Fapp\u002F.github\u002Fworkflows\u002Fci.yml",{"path":149,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":150,"sourceHtmlUrl":151},"tests\u002Fbases\u002Fapp\u002Fdot-gitignore",87,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Fbases\u002Fapp\u002Fdot-gitignore",{"path":153,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":154,"sourceHtmlUrl":155},"tests\u002Fbases\u002Fapp\u002Flefthook.yml",159,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Fbases\u002Fapp\u002Flefthook.yml",{"path":157,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":158,"sourceHtmlUrl":159},"tests\u002Fbases\u002Fapp\u002Fpackage.json",308,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Fbases\u002Fapp\u002Fpackage.json",{"path":161,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":162,"sourceHtmlUrl":163},"tests\u002Fbases\u002Fapp\u002Fquality-gates.json",322,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Fbases\u002Fapp\u002Fquality-gates.json",{"path":165,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":166,"sourceHtmlUrl":167},"tests\u002Fbases\u002Fapp\u002Ftest\u002Fgoldens\u002Fcanvas\u002Fweekly-chart.golden.test.ts",2067,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Fbases\u002Fapp\u002Ftest\u002Fgoldens\u002Fcanvas\u002Fweekly-chart.golden.test.ts",{"path":169,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":170,"sourceHtmlUrl":171},"tests\u002Ffixtures\u002Fcheck-golden-changes\u002FCASES.json",24523,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Ffixtures\u002Fcheck-golden-changes\u002FCASES.json",{"path":173,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":174,"sourceHtmlUrl":175},"tests\u002Ffixtures\u002Fcheck-golden-changes\u002Fgood\u002FEXPECT.txt",52,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Ffixtures\u002Fcheck-golden-changes\u002Fgood\u002FEXPECT.txt",{"path":177,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":178,"sourceHtmlUrl":179},"tests\u002Ffixtures\u002Fcheck-golden-changes\u002Fgood\u002Fhistory.log",12465,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Ffixtures\u002Fcheck-golden-changes\u002Fgood\u002Fhistory.log",{"path":181,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":182,"sourceHtmlUrl":183},"tests\u002Ffixtures\u002Fcheck-golden-changes\u002FSUITE.json",19,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Ffixtures\u002Fcheck-golden-changes\u002FSUITE.json",{"path":185,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":186,"sourceHtmlUrl":187},"tests\u002Ffixtures\u002Fcheck-goldens\u002FCASES.json",27603,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Ffixtures\u002Fcheck-goldens\u002FCASES.json",{"path":189,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":14,"sourceHtmlUrl":190},"tests\u002Ffixtures\u002Fcheck-goldens\u002Fgood\u002FEXPECT.txt","https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Ffixtures\u002Fcheck-goldens\u002Fgood\u002FEXPECT.txt",{"path":192,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":193,"sourceHtmlUrl":194},"tests\u002Ffixtures\u002Fcheck-goldens\u002FSUITE.json",1131,"https:\u002F\u002Fgithub.com\u002Fzakariaf\u002FReactNative-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fgolden-and-snapshot-tests\u002Ftests\u002Ffixtures\u002Fcheck-goldens\u002FSUITE.json",[196,203,209,216,223,230],{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":200,"categories":201,"keywords":202,"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":204,"name":198,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":206,"categories":207,"keywords":208,"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":210,"name":211,"nameZh":6,"description":212,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":213,"categories":214,"keywords":215,"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":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":222,"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":224,"name":225,"nameZh":6,"description":226,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":227,"categories":228,"keywords":229,"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":231,"name":232,"nameZh":6,"description":233,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":234,"categories":235,"keywords":236,"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",[],[]]