跳到正文
Skillpedia
通用编程48k · #4797

haskell-pro

它能做什么

这个 AI 代理是 Haskell 编程语言的专家。它可以帮助设计和审查 Haskell 代码,重点关注安全性、性能和良好的编程实践。

适用场景

  • ✓在创建或审查复杂的 Haskell 数据类型时。
  • ✓在优化现有 Haskell 代码的性能或安全性时。
  • ✓在组织 Haskell 项目结构时,包括构建和依赖管理。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/haskell-pro/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/haskell-pro/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请审查这段 Haskell 代码的正确性、是否符合语言习惯的设计、性能以及测试覆盖率。”

每周 5 个新技能,1 分钟读完。

工作原理

它会分析你的 Haskell 代码,利用高级语言特性提出改进建议,并解释每处修改,确保你能理解。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use this skill when

  • Designing domain invariants with newtypes, algebraic data types or GADTs.
  • Reviewing Haskell parsing, STM/async resource safety, project builds or measured allocation and latency.

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.

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.

Example

User request:

Review this Haskell implementation for correctness, idiomatic design, performance, and test coverage.

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.
常见问题

Haskell 中的 “types” 是什么?

类型定义了变量可以保存哪种数据(比如数字或文本),有助于在程序运行之前就避免错误。

“resource safety” 是什么意思?

指确保程序正确处理文件或网络连接等资源,并在不再需要时将其关闭,以防出现问题。

Haskell 中的 “building” 是什么?

指把你编写的 Haskell 代码转换成计算机可以执行的程序的过程。

详情

作者的原始描述

Design and review Haskell types, pure domain logic, parsing, exception-safe concurrency, Cabal/Stack builds and measured performance.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4797
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能