Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

neohaskell-best-practices

БесплатноЗапускает вложенные скриптыНе проверен

Implement and review NeoHaskell framework, language, and toolchain internals. Use for Haskell API design, boundary parsing, service records, effects…

neohaskellот neohaskell★ 349 звёзд на GitHub

Об этом скилле

NeoHaskell best practices

Apply NeoHaskell code guidelines for the dialect and Type System Discipline for type design. Ground API choices in the maintained module and its callers. Follow AGENTS.md for the shared workflow.

Rule Summary
Data last Design transformation APIs with configuration, predicates, and callbacks first and the primary transformed value last, so callers can pipe the value through stages. Read existing signatures; adapt explicitly instead of assuming every current API has this order.
Pipelines for composition Compose transformations with |> and read them in execution order. Use it instead of (.), $, <<, >>, or nested transformation calls. Ordinary application, constructors, record field access, and Task sequencing retain their own meaning.
Explicit function parameters No point-free definitions or aliases: name every declared input, including the final piped value. Name anonymous callback inputs explicitly too. Passing a named helper as a callback and partially applying leading arguments in a pipeline stage are valid.
Named, readable steps Give each helper one clear job and name it by intent. Give top-level helpers explicit type signatures. Split a pipeline when its steps stop describing one coherent transformation; use named intermediates when branches or several inputs need context. Use explicit lambdas instead of clever operator sections or flip.
Boolean conditions and ADT cases Use ordinary if condition then ... else ... for Boolean checks and case for constructors of Maybe, Result, and other ADTs. Use regular else if chains when needed. Do not use MultiWayIf or case on True/False.
Algebraic data types Put each valid case and its required data in a constructor. If fields become present or absent together, encode those states with constructors; keep genuinely independent absence as Maybe. Use named ADT modes when Boolean parameters hide domain meaning; retain Bool for genuine predicates and clearly named Boolean fields. Match constructors explicitly when adding a case should force a caller decision; preserve the build's incomplete-pattern checks.
Module-qualified API names Design the module, type, and operation names together. The module supplies the subject: Array.first, Array.append, and Map.get; avoid repeating that subject in function names. Match a type-centered public module and its principal type, enabling paired imports such as import Array (Array) and import Array qualified.
Intentional module APIs Group helpers around the owning type or subsystem and export its intended contract. Keep implementation helpers private. Restrict constructor access when it protects a concrete invariant; expose constructors when caller pattern matching belongs to the contract.
Semantic newtypes Prefer newtype over type for an abstraction with its own meaning, operations, or ownership. Follow Type System Discipline for module ownership, transparent-alias exceptions, and construction guarantees.
Constructive, total representations Prefer a shape that carries the required guarantee, such as a head plus rest or pairs. Keep ordinary collections when the contract is total; Array.first and LinkedList.head already represent absence with Maybe. A start plus duration still needs a nonnegative-duration invariant.
Foreign results Convert a GHC or foreign Either with Result.fromEither before branching, then match Ok and Err. Keep raw Left/Right matching inside the owning Result conversion implementation. Preserve the original error value and evaluation behavior.
Boundary parsing and errors Decode external Text, Bytes, or Json.Value into the owning type, then establish semantic constraints the decoder does not check. Use Result for explained pure failure and Task for effects; preserve typed errors until an adapter owns their presentation. Follow Boundary Discipline.
Authoritative shapes Reuse owning types, type families, and existing Generic/Template Haskell derivation. ToSchema derives a schema from a Haskell type; it is not an input validator. Keep custom decoding when the contract requires it, and check what a marker already generates before adding instances.
Necessary declarations Follow Minimize Reader Load. Keep derived capabilities, imports and annotations for demonstrated constraints or operations. Remove automatically supplied and unused boilerplate from consumer examples.
Checked conversions Establish the semantic precondition as well as representation compatibility. Read conversion behavior: Int.fromInt64 clamps, so it does not prove an exact conversion. Do not replace an unexplained partial p
Полный SKILL.md на GitHub

Установить neohaskell-best-practices в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/patterns.mdreferences/readable-services.mdscripts/bounded_process.pyscripts/repo-rootscripts/toolchain-fpscripts/with-toolchain

FAQ

Что делает скилл neohaskell-best-practices?

Implement and review NeoHaskell framework, language, and toolchain internals. Use for Haskell API design, boundary parsing, service records, effects, concurrency, derivation, and their tests in this repository; not as an application-building guide.

Как установить скилл neohaskell-best-practices?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл neohaskell-best-practices запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить neohaskell-best-practices с