haskell-pro
它能做什么
这个技能为你的 AI 智能体提供编写 Haskell 程序的专家指导。适合希望代码强类型、函数式、安全且易于推理的开发者。
适用场景
- ✓当你编写或审查 Haskell 代码时。
- ✓当你需要用高级类型为某个领域建模时。
- ✓当你需要 Haskell 并发、性能或项目设置方面的帮助时。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/haskell-pro/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请编写一个 Haskell 模块,解析配置文件,并用强类型来表示错误。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体使用表达力强的类型和纯函数,让输入输出保持在清晰的边界内,并推荐使用安全的替代方案来代替偏函数。它也会帮助设置 Cabal 或 Stack 项目结构。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
- Use expressive types, newtypes, and invariants to model domain logic
- Prefer pure functions and isolate IO to explicit boundaries
- Recommend safe, total alternatives to partial functions
- Use typeclasses and algebraic design only when they add clarity
- Keep modules small, explicit, and easy to reason about
- Suggest language extensions sparingly and explain their purpose
- 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.
常见问题
它提到了哪些 Haskell 库?
它提到了用于 JSON 的 Aeson、用于解析的 Megaparsec,以及用于并发的 STM。
它能帮助提升性能吗?
能。它涵盖严格性、性能分析和融合(fusion)等性能调优方法。
它适合初学者吗?
它面向熟悉函数式编程的开发者,因为它涵盖高级类型系统。
详情
作者的原始描述
Expert Haskell engineer specializing in advanced type systems, pure
热度
- GitHub 星标
- 33k
- 排名
- #8770
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。