liberal-accept-strict-return

Installation
SKILL.md

Be Liberal in What You Accept and Strict in What You Produce

Overview

Accept broad input types, return narrow output types.

This is Postel's Law applied to TypeScript: functions should be flexible about what they accept but precise about what they return. This makes APIs easier to use and types more useful.

When to Use This Skill

  • Designing function parameters and return types
  • Creating reusable APIs or libraries
  • Function returns feel too broad for callers to use
  • Want to accept multiple input formats
  • Struggling with optional fields that shouldn't be optional in output

The Iron Rule

Installs
14
GitHub Stars
2
First Seen
Feb 3, 2026
liberal-accept-strict-return — marius-townhouse/effective-typescript-skills