haskell-template: Instructions file for Claude Code

CLAUDE.md

haskell-template CLAUDE.md is an instructions file for Claude Code from Ivy-Apps/haskell-template. It costs 2,820 tokens per session, scanned A, original, BSD-3-Clause.

Project instructions for building, testing, and checking a Haskell application with Cabal, GHC, and the Nix development environment.

In plain words
What is it for?
They help developers build the project, run all or selected tests, lint the code, and follow its custom Prelude and Haskell style rules.
Why use it?
They make sure development commands run in the project's expected environment and follow its coding conventions.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is Ivy-Apps/haskell-template's own configuration. It tells Claude Code how to work on haskell-template itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything haskell-template configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Ivy-Apps/haskell-template. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Ivy-Apps/haskell-template/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Ivy-Apps/haskell-template

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for haskell-template CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ivy-apps/haskell-template/claude-md/github.svg)](https://agentmods.dev/instructions/ivy-apps/haskell-template/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ivy-apps/haskell-template/claude-md"><img src="https://agentmods.dev/badge/instructions/ivy-apps/haskell-template/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for haskell-template CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ivy-apps/haskell-template/claude-md"><img src="https://agentmods.dev/badge/instructions/ivy-apps/haskell-template/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,820 This file is loaded in full into every session.
When invoked 2,820 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02820 $0.02820
Opus 5.5 $0.01128 $0.01128
Sonnet 5.5 $0.00564 $0.00564
Haiku 4.5 $0.00282 $0.00282

Measured 4d ago against content hash e956359fbea4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

haskell-template CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 239 lines

How it starts

The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

Commands

All cabal/GHC commands must run inside the Nix dev shell using our nix run commands.

The check ladder

  1. While iterating: nix run .#quick-typecheck, then nix run .#quick-test [-- <filter>] once it is green. They cover every .hs edit, so never run a full just check mid-work.
  2. Once, before handing back: nix develop .#ci -c just check, in the background. It already runs the build, the tests and the linters, so never run nix run .#build, .#test or .#lint before it.
  3. After an edit that touches no code (docs only), or only a git commit, run nothing: rerun the full check only after a code edit.
  4. Several cabal or just commands in a row share one shell, nix develop .#ci -c bash -c '...', instead of a nix run .#test, .#build or .#lint each (they wrap those commands), which pays the nix develop start-up on every call.

Fast feedback

nix run .#quick-typecheck
nix run .#quick-test -- FileSystem.Path    # or no filter for the whole suite

Both keep one warm ghcid session per worktree over the library, the executable and the tests (not the benchmark, which CI compiles), so an edit costs a reload instead of a recompile and relink.

quick-typecheck answers "does the project typecheck". It prints either All good (<N> modules) and exits 0, or the GHC errors verbatim and exits 1. There is no need to pipe it through grep. A fraction of a second when nothing broke and a couple of seconds when something did. The first call starts the session and takes longer; every call after that is fast, so just run it and keep going.

quick-test typechecks the same way, then runs the hspec suite inside the session, filtered like nix run .#test -- <filter>. After the typecheck's All good (<N> modules) it prints only failures and the summary line, and exits 0 when they pass, 1 on a GHC error, a failing test or a filter that matches nothing. A filtered run costs a reload rather than a rebuild. With no filter it runs the compiled suite through cabal test instead, which beats running the whole suite interpreted.

Read the full file on GitHub · 239 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +40 lines · +636 tokens per session e956359fbea4
  2. 7d ago Changed · +13 tokens per session 70550f27071f
  3. 8d ago Changed · +43 lines · +651 tokens per session 05a323a63202
  4. 15d ago Changed · +119 lines · +1,326 tokens per session 881eddcb8d3b
  5. 2mo ago First seen · 37 lines · 194 tokens per session scan A 87c150065ff8

Subscribe to this mod's changes

haskell-template CLAUDE.md is an instructions file published in the GitHub repository Ivy-Apps/haskell-template (5 stars, last pushed 4d ago), licensed BSD-3-Clause. It adds 2,820 tokens to every session, about $0.0113 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

haskell-template CLAUDE.md compared with instructions from other repositories

haskell-template CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
haskell-template CLAUDE.mdIvy-Apps/haskell-templateInstructions file54d agoBSD-3-ClauseA2,820Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode