跳到正文
cccskills
免费在 GitHub 公开

haskell

Use this when writing or reviewing Haskell code. Covers error handling, type safety, idiomatic patterns, HLint compliance, Aeson usage, and testing.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(2)

  • SKILL.md2.0 KB
  • RELUDE.md2.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Haskell Development

Error Handling

  • NEVER use undefined or error as placeholders
  • Handle ALL Maybe/Either cases explicitly — no silent ignoring
  • Handle all pattern match cases — no partial matches
  • Use types to make impossible states unrepresentable

Type Safety & Idioms

  • Write type signatures for all top-level definitions
  • Prefer Text over String
  • Use newtype wrappers for domain types
  • Apply smart constructors for validation
  • Write total functions — avoid head, tail, and other partial functions
  • Prefer pure functions over IO
  • Use explicit module exports
  • Favor composition over complex functions
  • Write Haddock documentation for public APIs

Records

  • Use OverloadedRecordDot (add pragma to modules that use the syntax)
  • Use DisambiguateRecordFields and DuplicateRecordFields for simple field names
  • Use lenses for record manipulation when appropriate

Aeson

  • NEVER construct aeson objects by hand
  • Create a type and use encode/decode on it
  • Prefer generic deriving; hand-write instances only when the wire format requires it

HLint

If .hlint.yaml exists in the project root, run hlint on every modified file. Fix ALL warnings before considering the task complete.

Build Workflow

If ghcid.txt exists in the project, check it after every code change for compile errors. Do not proceed until it is clean. If this file does not exist, use whatever build workflow the project documents.

When adding or deleting .hs modules: update the .cabal file, or run hpack if package.yaml exists.

Relude

If the project uses relude (check .cabal or package.yaml dependencies), also follow RELUDE.md for idiomatic substitutions.

Testing

  • QuickCheck for property-based testing
  • HUnit or Hspec for unit tests

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Review code for quality, simplicity, and common mistakes before declaring work complete.

中文简介正在准备中。当前显示原文说明。

juspay/vira202026年5月15日 更新

do

免费

Do a task end-to-end — implement, PR, CI loop, ship. ONLY invoke when the user explicitly types `/do` or `$do`; never auto-select from a natural-language request, even one that sounds like an end-to-end task.

中文简介正在准备中。当前显示原文说明。

juspay/vira202026年5月15日 更新

elegance

免费

Iteratively study and apply elegant coding patterns. Each iteration - understand the code, research what simple and elegant code looks like, apply learnings, verify with CI. Use as a standalone refactoring pass or when the user asks to make code more elegant, simple, or idiomatic.

中文简介正在准备中。当前显示原文说明。

juspay/vira202026年5月15日 更新

Audit code for correctness and rigor — logic errors, silent error swallowing, wishful thinking, and unjustified fallbacks. This is not a style review; it's a logic review. Use when you want a focused correctness audit separate from the full code-police pass.

中文简介正在准备中。当前显示原文说明。

juspay/vira202026年5月15日 更新

forge-pr

免费

Write engaging PR titles and descriptions for any forge (GitHub today; Bitbucket planned). Use when creating or updating PRs. Leads with narrative paragraphs and reaches for lists, tables, and diagrams when content is genuinely structured.

中文简介正在准备中。当前显示原文说明。

juspay/vira202026年5月15日 更新

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

中文简介正在准备中。当前显示原文说明。

juspay/vira202026年5月15日 更新

查看 juspay 的全部技能

报告此技能的问题