From effect
Effect Schema conventions and patterns. Triggers on Schema class creation, tagged unions, enums, type guards, or test fixtures using Effect Schema.
How this skill is triggered — by the user, by Claude, or both
Slash command
/effect:skills/schema-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
__ALWAYS use `Schema.make()` for creating instances:__
ALWAYS use Schema.make() for creating instances:
// ✅ GOOD - Use Schema.make()
const user = Schema.make(User)({ name: 'Alice', age: 30 })
// ❌ BAD - Manual construction
const user = { _tag: 'User', name: 'Alice', age: 30 }
ALWAYS use Schema.is() or static .is method:
// ✅ GOOD
if (Standard.is(value)) { ... }
if (Schema.is(Standard)(value)) { ... }
// ❌ BAD - manual _tag check
if (value._tag === 'Standard') { ... }
ALWAYS inline enum values directly in Schema.Enums():
// ✅ GOOD - inline values, use .enums for runtime access
export const Status = Schema.Enums({
active: 'active',
inactive: 'inactive',
})
export type Status = typeof Status.Type
// Runtime: Status.enums.active
// ❌ BAD - separate const object
export const StatusValues = {
active: 'active',
inactive: 'inactive',
} as const
export const Status = Schema.Enums(StatusValues)
Schema.make() for type-safe instantiationSchema.is() for type predicates, never manual _tag checksSchema.Enums().enums propertynpx claudepluginhub jasonkuhrt/claude-marketplace --plugin effectDefines @effect/schema for type-safe data validation, parsing, encoding, transformations including primitives, literals, structs, arrays, tuples in Effect TypeScript apps.
Defines runtime-validated TypeScript schemas using z.object, primitives, enums, literals, and schema composition. Useful for validating API responses, form submissions, and environment variables.
Enforces Effect-TS patterns for services with Effect.Service, errors via Schema.TaggedError, layer composition, and effect-atom React components. Use for type-safe Effect codebases.