What problem does it solve?
Adding or editing endpoints in the card-management API layer often leads to inconsistent patterns: misuse of queryFn, manual type casts, inline transforms, and leaked PII in the cache. This Skill enforces a single declarative endpoint shape so every endpoint reads the same way.
Core Features & Use Cases
- Four-key endpoint contract: Every endpoint declares
query, rawResponseSchema, transformResponse, and responseSchema in a fixed order, with unused keys dropped.
queryFn prohibition: Explains why RTK Query skips transformResponse for queryFn endpoints and why configuration must arrive as request arguments instead of being read from the store.
- Schema-only validation: Zod schemas in
schema.ts are the sole validation mechanism, keeping wire shapes narrow so undeclared fields (and PII) never reach the cache.
- Use Case: When adding a new OAuth or session endpoint to
domain/api/card-management/src/api.ts, follow this Skill to declare it as a build.mutation with a wire schema, a named transform in transforms.ts, and a canonical response schema.
Quick Start
Read this Skill before adding or editing any endpoint in domain/api/card-management/src/api.ts and follow its checklist.