effect-domain-predicates

Generates predicates, oracles and sortings for Laravel Eloquent models.

22|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-domain-predicates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-domain-predicates
Source: https://github.com/mpsuesser/pi-effect-harness/tree/main/harnesses/effect/skills/effect-domain-predicates
Command: npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-domain-predicates

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes repetitive, error-prone work of hand-writing equality, equivalence-based deduplication, filtering predicates, and multi-criteria sorting for domain models by deriving them from Effect v4 typeclass implementations and schema structure.

Core Features & Use Cases

  • Derives equivalence from Schema using structural equality via Schema.toEquivalence, then uses it with combinators like deduplication.
  • Builds field-based equivalences with Equivalence.mapInput and combines them with Equivalence.combine for multi-criteria identity.
  • Creates sortable domain orders with Order.mapInput and composes multi-criteria ordering using Order.combine (with clear precedence rules).
  • Re-exports complete predicate sets for domain types by using typeclass-driven patterns such as schedulable and durable field predicates.
  • Use Case: For an Appointment domain, generate predicates like isScheduledThisWeek and orders like OrderByStatusThenTime, then use them for filtering, sorting, and deduplicating lists in pipelines.

Quick Start

Ask the AI to generate the full set of Effect v4 predicates, equivalences, and Order instances for your domain type (including multi-field combinations) based on your schema/typeclass definitions.

Frequently Asked Questions about effect-domain-predicates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I derive equivalence and ordering from Effect Schema for domain types?

You derive equivalence and ordering from Effect Schema by using Schema.toEquivalence for structural equality, then applying Equivalence.mapInput and Order.mapInput to build field-based instances for domain types.

What is the best way to implement multi-criteria sorting for structured domain models?

Implement multi-criteria sorting by using Order.combine to compose multiple Order.mapInput instances. This establishes deterministic multi-key sorting precedence for structured domain models like schedules and tagged variants.

How do I generate filtering predicates for tagged variants in Effect?

Generate filtering predicates for tagged variants by applying typeclass-driven patterns. This approach re-exports complete predicate sets, such as schedulable and durable field predicates, directly from schema definitions.

Can I use Effect typeclass patterns to deduplicate lists of domain objects?

Yes, you can deduplicate domain object lists by using the structural equality derived from Schema.toEquivalence. The generated equivalence instances can then be used directly with combinators like deduplication.

Does deriving domain predicates from Schema require manually writing equality logic?

No, deriving domain predicates does not require manually writing equality logic. The process removes repetitive work by generating predicates, equivalences, and orders automatically from Effect v4 typeclass implementations and schema structure.