operator-substitutions

Official

Code in plain English, not cryptic symbols.

Authorsite-bender
Version1.0.0
Installs0

System Documentation

What problem does it solves? This Skill eliminates cryptic JavaScript operators and methods, replacing them with readable, self-documenting Toolsmith functions. It drastically reduces cognitive load, making code easier to understand, maintain, and less prone to subtle errors, so you can read code like a book.

Core Features & Use Cases

  • Plain English Logic: Replaces !value with not(value), array.length > 0 with isNotEmpty(array), and x === y with isEqual(x)(y).
  • Consistent API: Provides a uniform API for checking emptiness across arrays, strings, objects, maps, and sets (e.g., isEmpty(collection)).
  • Enhanced Type Safety & Composability: Toolsmith functions often return Result monads or provide better type narrowing, enabling safer and more composable logic.
  • Use Case: Instead of writing if (user.roles.length === 0 || !user.isAdmin), you would use this skill to write if (or(isEmpty(user.roles))(not(user.isAdmin))). This reads like a sentence, making the condition immediately clear.

Quick Start

Rewrite the condition if (items.length > 0 && user.isAdmin) using Toolsmith operator substitutions.

Dependency Matrix

Required Modules

None required

Components

examples

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: operator-substitutions
Download link: https://github.com/site-bender/sitebender/archive/main.zip#operator-substitutions

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.