effect-domain-predicates

effect-domain-predicates is a skill for Claude Code, Codex from mpsuesser/pi-effect-harness. It costs 18 tokens per session (5,878 once invoked), scanned A, original, MIT.

A pattern for generating complete comparison checks and sorting rules for domain types using Effect’s typeclass-style APIs.

In plain words
What is it for?
Use it to add predicates such as equality or ordering checks to domain models and create Order instances for sorting them.
Why use it?
It reduces the chance of missing common comparisons when a type needs equality, filtering, ordering, or sorting behavior. The rules are derived from the type’s existing definitions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add predicates such as equality or ordering checks to domain models and create Order instances for sorting them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mpsuesser/pi-effect-harness/effect-domain-predicates
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mpsuesser/pi-effect-harness --skill effect-domain-predicates
Clone the repo
git clone --depth 1 https://github.com/mpsuesser/pi-effect-harness

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for effect-domain-predicates

README.md
[![agentmods](https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-domain-predicates.svg)](https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-domain-predicates)
Your own site
<a href="https://agentmods.dev/skills/mpsuesser/pi-effect-harness/effect-domain-predicates"><img src="https://agentmods.dev/badge/skills/mpsuesser/pi-effect-harness/effect-domain-predicates.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,878 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.05878
Opus 5 $0.00009 $0.02939
Sonnet 5 $0.00004 $0.01176
Haiku 4.5 $0.00002 $0.00588

Measured 8d ago against content hash c872020cdd35, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

effect-domain-predicates scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

harnesses/effect/skills/effect-domain-predicates/SKILL.md · 868 lines

How it starts

The opening of the file, as written. The whole thing — 868 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Domain Predicates Skill

Generate complete sets of predicates and Order instances for domain types, derived from typeclass implementations.

Effect Source Reference

The Effect v4 source is available at ~/.cache/effect-v4/. Browse and read files there directly to look up APIs, types, and implementations.

Reference this for:

  • Full Schema API: packages/effect/SCHEMA.md
  • Order source: packages/effect/src/Order.ts
  • Equivalence source: packages/effect/src/Equivalence.ts
  • Predicate source: packages/effect/src/Predicate.ts
  • Effect source: packages/effect/src/

Pattern: Deep Structural Equality (v4)

In v4, Equal.equals performs deep structural comparison by default — no special wrapping is needed:

import { Schema, Equal, DateTime } from 'effect';

export const Task = Schema.TaggedStruct('pending', {
	id: Schema.String,
	createdAt: Schema.DateTimeUtc
});

export type Task = Schema.Schema.Type<typeof Task>;

declare const makeTask: (props: {
	id: string;
	createdAt: DateTime.Utc;
}) => Task;
declare const now: DateTime.Utc;

// Usage: Deep structural equality (automatic in v4)
const task1 = makeTask({ id: '123', createdAt: now });
const task2 = makeTask({ id: '123', createdAt: now });

Equal.equals(task1, task2); // true - deep structural equality

Pattern: Equivalence from Schema

When you need an Equivalence instance (for use with combinators), derive it from the schema:

import { Schema, Array } from 'effect';
import * as Equivalence from 'effect/Equivalence';

declare const Task: Schema.Schema<any, any, never>;
type Task = Schema.Schema.Type<typeof Task>;

// Derive from schema (structural equality)
export const TaskEquivalence = Schema.toEquivalence(Task);

declare const tasks: Array<Task>;

// Usage with combinators
const uniqueTasks = Array.dedupeWith(tasks, TaskEquivalence);

Pattern: Field-Based Equivalence with Equivalence.mapInput

Compare by specific fields using Equivalence.mapInput:

import { DateTime } from 'effect';
import * as Equivalence from 'effect/Equivalence';

interface Task {
	readonly _tag: string;
	readonly id: string;
	readonly createdAt: DateTime.Utc;
}

/**
 * Compare tasks by ID only.
 *
 * @category Equivalence
 * @since 0.1.0
 * @example
 * import * as Task from "@/schemas/Task"
 * import * as Array from "effect/Array"
 *
 * const uniqueById = Array.dedupeWith(tasks, Task.EquivalenceById)
 */
export const EquivalenceById = Equivalence.mapInput(
	Equivalence.String,
	(task: Task) => task.id
);

/**
 * Compare by status tag.
 *
 * @category Equivalence
 * @since 0.1.0
 */
export const EquivalenceByTag = Equivalence.mapInput(
	Equivalence.String,
	(task: Task) => task._tag
);

/**
 * Compare by creation date.
 *
 * @category Equivalence
 * @since 0.1.0
 */
export const EquivalenceByCreatedAt = Equivalence.mapInput(
	DateTime.Equivalence,
	(task: Task) => task.createdAt
);

Read the full file on GitHub · 868 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 868 lines · 18 tokens per session scan A c872020cdd35

Subscribe to this mod's changes

effect-domain-predicates is a skill published in the GitHub repository mpsuesser/pi-effect-harness (24 stars, last pushed 2mo ago), licensed MIT. It adds 18 tokens to every session and 5,878 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.