Format Haskell package descriptions and project files with cabal-gild — `*.cabal`, `cabal.project`, `cabal.project.local`, `cabal.project.freeze`. Normalises layout, sorts `build-depends`, and expands `-- cabal-gild: discover` module lists. Use when: (1) formatting or tidying a `.cabal` or `cabal.project` file, (2) after editing dependencies or stanzas, (3) refreshing auto-discovered module lists after adding/removing a module, (4) checking whether cabal files are already formatted. Trigger: "/haskell-cabal-gild", "cabal-gild", "format cabal".
How this skill is triggered — by the user, by Claude, or both
Slash command
/haskell-cabal-gild-skill:haskell-cabal-gildThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
`cabal-gild` is the formatter for Haskell **package descriptions** (`*.cabal`) and **project
cabal-gild is the formatter for Haskell package descriptions (*.cabal) and project
files (cabal.project, cabal.project.local, cabal.project.freeze). It normalises field
layout, sorts and de-duplicates build-depends, and can generate module lists from the
filesystem via discover pragmas.
Run on each cabal/project file you touched:
cabal-gild --io <file>
--io sets input and output to the same path. Format before compiling.
To verify formatting (non-zero exit if it would change the file), e.g. in CI or before committing:
cabal-gild -m check --io <file>
cabal-gild can fill in a module list by scanning a directory. Put a pragma directly above the field:
-- cabal-gild: discover src
exposed-modules:
When you add or remove a module, the list is stale until cabal-gild is re-run on the owning
.cabal file. Re-running cabal-gild --io <pkg>.cabal refreshes it.
This plugin installs a PostToolUse hook (scripts/cabal-gild-on-save.sh) that runs on every
file write:
.cabal / cabal.project* save → that file is cabal-gild-formatted;.hs / .lhs / .hsig save → the nearest enclosing .cabal is re-formatted only if it
uses a -- cabal-gild: discover pragma, so discovered module lists stay current.Manual invocation is therefore mainly for bulk/initial formatting or check mode. After the hook
reformats a file, re-read it before editing again.
Source files (.hs/.lhs/.hsig) are formatted by /haskell-format, not cabal-gild.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub konn/haskell-claude-marketplace --plugin haskell-cabal-gild-skill