Synthèse automatique
Pilote la chaîne d'outils Haskell `hx` (build, check, test, run, fmt, lint, gestion des dépendances et du toolchain GHC) dans un projet disposant d'un fichier `hx.toml`.
Points forts
- Un seul CLI remplace ghcup, cabal, stack, fourmolu, hlint et hpc
- Codes de sortie explicites (0 à 6) qui permettent de décider du succès sans analyser la sortie
- Erreurs structurées sur stderr avec correctif suggéré, à remonter à l'utilisateur
- Lockfile `hx.lock` pour des builds reproductibles et serveur MCP (`hx mcp`) pour l'accès par appels d'outils
Limites
- Le premier `hx build` peut télécharger un GHC de plusieurs centaines de Mo
- `hx build --native` est expérimental et réservé aux projets mono-paquet n'utilisant que `base`
- Les plugins locaux `.hx/plugins/*.scm` ne s'exécutent pas sur un dépôt fraîchement cloné tant qu'ils ne sont pas approuvés
À utiliser dès qu'un projet Haskell contient un `hx.toml` ou que l'utilisateur demande de compiler, tester, linter ou gérer les dépendances d'un code Haskell avec hx.
À éviter sur un projet utilisant seulement `.cabal` ou `stack.yaml` sans `hx.toml`, sauf si l'on prévoit explicitement de l'adopter via `hx init` ou `hx import --from stack`.
Analyse de sécurité
PrudenceThe skill describes a legitimate Haskell toolchain with standard build, test, and dependency management commands. It does not contain destructive or exfiltrating instructions and includes a clear warning about not trusting project-local plugins. However, because it orchestrates downloading GHC, building and running arbitrary project code, and potentially executing plugins after explicit trust, caution is warranted.
- •Instructs executing project code via build/test/run commands, which can run arbitrary code from the repository.
- •May download and install GHC toolchains, involving network access and large file operations.
- •Mentions project-local plugin scripts that can run after `hx plugins trust`, though it explicitly warns against trusting untrusted projects.
- •No allowed-tools are declared, but the skill implies shell command execution.
Exemples
Build this Haskell project, run it with --help, then run the test suite and tell me the result.Add aeson with the constraint >=2.0 to this project and rebuild to confirm it still compiles.Run the formatting check, the linter, and the tests on this repo, and report exactly which step failed and why.name: hx description: Build, test, run, lint, format, and manage dependencies for Haskell projects using the hx toolchain CLI. Use whenever working in a Haskell project that has an hx.toml (or when setting one up), or when the user asks to build/test/run/typecheck Haskell code, manage GHC/Cabal versions, or add/remove Hackage dependencies.
hx — Haskell toolchain
hx is a single CLI that replaces ghcup, cabal, stack, fourmolu, hlint, and hpc. It manages GHC itself, uses an hx.toml manifest and an hx.lock lockfile, and returns meaningful exit codes.
Detecting that this skill applies
The project is an hx project if there is an hx.toml at (or above) the working directory. If the user has a .cabal/stack.yaml but no hx.toml, you can adopt it with hx init or hx import --from stack.
Core commands
| Goal | Command |
|------|---------|
| Scaffold a project | hx init <name> |
| Build | hx build (--release, -j N) |
| Type-check only (fast) | hx check |
| Run tests | hx test (--pattern <p>) |
| Build & run | hx run -- <args> |
| Format / check format | hx fmt / hx fmt --check |
| Lint / autofix | hx lint / hx lint --fix |
| Add / remove a dependency | hx add <pkg> "<constraint>" / hx rm <pkg> |
| Lock / build from lock | hx lock / hx sync |
| Diagnose the environment | hx doctor |
| Install/manage GHC | hx toolchain install |
Run hx <command> --help for flags. --quiet/--verbose are global; NO_COLOR is respected.
Interpreting results — exit codes
Decide success/failure from the exit code, not by scraping output:
0success ·1general error ·2bad arguments ·3badhx.toml4toolchain error (GHC/Cabal missing or mismatched — runhx doctor)5build/test failure ·6plugin hook failure
Errors print a structured summary with a suggested fix on stderr; surface that fix to the user.
Typical workflows
# new project
hx init myapp && cd myapp && hx build && hx run
# add a dependency and rebuild
hx add aeson ">=2.0" && hx build
# pre-commit quality gate
hx fmt --check && hx lint && hx test
# reproducible build
hx lock && hx sync
Important behavior
- Toolchain auto-install: the first
hx buildmay download a GHC (hundreds of MB).hx doctorreturns exit4when a required tool is missing and tells you how to install it. hx build --nativeis experimental — a fast path for single-package,base-only projects; it falls back to cabal otherwise. Don't use it for multi-dependency projects.- Plugins require trust: project-local
.hx/plugins/*.scmscripts do not run on a freshly cloned repo. Never runhx plugins truston a project you don't trust.
Programmatic / MCP use
For tool-call access instead of shelling out, run hx mcp (an MCP server over stdio) — it exposes build/check/test/run/lock/sync/fmt/lint/doctor and dependency tools. See AGENTS.md in the repo.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/haskell-hx-toolchain-mtmi9958' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/haskell-hx-toolchain-mtmi9958/download' --output '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md.part' && mv '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md.part' '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md' && test -s '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/hx' && cp -R '.skill-downloads/haskell-hx-toolchain-mtmi9958' '.claude/skills/hx'Cursor
test -f '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md' && test -s '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/hx' && cp -R '.skill-downloads/haskell-hx-toolchain-mtmi9958' '.cursor/skills/hx'Codex
test -f '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md' && test -s '.skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/hx' && cp -R '.skill-downloads/haskell-hx-toolchain-mtmi9958' '.agents/skills/hx'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/haskell-hx-toolchain-mtmi9958'openskills read 'haskell-hx-toolchain-mtmi9958'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/haskell-hx-toolchain-mtmi9958/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.