type-safety
Skill1 starsChanged 3 months agoMITView on GitHub
Use when writing or refactoring a Zod schema, converting an `any` to a real type, or designing typed request/response contracts. Enforces strict typing and runtime validation.
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- idavidov13/agentic-playwrighttheir own version, first seen Nov 8, 2026
- jars-demo/jars-skillstheir own version, first seen Oct 25, 2026
- Mushfiqur-Rahman-Robin/coding-rulestheir own version, first seen Oct 13, 2026
- hzblj/skillstheir own version, first seen Jul 15, 2026
- MANVENDRA-github/agentrytheir own version, first seen Jul 6, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- idavidov13/agentic-playwright★ 294same name
- hzblj/skills★ 1same name
- jars-demo/jars-skills★ 0same name
- MANVENDRA-github/agentry★ 0same name
- Mushfiqur-Rahman-Robin/coding-rules★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- ai-native-workflowSkill
- api-testingSkill
- bootstrapSkill
- common-tasksSkill
- configSkill
- data-strategySkill
- debuggingSkill
- enumsSkill
- fixturesSkill
- page-objectsSkill
- salesforce-authSkill
- salesforce-dataSkill
- salesforce-locatorsSkill
- salesforce-metadata-contractSkill
- salesforce-personasSkill
- salesforceSkill
- salesforce-waitsSkill
- security-testingSkill
- selectorsSkill
- test-standardsSkill
- wait-strategySkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Use precise validators: z.string().uuid(), z.string().email(), z.string().datetime(), z.number().int(), z.enum([...]).
- Distinctive: line 21
Every API response body is validated:
- Very specific: line 35
Prefer interface for object shapes, type for unions/utilities.
- Very specific: line 40
If the live response disagrees with the documented contract, file it (test.skip + // FIXME).
- Very specific: line 41
Never widen the schema (.passthrough(), .optional() everywhere, z.any()) to make red go green.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Type Safety
The type system is load-bearing here. any is banned (ESLint error). Runtime validation backs the
compile-time types so contract drift surfaces as a test failure, not a silent pass.
Zod schemas
z.strictObjectalways, neverz.object. Strict mode fails on unexpected fields — that's the point: an undocumented field is drift you want to catch.- Use precise validators:
z.string().uuid(),z.string().email(),z.string().datetime(),z.number().int(),z.enum([...]). - Export the schema AND the inferred type:
export type User = z.output<typeof UserSchema>. - Repeated envelope across 3+ schemas → extract (
_envelope.ts,_error.schema.ts). - Schemas live in
fixtures/api/schemas/{area}/.
Validate at runtime
Every API response body is validated:
const { data } = await api.get(path, { schema: UserSchema }); // throws on drift; data is typed
// or explicitly:
expect(UserSchema.parse(body)).toBeTruthy();Type generics alone are NOT enough — they're erased at runtime. The .parse() is what catches drift.
Killing any
- External/unknown input → type as
unknown, then narrow (schema parse, type guard). - Function signatures get explicit param + return types.
- Prefer
interfacefor object shapes,typefor unions/utilities. process.env.Xisstring | undefined— handle with??fallback or therequired()helper inconfig/app.config.ts. Neveras stringto silence it.
Drift is a bug, not a fix
If the live response disagrees with the documented contract, file it (test.skip + // FIXME).
Never widen the schema (.passthrough(), .optional() everywhere, z.any()) to make red go green.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

