lib-returns
OfficialRobust result flow and error handling.
Software Engineering#error handling#python#functional programming#composition#result type#railway oriented programming
Authorflext-sh
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a robust and declarative way to handle operations that can either succeed with a value or fail with an error, preventing runtime exceptions and simplifying error propagation.
Core Features & Use Cases
- Railway-Oriented Programming: Chain operations using
.map()and.flat_map()for pure transformations and result-returning operations, respectively. - Error Recovery: Gracefully handle failures using
.lash()and.recover()instead of imperativeif/elsechecks. - Use Case: Safely process user input, perform database operations, or call external APIs, ensuring that errors are caught and handled predictably within a composed chain of operations.
Quick Start
Use the lib-returns skill to safely parse a JSON string into a Python dictionary, returning a failure if parsing fails.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 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: lib-returns Download link: https://github.com/flext-sh/flext/archive/main.zip#lib-returns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.