fp-pipe-ref
Quick reference for pipe and flow. Use when user needs to chain functions, compose operations, or build data pipelines in fp-ts.
About this skill
This skill provides an AI agent with immediate access to a quick reference guide for `fp-ts`'s `pipe` and `flow` functions. It's designed to help the agent accurately demonstrate, explain, or generate TypeScript code that leverages functional programming concepts for chaining operations, composing functions, and building robust data pipelines. The reference includes clear examples of how `pipe` transforms a value through a sequence of functions and how `flow` creates a reusable function pipeline, ensuring the agent adheres to best practices in functional TypeScript development.
Best use case
Generating `fp-ts` code snippets, explaining functional programming concepts, or providing guidance on building data transformation pipelines within a TypeScript context.
Quick reference for pipe and flow. Use when user needs to chain functions, compose operations, or build data pipelines in fp-ts.
Accurate `fp-ts` code examples for `pipe` and `flow`, clear explanations of their usage, or a demonstration of functional composition patterns applied to data manipulation.
Practical example
Example input
How do I use `fp-ts` pipe to process a string by trimming, uppercasing, and then splitting it?
Example output
```typescript
import { pipe, flow } from 'fp-ts/function'
// Using pipe to transform a value:
const resultPipe = pipe(
' hello world ',
s => s.trim(),
s => s.toUpperCase(),
s => s.split(' ')
)
// resultPipe will be: ['HELLO', 'WORLD']
// Using flow to create a reusable function:
const processStringFlow = flow(
(s: string) => s.trim(),
s => s.toUpperCase(),
s => s.split(' ')
);
const resultFlow = processStringFlow(' another example ');
// resultFlow will be: ['ANOTHER', 'EXAMPLE']
```When to use this skill
- When the user needs to understand or implement functional composition using `pipe` or `flow` in `fp-ts`; when requesting examples of chaining operations in TypeScript; or when an AI agent needs to provide guidance on building data transformation pipelines in a functional style.
When not to use this skill
- For general programming tasks unrelated to `fp-ts` or functional programming concepts; when the task involves direct interaction with external APIs or services, as this skill is purely informational/conceptual for code generation.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/fp-pipe-ref/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How fp-pipe-ref Compares
| Feature / Agent | fp-pipe-ref | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Quick reference for pipe and flow. Use when user needs to chain functions, compose operations, or build data pipelines in fp-ts.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# pipe & flow Quick Reference
## pipe - Transform a Value
```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']
```
## flow - Create Reusable Pipeline
```typescript
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']
```
## When to Use
| Use | When |
|-----|------|
| `pipe` | Transform a specific value now |
| `flow` | Create reusable transformation |
## With fp-ts Types
```typescript
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)
)
```
## Common Pattern
```typescript
// 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)
```Related Skills
n8n-expression-syntax
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
mermaid-expert
Create Mermaid diagrams for flowcharts, sequences, ERDs, and architectures. Masters syntax for all diagram types and styling.
mcp-builder-ms
Use this skill when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
makepad-deployment
CRITICAL: Use for Makepad packaging and deployment. Triggers on: deploy, package, APK, IPA, 打包, 部署, cargo-packager, cargo-makepad, WASM, Android, iOS, distribution, installer, .deb, .dmg, .nsis, GitHub Actions, CI, action, marketplace
macos-menubar-tuist-app
Build, refactor, or review SwiftUI macOS menubar apps that use Tuist.
kaizen
Guide for continuous improvement, error proofing, and standardization. Use this skill when the user wants to improve code quality, refactor, or discuss process improvements.
issues
Interact with GitHub issues - create, list, and view issues.
hugging-face-tool-builder
Your purpose is now is to create reusable command line scripts and utilities for using the Hugging Face API, allowing chaining, piping and intermediate processing where helpful. You can access the API directly, as well as use the hf command line tool.
git-pushing
Stage all changes, create a conventional commit, and push to the remote branch. Use when explicitly asks to push changes ("push this", "commit and push"), mentions saving work to remote ("save to github", "push to remote"), or completes a feature and wants to share it.
git-hooks-automation
Master Git hooks setup with Husky, lint-staged, pre-commit framework, and commitlint. Automate code quality gates, formatting, linting, and commit message enforcement before code reaches CI.
gh-review-requests
Fetch unread GitHub notifications for open PRs where review is requested from a specified team or opened by a team member. Use when asked to "find PRs I need to review", "show my review requests", "what needs my review", "fetch GitHub review requests", or "check team review queue".
fp-types-ref
Quick reference for fp-ts types. Use when user asks which type to use, needs Option/Either/Task decision help, or wants fp-ts imports.