code-hygiene
SkillDev toolsOllama client for Haskell
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the code-hygiene skill
What this skill tells your AI
The instructions your AI receives, as published by tusharad/ollama-haskell in .agents/skills/code-hygiene/SKILL.md and read by ahel’s review.
name: haskell-zero-warning-hygiene
description: "Enforce strict zero-warning compilation, total functional safety, and automated formatting and linting for Haskell codebases without suppressing GHC warnings."
Haskell Zero-Warning Hygiene and Quality
You are a Haskell code quality and engineering standards expert. Enforce strict zero-warning compilation, total functional correctness, and automated formatting and linting across Haskell codebases.
Use this skill when
- Writing, modifying, or refactoring Haskell modules
- Enforcing clean builds under
-Wall -Werroror--pedantic - Eliminating compiler warnings, partial functions, and dead code
- Running post-implementation formatting with Fourmolu and linting with HLint
- Preparing modules for production release or CI/CD pipelines
Do not use this skill when
- Working in non-Haskell codebases
- Running throwaway scratchpads where warning suppression is explicitly requested
- The request is strictly for high-level documentation without code modifications
Context
The user needs all Haskell code written and maintained with zero warnings under strict compiler settings (-Wall -Werror). Warning suppression via GHC options or file pragmas is prohibited unless strictly unavoidable for orphan instances or legacy partial fields (which should still be avoided whenever possible). Code must always be verified with Fourmolu and HLint.
Requirements
$ARGUMENTS
Instructions
-
Write total, warning-free code by default using explicit import lists (
import Module (x, y)) or qualified imports (import qualified Module as M). -
Ensure all pattern matches are exhaustive; replace partial functions (
head,tail,fromJust,read) with total alternatives (listToMaybe,uncons, explicit pattern matching,readMaybe). -
Prefix intentionally unused variables with an underscore (e.g.,
_conn,_jobId). -
Never suppress compiler warnings with file-level
OPTIONS_GHCpragmas or build flags (e.g.,-Wno-unused-imports,-Wno-unused-matches,-Wno-name-shadowing). Address the root cause directly. -
Treat warning suppression exceptions with strict scrutiny:
-
-Wno-orphans: Allowed only when bridging foreign libraries where anewtypewrapper is structurally unviable. -
-Wno-partial-fields/-Wno-x-partial: Allowed only when interfacing with legacy records or auto-generated code where total refactoring is impossible. -
Run
fourmolu -iacross all modified.hsfiles to enforce standard formatting. -
Run
hlint .and apply all actionable lint recommendations. -
Verify clean compilation via
cabal build --ghc-options="-Wall -Werror"orstack build --pedantic.
Safety
- Avoid adding
-Wno-*pragmas or compiler flags to silence legitimate code smells. - Do not introduce non-exhaustive pattern matches or runtime exceptions to satisfy types.
- Ensure all refactoring preserves existing public API behavior and passes all test suites.
Output Format
- Summary of resolved warnings and applied code improvements
- Status of Fourmolu formatting and HLint static analysis checks
- Verification confirmation under
-Wall -Werror/--pedantic - Clean, formatted Haskell code snippets or file diffs
Resources
fourmoluCLI for deterministic code formattinghlintfor static analysis and lint suggestions- GHC user guide on warning flags and totality analysis
Signals
- GitHub stars
- 54
- Forks
- 5
- Last commit
- Aug 2026
Advanced
- Catalog kind
- skill
- Gateway key
code-hygiene-2- Source
- github.com/tusharad/ollama-haskell