effect-facet-predicate-combinators

star 3

Guidance for facet `effect/Predicate#combinators` focused on APIs like compose. Load after `effect-skill-router` when this facet is the primary owner.

TylorS By TylorS schedule Updated 2/21/2026

name: effect-facet-predicate-combinators description: Guidance for facet effect/Predicate#combinators focused on APIs like compose. Load after effect-skill-router when this facet is the primary owner.

Effect Facet Predicate#combinators

Owned scope

  • Owns only effect/Predicate#combinators.
  • Parent module: effect/Predicate.

What it is for

  • logical predicate composition. Predicate and Refinement helpers for runtime checks, filtering, and type narrowing. This module provides small, pure functions you can combine to decide whether a value matches a condition and, when using refinements, narrow TypeScript types.

API quick reference

  • compose
  • Full API list: references/api-reference.md

How to use it

  • Keep work focused on the combinators concern for effect/Predicate.
  • Prefer pipe-based composition to keep transformations explicit and testable.
  • Use the reference docs to select the smallest API surface that solves your task.
  • Validate behavior against existing tests before introducing new usage patterns.

Starter example

import * as Predicate from "effect/Predicate";

const isPositive = (n: number) => n > 0;
const data = [2, -1, 3];

console.log(data.filter(isPositive));

Common pitfalls

  • Prefer explicit, typed combinators over ad-hoc casting or unchecked assumptions.

Not covered here

  • Sibling facets under the same parent are out of scope:
    • effect-facet-predicate-core (effect/Predicate#core)
    • effect-facet-predicate-guards (effect/Predicate#guards)
  • Parent module ownership belongs to effect-module-predicate.

Escalate to

  • effect-module-predicate for parent module-wide workflows.
  • effect-skill-router for cross-module routing and ownership checks.

Reference anchors

  • Parent tests: packages/effect/test/Predicate.test.ts
  • Parent tests: packages/effect/test/Iterable.test.ts
  • API details: references/api-reference.md
  • Usage notes: references/usage-reference.md
  • Ownership mapping: references/owner.md
Install via CLI
npx skills add https://github.com/TylorS/typed-smol --skill effect-facet-predicate-combinators
Repository Details
star Stars 3
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator