一键导入
pbt-pragmatic-adoption
Pragmatic property-based testing review and first-wave adoption for this listings-webapp monorepo (Jest + fast-check, unit tests only).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pragmatic property-based testing review and first-wave adoption for this listings-webapp monorepo (Jest + fast-check, unit tests only).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | pbt-pragmatic-adoption |
| description | Pragmatic property-based testing review and first-wave adoption for this listings-webapp monorepo (Jest + fast-check, unit tests only). |
Use 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.
Primary goal: strengthen logic-heavy unit tests with a small number of meaningful invariants.
app/, packages/*, or cdk/.e2e-tests/.app/src/components/**: mostly UI tests; only target pure helper modules.app/src/utils/** and app/src/pages/**/utils.ts: strongest PBT zone.packages/*/src/**: mixed; use PBT for pure format/order helpers, not component rendering.cdk/test/**: infrastructure assertions; PBT usually lower value here.Prefer modules that satisfy most of these:
Strong candidates identified:
app/src/utils/arrayUtils.tsapp/src/pages/validation/slug.tsapp/src/pages/api/[eventId]/utils.ts (hasOnlyDonationTicketsAvailable, hasEarlyBirdTickets, isValidEventId)app/src/components/Body/hooks/useTrackingBeacons/transform.tsapp/src/components/MoreOrganizerEvents/utils.ts (getEventsToShow, getMoreEventsFromThisOrganizerFiltered)app/src/components/SEOTags/getBaseDeepLinkAppUrl.tsapp/src/utils/correlationId.tsPossible candidates (use care):
app/src/utils/eventAuth.ts (crypto roundtrips are valid but can be heavier).packages/good-to-know/src/sections/Highlights/formatDuration.ts (valid but low business value).Bad fit candidates:
app/src/components/**.numRuns: 100seed per test file for reproducibility.Minimal pattern:
import fc from 'fast-check';
const PROPERTY_CONFIG = { numRuns: 100, seed: 20260319 };
it('matches domain invariant', () => {
fc.assert(
fc.property(arbitraryInput, (input) => {
const result = fn(input);
expect(result).toEqual(expectedFromInvariant(input));
}),
PROPERTY_CONFIG,
);
});
availableTickets, expected, eventId).--runTestsByPath for targeted execution while adopting.app, packages, cdk).good candidate, possible candidate, or bad fit.fast-check only in the package where tests are added.app/src/utils/arrayUtils.test.ts
app/src/pages/validation/slug.test.ts
1003 are accepted; non-divisible are rejected.app/src/pages/api/[eventId]/utils.test.ts
hasOnlyDonationTicketsAvailable equals:
available.length > 0 && available.every(category === 'donation').arrayUtils, slug, ticket classification utils.transformTrackingBeacons grouping/order invariants.getEventsToShow and organizer filtering subset/limit invariants.getBaseDeepLinkAppUrl, parsing helpers).Route durable personal context and reusable knowledge between augmentedcode-configuration and the personal knowledge vault. Use when the user asks to remember, persist, capture, retrieve, or organize personal knowledge; when deciding whether information belongs in rules, skills, portfolio, notes, maps, or inbox; or when using personal-knowledge-vault as a low-context reference layer.
Use when running git clone, git remote add, git remote set-url, or suggesting GitHub SSH commands to ensure all GitHub access uses the saski SSH host alias.
Build modern data apps, dashboards, and interactive reports using either React + Vite or Streamlit. Includes optional Gemini Data Analytics chat integration for an AI powered "chat with your data" experience. Relevant when any of the following conditions are true: 1. User explicitly requests to build a data dashboard, data application, or visualization UI, and the UI pulls data from a GCP database (defaulting to BigQuery unless otherwise specified). 2. You need to generate a frontend web application to interact with, query, and visualize data from GCP data sources. 3. User wants to build a "chat with your data" experience or integrate the Gemini Data Analytics chat API into a web interface. Do NOT use when any of the following conditions are true: 1. The request is for building backend-only services. 2. The request is for simple CLI scripts or command-line applications. 3. The web application is not data-centric or does not involve visualizing/querying data from GCP sources.
Develops and executes Spark code on Dataproc Clusters and Serverless. Reads and writes data using BigLake Iceberg catalogs, BigQuery and Spanner. Debugs execution failures. Use when: - Writing Spark ETL pipelines on GCP. - Training or running inference with ML models with spark on GCP. - Managing Spark clusters, jobs, batches, and interactive sessions. Don't use when: - Writing generic Python scripts that don't use Spark. - Performing simple SQL queries that can be done directly in BigQuery.
Use when the user wants to clean up AI slop, harden a codebase, or run technical due diligence: review code for security flaws and vulnerable or wrongly-licensed dependencies, find and remove dead code, audit dependency health, run and triage linters, type checkers, test suites and formatters, evaluate design principles (SOLID and the cohesion/coupling equivalents for non-OO stacks), audit logging and observability, find performance smells, check documentation and CI health, scaffold baseline configs for the detected stack, do a structured code review, guide a one-major-at-a-time dependency migration, fix project structure, or produce one aggregated health report across all of these. Triggers on phrases like clean this up, find security issues, remove dead code, check dependencies, lint, typecheck, run the tests, format, review my code, check the design, check logging, is this slow, migrate a dependency, fix the project structure, set up the project, audit everything, due diligence, or this looks like AI slop
Run any question, idea, or decision through a council of 5 AI advisors who independently analyze it, peer-review each other anonymously, and synthesize a final verdict. Based on Karpathy's LLM Council methodology. MANDATORY TRIGGERS: 'council this', 'run the council', 'war room this', 'pressure-test this', 'stress-test this', 'debate this'. STRONG TRIGGERS (use when combined with a real decision or tradeoff): 'should I X or Y', 'which option', 'what would you do', 'is this the right move', 'validate this', 'get multiple perspectives', 'I can't decide', 'I'm torn between'. Do NOT trigger on simple yes/no questions, factual lookups, or casual 'should I' without a meaningful tradeoff (e.g. 'should I use markdown' is not a council question). DO trigger when the user presents a genuine decision with stakes, multiple options, and context that suggests they want it pressure-tested from multiple angles.