From dz0ny-devenv-claude
This skill should be used when the user asks to "create an Elm Land app", "add a page", "add a layout", "set up authentication", "make an API call in Elm Land", "review Elm Land code", "fix Elm Land routing", "add shared state", "use effects", "configure elm-land.json", or is developing, reviewing, or debugging an Elm Land web application.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dz0ny-devenv-claude:elm-land-devThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Elm Land is a production-ready framework for building reliable web applications in Elm. It provides file-based routing, built-in dev server, and conventions for structuring Elm applications with zero runtime exceptions.
Elm Land is a production-ready framework for building reliable web applications in Elm. It provides file-based routing, built-in dev server, and conventions for structuring Elm applications with zero runtime exceptions.
Every page follows three core pieces:
Msg)project/
├── elm.json # Elm package dependencies
├── elm-land.json # Framework configuration
├── src/
│ ├── Pages/ # File-based routing (URL = filename)
│ ├── Layouts/ # Reusable page wrappers
│ ├── Components/ # Shared UI components
│ ├── Shared.elm # Shared state logic
│ ├── Shared/Model.elm # Shared data definition
│ ├── Shared/Msg.elm # Shared messages
│ ├── Effect.elm # Custom side-effects
│ ├── Auth.elm # Authentication logic
│ └── interop.js # JavaScript interop (ports)
└── static/ # Static assets (CSS, images)
| Page File | URL | Type |
|---|---|---|
Home_.elm | / | Homepage |
SignIn.elm | /sign-in | Static route |
Settings/Account.elm | /settings/account | Nested static |
User_.elm | /:user | Dynamic route |
Users/Id_.elm | /users/:id | Dynamic parameter |
Blog/ALL_.elm | /blog/* | Catch-all |
NotFound_.elm | /* | 404 page |
Trailing underscore (_) marks dynamic segments. ALL_ is the catch-all pattern.
Pages range from simple to full-featured:
page:view - Static view, no state (View msg)page:sandbox - Has Model/Msg/update, no side-effectspage:element - Has Cmd/Sub for HTTP, subscriptionspage (default) - Full access: Effect, Shared.Model, Route, authEffects are Elm Land's abstraction over Cmd for side-effects:
Effect.none -- No side-effect
Effect.batch [ e1, e2 ] -- Multiple effects
Effect.sendCmd cmd -- Wrap a standard Cmd
Effect.pushRoute { path, query, hash } -- Navigate
Effect.replaceRoute { ... } -- Replace URL (no history entry)
Effect.loadExternalUrl "..." -- External navigation
Effect.back -- Browser back
Effect.sendMsg msg -- Send message to self
Custom effects are defined in src/Effect.elm and can send shared messages:
Effect.sendSharedMsg (Shared.Msg.SignIn { token = "..." })
Shared state persists across page navigation. Customize with elm-land customize shared:
Shared/Model.elm - Define shared data (user session, theme, window size)Shared/Msg.elm - Define shared messages (SignIn, SignOut)Shared.elm - Handle shared init/update logicPages access shared state via Shared.Model parameter.
Customize with elm-land customize auth. Define Auth.User type and onPageLoad:
onPageLoad : Shared.Model -> Route () -> Auth.Action.Action User
onPageLoad shared route =
case shared.user of
Just user -> Auth.Action.loadPageWithUser user
Nothing -> Auth.Action.pushRoute { path = Route.Path.SignIn, ... }
Protect pages by adding Auth.User as the first parameter to page.
Layouts wrap pages with reusable UI. Define Props to configure per-page. Attach to pages via Page.withLayout.
Use src/interop.js for:
flags() - Pass initial data to Elm (localStorage, env vars)onReady({ app }) - Subscribe to ports after Elm initializeselm-land init <folder> # New project
elm-land server # Dev server (port 1234)
elm-land build # Production build
elm-land add page <url> # Add full page
elm-land add page:view <url> # View-only page
elm-land add page:sandbox <url> # Page with Model/Msg
elm-land add page:element <url> # Page with Cmd/Sub
elm-land add layout <name> # Add layout
elm-land customize <module> # Customize shared|auth|effect|view|not-found
elm-land routes # List all routes
When reviewing Elm Land code, verify:
_page:element if page:view suffices)Effect module, not raw Cmd in full pagesShared.ModelAuth.User as first page parameterOk and Err casesDebug.todo, no partial pattern matches in productionelm-ui. Elm Land projects use Tailwind via Html.Attributes.classreferences/common-operations.md - Detailed code examples for navigation, API calls, forms, auth, ports, and componentsreferences/configuration.md - Full elm-land.json configuration reference and environment variablesexamples/page-with-api.elm - Page that fetches and displays API dataexamples/auth-protected-page.elm - Auth-protected page with layoutnpx claudepluginhub joshuarweaver/cascade-code-devops-misc-1 --plugin dz0ny-devenv-claudeGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.