Stats
Actions
Tags
From antigravity-awesome-skills
Quick reference for fp-ts pipe and flow: chain functions, compose operations, and build data pipelines. Includes usage patterns with Option and Array types.
How this skill is triggered — by the user, by Claude, or both
Slash command
/antigravity-awesome-skills:fp-pipe-refThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```typescript
import { pipe } from 'fp-ts/function'
// pipe(startValue, fn1, fn2, fn3)
// = fn3(fn2(fn1(startValue)))
const result = pipe(
' hello world ',
s => s.trim(),
s => s.toUpperCase(),
s => s.split(' ')
)
// ['HELLO', 'WORLD']
import { flow } from 'fp-ts/function'
// flow(fn1, fn2, fn3) returns a new function
const process = flow(
(s: string) => s.trim(),
s => s.toUpperCase(),
s => s.split(' ')
)
process(' hello world ') // ['HELLO', 'WORLD']
process(' foo bar ') // ['FOO', 'BAR']
| Use | When |
|---|---|
pipe | Transform a specific value now |
flow | Create reusable transformation |
import * as O from 'fp-ts/Option'
import * as A from 'fp-ts/Array'
// Option chain
pipe(
O.fromNullable(user),
O.map(u => u.email),
O.getOrElse(() => 'no email')
)
// Array chain
pipe(
users,
A.filter(u => u.active),
A.map(u => u.name)
)
// Data last enables partial application
const getActiveNames = flow(
A.filter((u: User) => u.active),
A.map(u => u.name)
)
// Reuse anywhere
getActiveNames(users1)
getActiveNames(users2)
npx claudepluginhub sickn33/antigravity-awesome-skills --plugin antigravity-bundle-aas-mobile-app-builderProvides quick reference for fp-ts pipe and flow functions to chain operations, compose functions, and build reusable data pipelines in TypeScript.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.