Elm Coding Practices
Application skill for Elm style learning (from the archived awesome-guidelines style capsules). For TEA architecture and Html patterns, combine with stack capsules in skills/*-foundation.
Core Principle
Elm quality is regular layout plus compiler support, formatted mechanically, typed explicitly, modules focused on one custom type.
When to Use / NOT
- Elm applications, packages, and
src/ modules.
- Setting up
elm-format, elm-review, elm-test in CI.
NOT when:
- Generated
Page boilerplate only, validate hand-edited modules.
- Non-Elm code.
Workflow
- Layout, elm-format, 80 cols, declaration shape (
elm-style-formatting-layout.md).
- Modules, names, imports, focus (
elm-style-naming-modules.md).
- Types, unions, IDs, decoders (
elm-style-types-declarations.md).
- Expressions, pipes, case, let (
elm-style-pipelines-expressions.md).
- Verify,
elm-format --validate, elm-test, elm-review on changed modules.
Red Flags
- Unformatted
.elm
- Missing top-level type annotation
- Inline one-line
case definitions
- Column-aligned type blocks
type alias for nominal IDs
- Non-exhaustive
case with _
- Single-step pipeline
- Unqualified
map/filter imports
- Abbreviated function names
- Giant
let instead of top-level helpers
- Widespread
exposing (..)
Verification
elm-format --validate
elm-test / npm test (project)
elm-review (project rules)
- Capsule checklist on module
exposing lists
References
awesome-guidelines/references/elm-style-learning-note.md
awesome-guidelines/references/elm-style-formatting-layout.md
awesome-guidelines/references/elm-style-naming-modules.md
awesome-guidelines/references/elm-style-types-declarations.md
awesome-guidelines/references/elm-style-pipelines-expressions.md
1---2name: elm-coding-practices3description: Use when authoring or reviewing Elm, elm-format, 80-column layout, type annotations, qualified imports, custom ID types, multi-step pipelines, and elm-review/test in CI.4---56# Elm Coding Practices78Application skill for Elm style learning (from the archived `awesome-guidelines` style capsules). For TEA architecture and `Html` patterns, combine with stack capsules in `skills/*-foundation`.910## Core Principle1112Elm quality is **regular layout plus compiler support**, formatted mechanically, typed explicitly, modules focused on one custom type.1314## When to Use / NOT1516- Elm applications, packages, and `src/` modules.17- Setting up `elm-format`, `elm-review`, `elm-test` in CI.1819**NOT when:**2021- Generated `Page` boilerplate only, validate hand-edited modules.22- Non-Elm code.2324## Workflow25261. **Layout**, elm-format, 80 cols, declaration shape (`elm-style-formatting-layout.md`).272. **Modules**, names, imports, focus (`elm-style-naming-modules.md`).283. **Types**, unions, IDs, decoders (`elm-style-types-declarations.md`).294. **Expressions**, pipes, case, let (`elm-style-pipelines-expressions.md`).305. **Verify**, `elm-format --validate`, `elm-test`, `elm-review` on changed modules.3132## Red Flags3334- Unformatted `.elm`35- Missing top-level type annotation36- Inline one-line `case` definitions37- Column-aligned type blocks38- `type alias` for nominal IDs39- Non-exhaustive `case` with `_`40- Single-step pipeline41- Unqualified `map`/`filter` imports42- Abbreviated function names43- Giant `let` instead of top-level helpers44- Widespread `exposing (..)`4546## Verification4748- `elm-format --validate`49- `elm-test` / `npm test` (project)50- `elm-review` (project rules)51- Capsule checklist on module `exposing` lists525354## References5556- `awesome-guidelines/references/elm-style-learning-note.md`57- `awesome-guidelines/references/elm-style-formatting-layout.md`58- `awesome-guidelines/references/elm-style-naming-modules.md`59- `awesome-guidelines/references/elm-style-types-declarations.md`60- `awesome-guidelines/references/elm-style-pipelines-expressions.md`