fp-pipe-ref
하는 일
이 도구는 코드에서 일련의 작업을 정리하도록 돕습니다. `pipe`는 값 하나에 여러 변환을 한 번에 적용합니다. `flow`는 여러 변환을 결합한 새 함수를 만들어 나중에 사용할 수 있게 합니다.
사용하는 경우
- ✓데이터에 여러 처리 단계를 적용해야 할 때.
- ✓특정 방식으로 데이터를 처리하는 재사용 가능한 함수를 만들 때.
- ✓함수를 순서대로 묶는 라이브러리와 작업할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/fp-pipe-ref/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“문자열에서 불필요한 공백을 제거하고, 대문자로 바꾼 다음, 단어로 나누려면 어떻게 하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
`pipe` 함수는 초기 값을 받아 함수들을 하나씩 차례로 통과시킵니다. `flow` 함수는 여러 함수를 하나의 새 함수로 결합해, 나중에 다른 값에도 같은 방식으로 처리할 수 있게 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
pipe & flow Quick Reference
pipe - Transform a Value
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
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
import * as O from 'fp-ts/Option'
import * as A from 'fp-ts/Array'
// Option chain
pipe(
O.fromNullable(user),
O.flatMap(u => O.fromNullable(u.email)),
O.getOrElse(() => 'no email')
)
// Array chain
pipe(
users,
A.filter(u => u.active),
A.map(u => u.name)
)
Common Pattern
// 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)
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Reference scope
These are fp-ts 2.x fragments. Supply application variables, types, validators and imports, and check the installed version. map does not catch thrown exceptions. Task has no typed error channel; an improperly wrapped promise can still reject. Use tryCatch at fallible boundaries.
Official API: fp-ts modules.
자주 묻는 질문
`pipe`와 `flow`의 차이는 무엇인가요?
`pipe`는 지금 특정 값에 함수들을 순서대로 적용할 때 씁니다. `flow`는 여러 번 나중에 사용할 변환을 결합한 새 함수를 만들 때 씁니다.
`pipe`와 `flow`는 무엇에 쓰나요?
함수를 연결하거나 결합하도록 도와서, 특히 처리 단계가 많을 때 코드를 더 읽기 쉽고 체계적으로 만듭니다.
어떤 데이터 타입과도 쓸 수 있나요?
네, `pipe`나 `flow`에서 사용하는 함수들이 서로 주고받는 데이터 타입과 호환되는 한 가능합니다.
상세 정보
작성자의 원본 설명
Quick reference for pipe and flow. Use when user needs to chain functions, compose operations, or build data pipelines in fp-ts.
인기도
- GitHub 스타
- 48k
- 순위
- #4644
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.