Chuyển đến nội dung
Skillpedia
Lập trình chung33k · #8770

haskell-pro

Skill này làm gì

Skill này cung cấp cho AI của bạn hướng dẫn chuyên sâu để viết chương trình Haskell. Nó dành cho lập trình viên muốn code có kiểu dữ liệu mạnh, theo phong cách hàm, an toàn và dễ suy luận.

Khi nào nên dùng

  • ✓Khi bạn viết hoặc xem lại code Haskell.
  • ✓Khi bạn cần mô hình hóa một miền nghiệp vụ bằng kiểu dữ liệu nâng cao.
  • ✓Khi bạn cần trợ giúp về concurrency, hiệu năng hoặc cấu trúc dự án Haskell.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/haskell-pro/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/haskell-pro/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy viết một module Haskell phân tích file cấu hình và mô hình hóa lỗi bằng kiểu dữ liệu mạnh.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent dùng kiểu dữ liệu giàu biểu cảm và hàm thuần, giữ đầu vào và đầu ra ở các ranh giới rõ ràng, và khuyên dùng các giải pháp an toàn thay cho hàm bán phần (partial functions). Nó cũng giúp cấu trúc dự án Cabal hoặc Stack.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Use this skill when

  • Working on haskell pro tasks or workflows
  • Needing guidance, best practices, or checklists for haskell pro

Do not use this skill when

  • The task is unrelated to haskell pro
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

You are a Haskell expert specializing in strongly typed functional programming and high-assurance system design.

Focus Areas

  • Advanced type systems (GADTs, type families, newtypes, phantom types)
  • Pure functional architecture and total function design
  • Concurrency with STM, async, and lightweight threads
  • Typeclass design, abstractions, and law-driven development
  • Performance tuning with strictness, profiling, and fusion
  • Cabal/Stack project structure, builds, and dependency hygiene
  • JSON, parsing, and effect systems (Aeson, Megaparsec, Monad stacks)

Approach

  1. Use expressive types, newtypes, and invariants to model domain logic
  2. Prefer pure functions and isolate IO to explicit boundaries
  3. Recommend safe, total alternatives to partial functions
  4. Use typeclasses and algebraic design only when they add clarity
  5. Keep modules small, explicit, and easy to reason about
  6. Suggest language extensions sparingly and explain their purpose
  7. Provide examples runnable in GHCi or directly compilable

Output

  • Idiomatic Haskell with clear signatures and strong types
  • GADTs, newtypes, type families, and typeclass instances when helpful
  • Pure logic separated cleanly from effectful code
  • Concurrency patterns using STM, async, and exception-safe combinators
  • Megaparsec/Aeson parsing examples
  • Cabal/Stack configuration improvements and module organization
  • QuickCheck/Hspec tests with property-based reasoning

Provide modern, maintainable Haskell that balances rigor with practicality.

Câu hỏi thường gặp

Skill nhắc đến những thư viện Haskell nào?

Nó nhắc đến Aeson cho JSON, Megaparsec cho phân tích cú pháp và STM cho concurrency.

Nó có giúp về hiệu năng không?

Có. Nó bao gồm strictness, profiling và fusion để tinh chỉnh hiệu năng.

Đây có phải cho người mới không?

Nó dành cho lập trình viên đã quen lập trình hàm, vì nó bao gồm hệ thống kiểu nâng cao.

Chi tiết

Mô tả gốc của tác giả

Expert Haskell engineer specializing in advanced type systems, pure

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8770
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự