Aller au contenu principal

Contribuer

Ajouter un hook

1. Créer le script

touch src/fr/hooks/guard-mon-hook.sh
chmod +x src/fr/hooks/guard-mon-hook.sh

Structure minimale :

#!/usr/bin/env bash
# guard-mon-hook.sh — Description en une ligne
set -euo pipefail

INPUT=$(cat)

# Logique...

echo "Message pour Claude" >&2
exit 0 # 0 = ok, 1 = erreur, 2+ = bloquant

2. Tests obligatoires

Dans test/hooks.js :

test('bloque X', () => { ... });
test('laisse passer Y', () => { ... });
npm test

3. Brancher dans settings.json

{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "bash .claude/hooks/guard-mon-hook.sh" }
]
}
]
}
}

Ajouter un satellite de stack

touch src/stacks/ma-stack.md

Format :

---
kind: stack
name: ma-stack
loads_when: "§0 Stack = ma-stack"
---

## Lint
## Build
## Tests
## Conventions
## Pièges

Ajouter un skill

mkdir -p src/skills/mon-skill

src/skills/mon-skill/SKILL.md :

---
name: mon-skill
description: Description pour la détection automatique
---

## Quand l'utiliser
## Procédure

Process de contribution

git clone https://github.com/malikkaraoui/claude-atelier.git
npm install
# ... développer ...
npm test
bash scripts/pre-push-gate.sh
# PR avec description claire

Règles commits : français · atomiques · pas de Co-Authored-By · préfixes feat: fix: docs: chore:


Issues

github.com/malikkaraoui/claude-atelier/issues