fp-pipe-ref – skill Dữ liệu & Khoa học cho agent AI
Tài liệu tham khảo nhanh về pipe và flow. Dùng khi cần nối chuỗi hàm, kết hợp phép toán hoặc xây dựng pipeline dữ liệu trong fp-ts.
Cài skill fp-pipe-ref bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/fp-pipe-ref-da5fd.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /fp-pipe-ref – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/fp-pipe-ref-da5fd.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $fp-pipe-ref – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/fp-pipe-ref-da5fd.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /fp-pipe-ref – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/fp-pipe-ref-da5fd.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /fp-pipe-ref – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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](https://gcanti.github.io/fp-ts/modules/).
Skill liên quan
- senior-data-engineer – Skill data engineering để xây dựng data pipelines có khả năng mở rộng, hệ thống ETL/ELT…
- gdpr-compliance – Triển khai các yêu cầu bảo vệ dữ liệu GDPR. Cấu hình quản lý consent, quyền của chủ thể…
- senior-data-scientist – Skill data scientist cấp cao hàng đầu, chuyên về mô hình thống kê, thiết kế thử nghiệm…
- gdpr-data-handling – Hướng dẫn thực hành triển khai thiết kế xử lý dữ liệu theo GDPR, quản lý consent và các…
- gemini-deep-research – Chạy nghiên cứu tự động nhiều bước với Gemini Deep Research Agent của Google: khởi tạo…
- geo-crawlers – Phân tích quyền truy cập của AI crawler.
- senior-ml-engineer – Kỹ năng kỹ sư ML để đưa model vào production, xây dựng pipeline MLOps và tích hợp LLM…
- senior-pm – Senior Project Manager cho phần mềm doanh nghiệp, SaaS và dự án chuyển đổi số. Chuyên…