fp-pipe-ref
यह क्या करती है
ये tools आपके कोड में क्रमिक कार्यों को व्यवस्थित करने में मदद करते हैं। `pipe` एक value पर एक के बाद एक कई बदलाव एक साथ लागू करता है। `flow` एक नया function बनाता है जो कई बदलावों को जोड़ता है, ताकि उसे बाद में इस्तेमाल किया जा सके।
कब इस्तेमाल करें
- ✓जब डेटा पर कई प्रोसेसिंग steps लागू करने हों।
- ✓ऐसा reusable function बनाने के लिए जो डेटा को एक खास तरीके से प्रोसेस करे।
- ✓ऐसी libraries के साथ काम करते समय जो functions को क्रम में व्यवस्थित करती हैं।
Skill का लिंक
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 में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं किसी string से extra spaces हटाकर, उसे uppercase करके, फिर शब्दों में कैसे बांटूं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
`pipe` function एक शुरुआती value लेता है और उसे एक के बाद एक functions से गुज़ारता है। `flow` कई functions को मिलाकर एक नया function बनाता है, जिसे फिर अलग-अलग values को उसी तरीके से प्रोसेस करने के लिए इस्तेमाल किया जा सकता है।
तकनीकी सामग्री (मूल 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` किसी खास value को अभी बदलने के लिए है, जिसमें functions क्रम से लागू होते हैं। `flow` एक नया function बनाने के लिए है जो बदलावों को जोड़ता है, ताकि उसे बाद में कई बार इस्तेमाल किया जा सके।
`pipe` और `flow` किसलिए इस्तेमाल होते हैं?
ये functions को एक-दूसरे से जोड़ने में मदद करते हैं, जिससे कोड ज़्यादा पढ़ने लायक और व्यवस्थित बनता है, खासकर जब कई प्रोसेसिंग steps हों।
क्या मैं इसे किसी भी तरह के डेटा के साथ इस्तेमाल कर सकता हूं?
हां, बशर्ते `pipe` या `flow` में इस्तेमाल हो रहे functions उन data types के साथ मेल खाते हों जो उनके बीच पास किए जा रहे हैं।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।