Automated summary
Defines Effect schemas with domain types and ensures type parity using satisfies and tsafe's Equals check.
Strengths
- Ensures compile-time type safety between schema and domain type
- Catches type mismatches early
- Leverages Effect's Schema library
- Uses tsafe for exact equality checks
Limitations
- Requires the tsafe library
- Can be verbose
- Assert overkill for simple schemas
When defining Effect schemas for complex domain models that require precise type alignment.
For simple or one-off schemas where type parity is not critical.
Security analysis
SafeThe skill provides guidance on writing TypeScript type definitions and schema assertions, with no executable code or risky operations.
No concerns found
How this analysis is madeExamples
Create an Effect schema for the domain type interface IProduct { id: string; name: string; price: number; } and ensure type parity using satisfies and tsafe's Equals.Update the ZUser schema to match the IUser interface after adding a new 'age' field. Use satisfies and assert Equals.Given an unknown value, validate it against the ZOrder schema using validateUnknown from zerospin if available.name: effect-schema description: Define Effect schemas that are verified against domain types. Use when authoring or updating Effect Schema definitions, or when the user mentions schema/type parity, satisfies, or tsafe Equals checks.
Effect Schema Type Parity
Instructions
- Define the domain type first (prefer
interface), then define the schema and assert parity. - Always use
satisfies Schema.Schema<YourType, any>on the schema. - Add
assert<Equals<typeof YourSchema.Type, Readonly<YourType>>>()usingtsafe. - If the
assert<Equals<...>>isn't typed correctly but thesatisfiesis, you can optionally add the_check1/_check2assignments withvoid(seeZerospinCommandSchema). - When validating unknown input against an Effect schema, prefer
validateUnknownfromzerospinif available.
Example
import type { Equals } from 'tsafe';
import { Schema } from 'effect';
import { assert } from 'tsafe';
export interface IFoo {
bar: string;
}
export const ZFoo = Schema.Struct({
bar: Schema.String,
}) satisfies Schema.Schema<IFoo, any>;
const _check1: typeof ZFoo.Type = {} as IFoo;
const _check2: IFoo = {} as typeof ZFoo.Type;
void _check1;
void _check2;
assert<Equals<typeof ZFoo.Type, Readonly<IFoo>>>();
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/effect-schema-type-parity-mm8o52ie' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/effect-schema-type-parity-mm8o52ie/download' --output '.skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md.part' && mv '.skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md.part' '.skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md' && test -s '.skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/effect-schema' && cp -R '.skill-downloads/effect-schema-type-parity-mm8o52ie' '.claude/skills/effect-schema'Cursor
test -f '.skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md' && test -s '.skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/effect-schema' && cp -R '.skill-downloads/effect-schema-type-parity-mm8o52ie' '.cursor/skills/effect-schema'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/effect-schema-type-parity-mm8o52ie'openskills read 'effect-schema-type-parity-mm8o52ie'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/effect-schema-type-parity-mm8o52ie/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.