Apply 80/20 fp-ts in TypeScript and skip FP when it hurts readability. Use when choosing pipe, Option, or Either, or deciding whether FP helps the code. It does not apply named community styles (that's `code-style-patterns`).
66
79%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./plugins/tooling/skills/pragmatic-fp/SKILL.mdRead this first. This guide cuts through the academic jargon and shows what actually matters. No category theory. No abstract nonsense. Just patterns that make your code better in practice.
This skill gives you the 80/20 of fp-ts in TypeScript, informed by the "Functional-Light" mindset from Kyle Simpson's Functional-Light JavaScript: focus on readable, "reasonable" code; use FP where it increases confidence and communication; stop where it hurts clarity.
The five patterns deliver most of the benefit. Clear rules tell you when to use them: and, most importantly, when to keep code simple instead.
State what you're trying to do (e.g. "I have a chain of null checks" or "help me decide if I should introduce fp-ts here") or name the mode below.
| Mode | What you get | Load |
|---|---|---|
| Core patterns | The five patterns (pipe, Option, Either, map, flatMap) with before/after and plain-language translations, grounded in practical composition and side-effect management | references/80-20-patterns.md |
| When to skip | Concrete cases where FP hurts more than it helps + what to use instead (including "reasonable code" balance from Functional-Light principles) | references/when-not-to-use.md |
| Quick wins | Five easy, high-impact changes you can make today | references/quick-wins.md |
| Real refactors | Before-and-after for callback hell, multi-null chains, validation, and Promise code | references/common-refactors.md |
| Readability + cheat sheet | The "would a junior understand this?" rule (echoing FLJS emphasis on readability and communication), good vs too-clever examples, and quick-reference table | references/readability-rule.md |
If functional programming makes your code harder to read, don't use it.
This is the core of "Functional-Light" thinking (see Kyle Simpson's Functional-Light JavaScript, especially Chapter 1 on readability, confidence, and finding balance). FP is a tool for writing more reasonable code: code that is easier for humans (including future you and junior teammates) to understand, communicate about, and maintain. It is not a religion or an end in itself.
Use the patterns below when they increase clarity and reduce surprises. Skip them (or use simpler idioms) when they add noise. The goal is better code, not "more FP."
Load
references/limitations.mdfor the precise scope and boundaries of this skill.
Core patterns → Apply: You can state the golden rule and name the five patterns with their primary use case?
Apply a pattern → Restrain: You have identified at least one place in the current task where the simple/idiomatic version is better?
Any change → Readability: The result is at least as easy for a junior developer to read as the starting code?
At the end of every session, ask: "Did this solve what you were trying to do?"
df60de1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.