[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ASSNV98P192N3K17RW8HBS":3,"skill-same:01M7ASSNV98P192N3K17RW8HBS":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7ASSNV98P192N3K17RW8HBS","pbt-pragmatic-adoption",null,"Pragmatic property-based testing review and first-wave adoption for this listings-webapp monorepo (Jest + fast-check, unit tests only).","saski\u002Farnesto","saski","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F140356?v=4","01M7ASBDSNXTRYDYB4K1PEA1RV","01M7ASBDTAKBDAAV99S1GE7HK6",6,"Unlicense","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fpbt-pragmatic-adoption\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pbt-pragmatic-adoption\ndescription: Pragmatic property-based testing review and first-wave adoption for this listings-webapp monorepo (Jest + fast-check, unit tests only).\n---\n\n# Pragmatic PBT Adoption Skill (listings-webapp)\n\n## Purpose\nUse this skill to find and introduce high-signal property-based tests (PBT) in this repository without destabilizing CI, over-abstracting tests, or replacing clear example-based tests.\n\nPrimary goal: strengthen logic-heavy unit tests with a small number of meaningful invariants.\n\n## When to use\n- You are reviewing unit test quality in `app\u002F`, `packages\u002F*`, or `cdk\u002F`.\n- You see repeated example-based tests over combinatorial inputs.\n- The code under test is deterministic and mostly pure.\n- You need stronger regression protection for filters, mappers, parsers, validators, ranking, ordering, or state calculations.\n\n## When not to use\n- Playwright or browser-flow tests in `e2e-tests\u002F`.\n- Snapshot-heavy UI rendering assertions.\n- Highly mocked async integration flows where failures are mostly orchestration\u002Fnetwork issues.\n- Timezone\u002Fclock-sensitive formatting logic unless inputs are tightly constrained and clocks are controlled.\n\n## Repository map for PBT decisions\n- `app\u002Fsrc\u002Fcomponents\u002F**`: mostly UI tests; only target pure helper modules.\n- `app\u002Fsrc\u002Futils\u002F**` and `app\u002Fsrc\u002Fpages\u002F**\u002Futils.ts`: strongest PBT zone.\n- `packages\u002F*\u002Fsrc\u002F**`: mixed; use PBT for pure format\u002Forder helpers, not component rendering.\n- `cdk\u002Ftest\u002F**`: infrastructure assertions; PBT usually lower value here.\n\n## Good candidate heuristics in this repo\nPrefer modules that satisfy most of these:\n- Pure function, deterministic output.\n- No network, no timers, no DOM requirement.\n- Input space is broad (arrays, query params, optional fields, IDs).\n- Existing tests enumerate many examples that encode one invariant.\n- Failure can be explained as business rule breakage.\n\nStrong candidates identified:\n- `app\u002Fsrc\u002Futils\u002FarrayUtils.ts`\n- `app\u002Fsrc\u002Fpages\u002Fvalidation\u002Fslug.ts`\n- `app\u002Fsrc\u002Fpages\u002Fapi\u002F[eventId]\u002Futils.ts` (`hasOnlyDonationTicketsAvailable`, `hasEarlyBirdTickets`, `isValidEventId`)\n- `app\u002Fsrc\u002Fcomponents\u002FBody\u002Fhooks\u002FuseTrackingBeacons\u002Ftransform.ts`\n- `app\u002Fsrc\u002Fcomponents\u002FMoreOrganizerEvents\u002Futils.ts` (`getEventsToShow`, `getMoreEventsFromThisOrganizerFiltered`)\n- `app\u002Fsrc\u002Fcomponents\u002FSEOTags\u002FgetBaseDeepLinkAppUrl.ts`\n- `app\u002Fsrc\u002Futils\u002FcorrelationId.ts`\n\nPossible candidates (use care):\n- `app\u002Fsrc\u002Futils\u002FeventAuth.ts` (crypto roundtrips are valid but can be heavier).\n- `packages\u002Fgood-to-know\u002Fsrc\u002Fsections\u002FHighlights\u002FformatDuration.ts` (valid but low business value).\n\nBad fit candidates:\n- Component snapshots and layout assertions under `app\u002Fsrc\u002Fcomponents\u002F**`.\n- Playwright specs and visual behavior.\n- API handler end-to-end behavior with many mocked services (keep mostly example-based).\n\n## How to write good properties with Jest + fast-check\n1. Express a domain invariant, not implementation details.\n2. Generate valid, meaningful data ranges (avoid unconstrained garbage).\n3. Keep properties small and local to the module under test.\n4. Use deterministic config for CI stability in this repo:\n   - `numRuns: 100`\n   - fixed `seed` per test file for reproducibility.\n5. Keep existing example tests; add 1-3 properties per module for coverage of broad spaces.\n\nMinimal pattern:\n\n```ts\nimport fc from 'fast-check';\n\nconst PROPERTY_CONFIG = { numRuns: 100, seed: 20260319 };\n\nit('matches domain invariant', () => {\n  fc.assert(\n    fc.property(arbitraryInput, (input) => {\n      const result = fn(input);\n      expect(result).toEqual(expectedFromInvariant(input));\n    }),\n    PROPERTY_CONFIG,\n  );\n});\n```\n\n## Readability and reproducibility rules\n- One property = one invariant.\n- Use simple names (`availableTickets`, `expected`, `eventId`).\n- Avoid complex custom arbitraries until basic invariants are exhausted.\n- Keep failure messages actionable by computing clear expected values inline.\n- Prefer `--runTestsByPath` for targeted execution while adopting.\n\n## Step-by-step workflow for future agents\n1. Inspect Jest setup and test distribution (`app`, `packages`, `cdk`).\n2. List pure helper modules with combinatorial inputs.\n3. Mark each as `good candidate`, `possible candidate`, or `bad fit`.\n4. Pick first wave: 3-7 total properties across 2-4 files max.\n5. Add `fast-check` only in the package where tests are added.\n6. Add one property at a time and run affected tests after each change.\n7. Stop when signal is clearly improved; do not broaden scope in same pass.\n\n## Repo-specific examples (already adopted)\n- `app\u002Fsrc\u002Futils\u002FarrayUtils.test.ts`\n  - Property: interleaving preserves total count and per-source ordering.\n- `app\u002Fsrc\u002Fpages\u002Fvalidation\u002Fslug.test.ts`\n  - Property: IDs divisible by `1003` are accepted; non-divisible are rejected.\n- `app\u002Fsrc\u002Fpages\u002Fapi\u002F[eventId]\u002Futils.test.ts`\n  - Property: `hasOnlyDonationTicketsAvailable` equals:\n    `available.length > 0 && available.every(category === 'donation')`.\n\n## First adoption playbook\n1. Start with deterministic pure functions:\n   - `arrayUtils`, `slug`, ticket classification utils.\n2. Next wave:\n   - `transformTrackingBeacons` grouping\u002Forder invariants.\n   - `getEventsToShow` and organizer filtering subset\u002Flimit invariants.\n3. Later wave:\n   - query mapping\u002Fnormalization (`getBaseDeepLinkAppUrl`, parsing helpers).\n4. Keep each wave small; validate test runtime impact before expanding.\n\n## Do not do\n- Do not add PBT to Playwright.\n- Do not replace readable example tests that already communicate behavior well.\n- Do not generate extremely large arrays or huge strings by default.\n- Do not introduce shared PBT helper abstractions early.\n- Do not assert trivial tautologies (for example, “result is array”).\n- Do not make properties depend on unstable clock\u002Fnetwork\u002Fglobal mutable state unless fully controlled.\n","# Pragmatic PBT Adoption Skill (listings-webapp)\n\n## Purpose\nUse this skill to find and introduce high-signal property-based tests (PBT) in this repository without destabilizing CI, over-abstracting tests, or replacing clear example-based tests.\n\nPrimary goal: strengthen logic-heavy unit tests with a small number of meaningful invariants.\n\n## When to use\n- You are reviewing unit test quality in `app\u002F`, `packages\u002F*`, or `cdk\u002F`.\n- You see repeated example-based tests over combinatorial inputs.\n- The code under test is deterministic and mostly pure.\n- You need stronger regression protection for filters, mappers, parsers, validators, ranking, ordering, or state calculations.\n\n## When not to use\n- Playwright or browser-flow tests in `e2e-tests\u002F`.\n- Snapshot-heavy UI rendering assertions.\n- Highly mocked async integration flows where failures are mostly orchestration\u002Fnetwork issues.\n- Timezone\u002Fclock-sensitive formatting logic unless inputs are tightly constrained and clocks are controlled.\n\n## Repository map for PBT decisions\n- `app\u002Fsrc\u002Fcomponents\u002F**`: mostly UI tests; only target pure helper modules.\n- `app\u002Fsrc\u002Futils\u002F**` and `app\u002Fsrc\u002Fpages\u002F**\u002Futils.ts`: strongest PBT zone.\n- `packages\u002F*\u002Fsrc\u002F**`: mixed; use PBT for pure format\u002Forder helpers, not component rendering.\n- `cdk\u002Ftest\u002F**`: infrastructure assertions; PBT usually lower value here.\n\n## Good candidate heuristics in this repo\nPrefer modules that satisfy most of these:\n- Pure function, deterministic output.\n- No network, no timers, no DOM requirement.\n- Input space is broad (arrays, query params, optional fields, IDs).\n- Existing tests enumerate many examples that encode one invariant.\n- Failure can be explained as business rule breakage.\n\nStrong candidates identified:\n- `app\u002Fsrc\u002Futils\u002FarrayUtils.ts`\n- `app\u002Fsrc\u002Fpages\u002Fvalidation\u002Fslug.ts`\n- `app\u002Fsrc\u002Fpages\u002Fapi\u002F[eventId]\u002Futils.ts` (`hasOnlyDonationTicketsAvailable`, `hasEarlyBirdTickets`, `isValidEventId`)\n- `app\u002Fsrc\u002Fcomponents\u002FBody\u002Fhooks\u002FuseTrackingBeacons\u002Ftransform.ts`\n- `app\u002Fsrc\u002Fcomponents\u002FMoreOrganizerEvents\u002Futils.ts` (`getEventsToShow`, `getMoreEventsFromThisOrganizerFiltered`)\n- `app\u002Fsrc\u002Fcomponents\u002FSEOTags\u002FgetBaseDeepLinkAppUrl.ts`\n- `app\u002Fsrc\u002Futils\u002FcorrelationId.ts`\n\nPossible candidates (use care):\n- `app\u002Fsrc\u002Futils\u002FeventAuth.ts` (crypto roundtrips are valid but can be heavier).\n- `packages\u002Fgood-to-know\u002Fsrc\u002Fsections\u002FHighlights\u002FformatDuration.ts` (valid but low business value).\n\nBad fit candidates:\n- Component snapshots and layout assertions under `app\u002Fsrc\u002Fcomponents\u002F**`.\n- Playwright specs and visual behavior.\n- API handler end-to-end behavior with many mocked services (keep mostly example-based).\n\n## How to write good properties with Jest + fast-check\n1. Express a domain invariant, not implementation details.\n2. Generate valid, meaningful data ranges (avoid unconstrained garbage).\n3. Keep properties small and local to the module under test.\n4. Use deterministic config for CI stability in this repo:\n   - `numRuns: 100`\n   - fixed `seed` per test file for reproducibility.\n5. Keep existing example tests; add 1-3 properties per module for coverage of broad spaces.\n\nMinimal pattern:\n\n```ts\nimport fc from 'fast-check';\n\nconst PROPERTY_CONFIG = { numRuns: 100, seed: 20260319 };\n\nit('matches domain invariant', () => {\n  fc.assert(\n    fc.property(arbitraryInput, (input) => {\n      const result = fn(input);\n      expect(result).toEqual(expectedFromInvariant(input));\n    }),\n    PROPERTY_CONFIG,\n  );\n});\n```\n\n## Readability and reproducibility rules\n- One property = one invariant.\n- Use simple names (`availableTickets`, `expected`, `eventId`).\n- Avoid complex custom arbitraries until basic invariants are exhausted.\n- Keep failure messages actionable by computing clear expected values inline.\n- Prefer `--runTestsByPath` for targeted execution while adopting.\n\n## Step-by-step workflow for future agents\n1. Inspect Jest setup and test distribution (`app`, `packages`, `cdk`).\n2. List pure helper modules with combinatorial inputs.\n3. Mark each as `good candidate`, `possible candidate`, or `bad fit`.\n4. Pick first wave: 3-7 total properties across 2-4 files max.\n5. Add `fast-check` only in the package where tests are added.\n6. Add one property at a time and run affected tests after each change.\n7. Stop when signal is clearly improved; do not broaden scope in same pass.\n\n## Repo-specific examples (already adopted)\n- `app\u002Fsrc\u002Futils\u002FarrayUtils.test.ts`\n  - Property: interleaving preserves total count and per-source ordering.\n- `app\u002Fsrc\u002Fpages\u002Fvalidation\u002Fslug.test.ts`\n  - Property: IDs divisible by `1003` are accepted; non-divisible are rejected.\n- `app\u002Fsrc\u002Fpages\u002Fapi\u002F[eventId]\u002Futils.test.ts`\n  - Property: `hasOnlyDonationTicketsAvailable` equals:\n    `available.length > 0 && available.every(category === 'donation')`.\n\n## First adoption playbook\n1. Start with deterministic pure functions:\n   - `arrayUtils`, `slug`, ticket classification utils.\n2. Next wave:\n   - `transformTrackingBeacons` grouping\u002Forder invariants.\n   - `getEventsToShow` and organizer filtering subset\u002Flimit invariants.\n3. Later wave:\n   - query mapping\u002Fnormalization (`getBaseDeepLinkAppUrl`, parsing helpers).\n4. Keep each wave small; validate test runtime impact before expanding.\n\n## Do not do\n- Do not add PBT to Playwright.\n- Do not replace readable example tests that already communicate behavior well.\n- Do not generate extremely large arrays or huge strings by default.\n- Do not introduce shared PBT helper abstractions early.\n- Do not assert trivial tautologies (for example, “result is array”).\n- Do not make properties depend on unstable clock\u002Fnetwork\u002Fglobal mutable state unless fully controlled.\n",{"name":5,"description":7},"main","3c24fc2c035029b08c7326774bee3fef8fb95566",".agents\u002Fskills\u002Fpbt-pragmatic-adoption",0,"https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto","https:\u002F\u002Fgithub.com\u002Fsaski","http:\u002F\u002Fsaski.com","2026-11-12 20:09:16",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add saski\u002Farnesto --skill pbt-pragmatic-adoption",{"tool":37,"command":38},"bunx","bunx skills add saski\u002Farnesto --skill pbt-pragmatic-adoption",{"tool":40,"command":41},"pnpm","pnpm dlx skills add saski\u002Farnesto --skill pbt-pragmatic-adoption","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fpbt-pragmatic-adoption\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7AT7F5FSHNAMFMF01N0QA1X","visualize","Use \u002Fvisualize for creating compact charts, diagrams, or other visuals inline as part of the conversation itself. It chooses among Markdown tables, Mermaid, inline HTML, and other supported in-transcript forms. Use Canvas for durable artifacts outside the transcript that users may revisit, refine, or share.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fvisualize\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M7AT79MHSAR3JDDMP7DGERM9","update-cursor-settings","Modify Cursor\u002FVSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fupdate-cursor-settings\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7AT73WF3Y22E0FKYAMCCJES","update-cli-config","View and modify Cursor CLI configuration settings in ~\u002F.cursor\u002Fcli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fupdate-cli-config\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7AT6F3FBP85AJJ5BJNR8B5W","statusline","Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fstatusline\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7AT6D24QFS5XRAFN8S5XJ7W","split-to-prs","Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fsplit-to-prs\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7AT69FYFN84XZKW452JV5DF","shell","Runs the rest of a \u002Fshell request as a literal shell command. Use only when the user explicitly invokes \u002Fshell and wants the following text executed directly in the terminal.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fshell\u002FSKILL.md",[],[]]