domain-predicates

Generate predicates and Order instances for Effect-TS domain types.

68|13|Updated Aug 9, 2025
One-click install
npx skills add https://github.com/kriegcloud/beep-effect --skill domain-predicates-kriegcloud
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-predicates
Source: https://github.com/kriegcloud/beep-effect/tree/main/.claude/skills/domain-predicates
Command: npx skills add https://github.com/kriegcloud/beep-effect --skill domain-predicates-kriegcloud

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the generation of comprehensive predicates (for equality checks and filtering) and orders (for sorting) for domain types, leveraging typeclass patterns. This significantly reduces boilerplate code and ensures consistency in how domain data is compared and ordered.

Core Features & Use Cases

  • Typeclass-Driven Generation: Automatically creates equality and ordering instances based on existing typeclass implementations.
  • Compositional Patterns: Utilizes Equivalence.mapInput, Equivalence.combine, Order.mapInput, and Order.combine for flexible and powerful data manipulation.
  • Use Case: When working with complex domain objects like Task or Appointment, this Skill provides ready-to-use functions to check if two tasks are equal by ID, sort a list of appointments by status and then by time, or filter appointments scheduled within a specific date range.

Quick Start

Use the domain-predicates skill to generate an equivalence instance for the Task schema.

Frequently Asked Questions about domain-predicates

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

FAQPage Schema
How do I generate equality checks and sorting logic for Effect-TS domain types?

Generate equality checks and sorting logic for Effect-TS domain types by leveraging typeclass patterns to automatically derive Equivalence and Order instances from schemas, reducing boilerplate code for complex data structures.

What is the best way to sort complex domain objects by multiple criteria in Effect-TS?

Sort complex domain objects by multiple criteria in Effect-TS by combining multiple Order instances. This Skill uses Order.combine and Order.mapInput to facilitate multi-criteria sorting for structures like appointments sorted by status and time.

Can I automatically derive predicates from existing schemas for domain modeling?

Yes, you can automatically derive predicates from existing schemas for domain modeling. This Skill supports automatic derivation from schemas to create ready-to-use functions for structural equality checks and field-based comparisons.

How does structural equality work with compositional patterns in Effect-TS?

Structural equality in Effect-TS works through compositional patterns using Equivalence.mapInput and Equivalence.combine. These typeclass functions allow flexible comparison of complex domain objects by mapping and combining equivalence instances.

Do I need predefined typeclasses to generate domain predicates and orders?

You need existing typeclass implementations to automatically generate domain predicates and orders. This Skill builds on typeclass-driven generation to create consistent instances, but also supports manual composition of equivalences and orders when needed.

How do I filter and compare domain types like Task or Appointment in Effect-TS?

Filter and compare domain types like Task or Appointment in Effect-TS using generated predicates for equality checks. This Skill provides ready-to-use functions to check if two tasks are equal by ID or filter appointments scheduled within a specific date range.