Grep The Types Statics First

Before writing any logic over a type the project owns — merging, defaulting, unwrapping, normalizing, converting — grep that type's own static/factory methods and search the codebase for the verb you need. A mature codebase has already solved it, with the edge cases handled and a name the reviewer reads fluently. A plausible hand-rolled helper is worse than a bug: it compiles, it passes, and it reads to a maintainer as unfamiliarity with the house. When you do find the helper, check its RETURN TYPE against your call site before swapping, and verify by running rather than reading. Use before writing any utility loop over a house type. Trigger terms: helper method, merge params, apply defaults, unwrap, convert, write a small utility, is there an existing, reinvent, "I'll just loop over".

serhiy-bzhezytskyy Updated

File contents

serhiy-bzhezytskyy/contrib-receipts/tree/main/skills/grep-the-types-statics-first commit 267b133b57

Frequently asked questions

npx skillmds@latest add serhiy-bzhezytskyy/grep-the-types-statics-first