Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "leapmultix-skill-checking-config-compliance",
|
||||||
|
"description": "Skill checking-config-compliance from LeapMultix",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": {
|
||||||
|
"name": "Julien LE SAUX",
|
||||||
|
"email": "contact@jls42.org"
|
||||||
|
},
|
||||||
|
"skills": [
|
||||||
|
"./skills"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# leapmultix-skill-checking-config-compliance
|
||||||
|
|
||||||
|
Skill checking-config-compliance from LeapMultix
|
||||||
49
plugin.lock.json
Normal file
49
plugin.lock.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:jls42/leapmultix:leapmultix-marketplace/skills/checking-config-compliance",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "011f1ecd163cfed95c7dabd08d4670d97c4484d7",
|
||||||
|
"treeHash": "88b185655fa4a9673fe83a3e70e0ab086df77730212f72f131648d162d1d816f",
|
||||||
|
"generatedAt": "2025-11-28T10:19:11.697915Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "leapmultix-skill-checking-config-compliance",
|
||||||
|
"description": "Skill checking-config-compliance from LeapMultix",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "93bab0358b2c619e888f5b7b0ca744c91c40bb0a5f2e25b6912ac17c534855aa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "724af36c3a78aa4c807a74082cee8bf08757a166fe2dd497b7fb35ce227ac4c7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/checking-config-compliance/SKILL.md",
|
||||||
|
"sha256": "145bab0d321c9345ffb44a78601b062bb2d0d14742332d4cd477f225cdc8c29b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/checking-config-compliance/reference/validation-patterns.md",
|
||||||
|
"sha256": "29c9015b720281c36ba695a6eab4bb7f9dc39be1c7193652a32fc1c7f2de2bf3"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "88b185655fa4a9673fe83a3e70e0ab086df77730212f72f131648d162d1d816f"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
416
skills/checking-config-compliance/SKILL.md
Normal file
416
skills/checking-config-compliance/SKILL.md
Normal file
@@ -0,0 +1,416 @@
|
|||||||
|
---
|
||||||
|
name: checking-config-compliance
|
||||||
|
description: Validates configuration compliance for Skills, Subagents and Slash Commands against best practices. Use proactively when creating or auditing configuration files.
|
||||||
|
allowed-tools: Read, Grep, Glob, WebSearch
|
||||||
|
---
|
||||||
|
|
||||||
|
# Config Compliance Checker
|
||||||
|
|
||||||
|
Valide la conformité des Skills, Subagents et Slash Commands selon les bonnes pratiques définies dans `BEST_PRACTICES_AGENTS_SKILLS.md`.
|
||||||
|
|
||||||
|
## Table des matières
|
||||||
|
|
||||||
|
- [Quand utiliser](#quand-utiliser)
|
||||||
|
- [Sources de vérité](#sources-de-vérité)
|
||||||
|
- [Checklist : Skills](#checklist--skills)
|
||||||
|
- [Checklist : Subagents](#checklist--subagents)
|
||||||
|
- [Format de Sortie Requis (CRITIQUE)](#format-de-sortie-requis-critique)
|
||||||
|
- [Checklist : Slash Commands](#checklist--slash-commands)
|
||||||
|
- [Patterns de validation](#patterns-de-validation)
|
||||||
|
- [Rapport d'audit](#rapport-daudit)
|
||||||
|
- [Workflow d'audit complet](#workflow-daudit-complet)
|
||||||
|
- [En cas de doute](#en-cas-de-doute)
|
||||||
|
|
||||||
|
## Quand utiliser
|
||||||
|
|
||||||
|
- Création d'un nouveau Skill/Subagent/Slash Command
|
||||||
|
- Audit des configurations existantes
|
||||||
|
- Avant commit de modifications de config
|
||||||
|
- Review de PR touchant `.claude/`
|
||||||
|
|
||||||
|
## Sources de vérité
|
||||||
|
|
||||||
|
**Document de référence principal :** `.claude/BEST_PRACTICES_AGENTS_SKILLS.md`
|
||||||
|
|
||||||
|
Ce skill fournit des checklists concrètes pour valider la conformité.
|
||||||
|
|
||||||
|
### Consultation de la Documentation Officielle
|
||||||
|
|
||||||
|
En cas de doute sur une règle de conformité ou une spécification exacte, consultez la documentation officielle listée dans `BEST_PRACTICES_AGENTS_SKILLS.md` via WebSearch.
|
||||||
|
|
||||||
|
**Cas d'usage pour WebSearch :**
|
||||||
|
|
||||||
|
- ✅ Vérifier les limites exactes (max 64 chars pour name, max 1024 pour description)
|
||||||
|
- ✅ Valider une règle de nommage spécifique (gérondif, kebab-case)
|
||||||
|
- ✅ Confirmer la syntaxe YAML frontmatter
|
||||||
|
- ✅ Découvrir de nouvelles best practices non encore documentées dans BEST_PRACTICES
|
||||||
|
|
||||||
|
**Ne PAS utiliser pour :**
|
||||||
|
|
||||||
|
- ❌ Remplacer la lecture de BEST_PRACTICES (toujours lire en premier)
|
||||||
|
- ❌ Copier du contenu verbatim (résumer et adapter au contexte du projet)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Checklist : Skills
|
||||||
|
|
||||||
|
### 1. Frontmatter YAML
|
||||||
|
|
||||||
|
**✅ Requis :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: skill-name
|
||||||
|
description: What it does and when to use it
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
**Validations :**
|
||||||
|
|
||||||
|
- [ ] `name` : kebab-case, sans guillemets, forme gérondif recommandée (-ing)
|
||||||
|
- [ ] `description` : 3ème personne, < 1024 chars, sans guillemets
|
||||||
|
- [ ] `allowed-tools` (optionnel) : liste séparée par virgules
|
||||||
|
|
||||||
|
**❌ Erreurs communes :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# MAUVAIS
|
||||||
|
name: "Validateur d'Accessibilité" # Guillemets inutiles, pas kebab-case
|
||||||
|
name: helper # Nom vague
|
||||||
|
description: I process files # 1ère personne
|
||||||
|
|
||||||
|
# BON
|
||||||
|
name: processing-pdfs
|
||||||
|
description: Processes PDF files and extracts structured data. Use for document automation.
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Structure de fichier
|
||||||
|
|
||||||
|
**Recommandé :**
|
||||||
|
|
||||||
|
```
|
||||||
|
skill-name/
|
||||||
|
├── SKILL.md # < 500 lignes
|
||||||
|
├── reference/ # Fichiers de référence
|
||||||
|
│ └── patterns.md
|
||||||
|
└── scripts/ # Scripts utilitaires
|
||||||
|
└── validator.py
|
||||||
|
```
|
||||||
|
|
||||||
|
**Validations :**
|
||||||
|
|
||||||
|
- [ ] SKILL.md < 500 lignes
|
||||||
|
- [ ] Références à un niveau de profondeur max
|
||||||
|
- [ ] Scripts utilisent forward slashes (`/`)
|
||||||
|
|
||||||
|
### 3. Contenu
|
||||||
|
|
||||||
|
**Validations :**
|
||||||
|
|
||||||
|
- [ ] Focalisé sur une seule tâche
|
||||||
|
- [ ] Pas de copie de code (référence au code vivant)
|
||||||
|
- [ ] Tables des matières si > 100 lignes
|
||||||
|
- [ ] Exemples concrets (input/output)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Checklist : Subagents
|
||||||
|
|
||||||
|
### 1. Frontmatter YAML
|
||||||
|
|
||||||
|
**✅ Requis :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: agent-name
|
||||||
|
description: Expert role and when to use it
|
||||||
|
tools: Read, Write, Bash
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
**Validations :**
|
||||||
|
|
||||||
|
- [ ] `name` : kebab-case, sans guillemets
|
||||||
|
- [ ] `description` : 3ème personne, inclut "quand utiliser", mots comme "proactivement"
|
||||||
|
- [ ] `tools` : explicitement définis (principe du moindre privilège)
|
||||||
|
- [ ] `model` : `inherit` recommandé ou alias (sonnet, opus, haiku)
|
||||||
|
|
||||||
|
**❌ Erreurs communes :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# MAUVAIS
|
||||||
|
name: "Code Reviewer" # Guillemets inutiles, espace
|
||||||
|
tools: * # Trop permissif
|
||||||
|
description: Reviews code # Manque "quand"
|
||||||
|
|
||||||
|
# BON
|
||||||
|
name: code-reviewer
|
||||||
|
tools: Read, Grep, Glob, Bash, WebSearch
|
||||||
|
description: Expert code reviewer specializing in security and performance. Use proactively after code modifications.
|
||||||
|
model: inherit
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Prompt système
|
||||||
|
|
||||||
|
**Validations :**
|
||||||
|
|
||||||
|
- [ ] Persona clairement définie ("Vous êtes un expert en...")
|
||||||
|
- [ ] Contexte clé du projet fourni
|
||||||
|
- [ ] Principes et workflows décrits
|
||||||
|
- [ ] Référence au code vivant
|
||||||
|
- [ ] Intégration de skills explicite si applicable
|
||||||
|
|
||||||
|
**Exemple d'intégration skill :**
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
## Format de Sortie Requis (CRITIQUE)
|
||||||
|
|
||||||
|
Pour générer votre rapport, vous DEVEZ :
|
||||||
|
|
||||||
|
1. Lire le fichier `.claude/skills/report-template/SKILL.md`
|
||||||
|
2. Utiliser son contenu comme template exact
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Checklist : Slash Commands
|
||||||
|
|
||||||
|
### 1. Structure de fichier
|
||||||
|
|
||||||
|
**Localisation :**
|
||||||
|
|
||||||
|
- Personal : `~/.claude/commands/`
|
||||||
|
- Project : `.claude/commands/` (versionné)
|
||||||
|
|
||||||
|
**Format :**
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
description: Brief description of what it does
|
||||||
|
---
|
||||||
|
|
||||||
|
Prompt content here with optional $ARGUMENTS
|
||||||
|
```
|
||||||
|
|
||||||
|
**Validations :**
|
||||||
|
|
||||||
|
- [ ] Nom fichier : kebab-case.md
|
||||||
|
- [ ] `description` claire et concise
|
||||||
|
- [ ] Arguments gérés avec `$ARGUMENTS` ou `$1`, `$2`
|
||||||
|
- [ ] Documentation du comportement
|
||||||
|
|
||||||
|
**Exemple :**
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
description: Review code for security issues
|
||||||
|
---
|
||||||
|
|
||||||
|
Review the following code: $ARGUMENTS
|
||||||
|
|
||||||
|
Focus on:
|
||||||
|
|
||||||
|
- Security vulnerabilities
|
||||||
|
- Best practices violations
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Patterns de validation
|
||||||
|
|
||||||
|
### Validation du nom (kebab-case)
|
||||||
|
|
||||||
|
**Regex :** `^[a-z0-9]+(-[a-z0-9]+)*$`
|
||||||
|
|
||||||
|
**✅ Valides :**
|
||||||
|
|
||||||
|
- `processing-pdfs`
|
||||||
|
- `code-reviewer`
|
||||||
|
- `practicing-tdd-with-jest`
|
||||||
|
|
||||||
|
**❌ Invalides :**
|
||||||
|
|
||||||
|
- `ProcessingPDFs` (PascalCase)
|
||||||
|
- `processing_pdfs` (snake_case)
|
||||||
|
- `"processing-pdfs"` (guillemets)
|
||||||
|
- `processing pdfs` (espace)
|
||||||
|
|
||||||
|
### Validation de la description (3ème personne)
|
||||||
|
|
||||||
|
**Patterns ✅ :**
|
||||||
|
|
||||||
|
- "Processes PDF files..."
|
||||||
|
- "Validates configuration..."
|
||||||
|
- "Expert reviewer specializing in..."
|
||||||
|
|
||||||
|
**Patterns ❌ :**
|
||||||
|
|
||||||
|
- "I process files..." (1ère personne)
|
||||||
|
- "Process files..." (impératif)
|
||||||
|
- "" (vide)
|
||||||
|
|
||||||
|
### Validation allowed-tools vs tools
|
||||||
|
|
||||||
|
**Skills :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
allowed-tools: Read, Grep # Avec tiret
|
||||||
|
```
|
||||||
|
|
||||||
|
**Subagents :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
tools: Read, Write, Bash # Sans tiret
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Rapport d'audit
|
||||||
|
|
||||||
|
### Format recommandé
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Audit de Conformité : [nom-du-composant]
|
||||||
|
|
||||||
|
**Type :** Skill | Subagent | Slash Command
|
||||||
|
**Fichier :** `.claude/.../nom.md`
|
||||||
|
**Date :** YYYY-MM-DD
|
||||||
|
|
||||||
|
## Score global : [X]/10
|
||||||
|
|
||||||
|
## Conformité Frontmatter
|
||||||
|
|
||||||
|
- [ ] ✅/❌ Nom conforme (kebab-case, gérondif pour skills)
|
||||||
|
- [ ] ✅/❌ Description conforme (3ème personne, < 1024 chars)
|
||||||
|
- [ ] ✅/❌ Tools/allowed-tools correctement défini
|
||||||
|
- [ ] ✅/❌ Model spécifié (subagents)
|
||||||
|
|
||||||
|
## Conformité Contenu
|
||||||
|
|
||||||
|
- [ ] ✅/❌ Structure de fichier appropriée
|
||||||
|
- [ ] ✅/❌ Taille < 500 lignes (skills)
|
||||||
|
- [ ] ✅/❌ Références au code vivant
|
||||||
|
- [ ] ✅/❌ Exemples concrets présents
|
||||||
|
|
||||||
|
## Problèmes détectés
|
||||||
|
|
||||||
|
### 🔴 Critiques
|
||||||
|
|
||||||
|
- Description non conforme
|
||||||
|
|
||||||
|
### 🟡 Avertissements
|
||||||
|
|
||||||
|
- Taille légèrement élevée (520 lignes)
|
||||||
|
|
||||||
|
### 🔵 Suggestions
|
||||||
|
|
||||||
|
- Ajouter exemples concrets
|
||||||
|
|
||||||
|
## Actions recommandées
|
||||||
|
|
||||||
|
1. Corriger le nom : `"Code Reviewer"` → `code-reviewer`
|
||||||
|
2. Réécrire description en 3ème personne
|
||||||
|
3. Définir explicitement les tools
|
||||||
|
|
||||||
|
## Diff proposé
|
||||||
|
|
||||||
|
\`\`\`diff
|
||||||
|
|
||||||
|
- name: "Code Reviewer"
|
||||||
|
|
||||||
|
* name: code-reviewer
|
||||||
|
|
||||||
|
- description: Reviews code
|
||||||
|
|
||||||
|
* description: Expert code reviewer specializing in security. Use proactively after modifications.
|
||||||
|
\`\`\`
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Workflow d'audit complet
|
||||||
|
|
||||||
|
### 1. Identifier les composants
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Skills
|
||||||
|
find .claude/skills -name "SKILL.md"
|
||||||
|
|
||||||
|
# Subagents
|
||||||
|
find .claude/agents -name "*.md"
|
||||||
|
|
||||||
|
# Slash Commands
|
||||||
|
find .claude/commands -name "*.md"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Auditer chaque composant
|
||||||
|
|
||||||
|
Pour chaque fichier :
|
||||||
|
|
||||||
|
1. Lire le frontmatter YAML
|
||||||
|
2. Valider chaque champ avec la checklist
|
||||||
|
3. Analyser le contenu
|
||||||
|
4. Générer le rapport
|
||||||
|
|
||||||
|
### 3. Prioriser les corrections
|
||||||
|
|
||||||
|
**🔴 Critiques (bloquer) :**
|
||||||
|
|
||||||
|
- Nom non conforme (empêche découverte)
|
||||||
|
- Description invalide
|
||||||
|
- Syntaxe YAML incorrecte
|
||||||
|
|
||||||
|
**🟡 Avertissements (corriger bientôt) :**
|
||||||
|
|
||||||
|
- Taille > 500 lignes
|
||||||
|
- Manque exemples
|
||||||
|
- Tools trop permissifs
|
||||||
|
|
||||||
|
**🔵 Suggestions (amélioration) :**
|
||||||
|
|
||||||
|
- Ajouter tables des matières
|
||||||
|
- Améliorer organisation
|
||||||
|
- Ajouter tests
|
||||||
|
|
||||||
|
### 4. Générer rapport consolidé
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Rapport d'Audit Global
|
||||||
|
|
||||||
|
**Date :** YYYY-MM-DD
|
||||||
|
**Composants audités :** X skills, Y agents, Z commands
|
||||||
|
|
||||||
|
## Scores moyens
|
||||||
|
|
||||||
|
- Skills : 7.5/10
|
||||||
|
- Subagents : 8.2/10
|
||||||
|
- Slash Commands : 9.0/10
|
||||||
|
|
||||||
|
## Résumé des problèmes
|
||||||
|
|
||||||
|
- 🔴 Critiques : 3
|
||||||
|
- 🟡 Avertissements : 8
|
||||||
|
- 🔵 Suggestions : 12
|
||||||
|
|
||||||
|
## Top 5 corrections prioritaires
|
||||||
|
|
||||||
|
1. [skill-name] : Corriger nom et description
|
||||||
|
2. [agent-name] : Définir tools explicitement
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## En cas de doute
|
||||||
|
|
||||||
|
**Règles absolues :**
|
||||||
|
|
||||||
|
1. Toujours consulter `.claude/BEST_PRACTICES_AGENTS_SKILLS.md`
|
||||||
|
2. Toujours valider kebab-case pour les noms
|
||||||
|
3. Toujours vérifier 3ème personne pour descriptions
|
||||||
|
4. Toujours appliquer principe du moindre privilège (tools)
|
||||||
|
|
||||||
|
**Documentation officielle :**
|
||||||
|
|
||||||
|
Consultez les liens dans `BEST_PRACTICES_AGENTS_SKILLS.md` pour les spécifications exhaustives.
|
||||||
@@ -0,0 +1,508 @@
|
|||||||
|
# Patterns de Validation Détaillés
|
||||||
|
|
||||||
|
Ce document contient des patterns de validation spécifiques et des exemples pour auditer Skills, Subagents et Slash Commands.
|
||||||
|
|
||||||
|
## Table des matières
|
||||||
|
|
||||||
|
- [Validation des Noms](#validation-des-noms)
|
||||||
|
- [Validation des Descriptions](#validation-des-descriptions)
|
||||||
|
- [Validation YAML](#validation-yaml)
|
||||||
|
- [Exemples Complets](#exemples-complets)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Validation des Noms
|
||||||
|
|
||||||
|
### Skills : Forme Gérondif Recommandée
|
||||||
|
|
||||||
|
**Pattern :** `[verb]-ing-[context]` ou `[action]-ing-[subject]`
|
||||||
|
|
||||||
|
**✅ Excellents exemples :**
|
||||||
|
|
||||||
|
- `processing-pdfs` - Verbe + objet
|
||||||
|
- `analyzing-spreadsheets` - Verbe + objet
|
||||||
|
- `validating-accessibility` - Verbe + concept
|
||||||
|
- `managing-dependencies` - Verbe + objet
|
||||||
|
|
||||||
|
**✅ Acceptables (pas gérondif mais clairs) :**
|
||||||
|
|
||||||
|
- `report-template-code-review` - Template clairement identifié
|
||||||
|
- `quality-checklist` - Concept établi compréhensible
|
||||||
|
- `tdd-red-green` - Acronyme + méthodologie
|
||||||
|
|
||||||
|
**❌ À corriger :**
|
||||||
|
|
||||||
|
- `helper` - Trop vague
|
||||||
|
- `utils` - Trop générique
|
||||||
|
- `tool` - Non descriptif
|
||||||
|
- `accessibility-validator` - Préférer `validating-accessibility`
|
||||||
|
|
||||||
|
### Subagents : Rôle Clair
|
||||||
|
|
||||||
|
**Pattern :** `[role]-[specialization]` ou `[domain]-[specialist]`
|
||||||
|
|
||||||
|
**✅ Excellents exemples :**
|
||||||
|
|
||||||
|
- `code-reviewer` - Rôle clair
|
||||||
|
- `performance-analyzer` - Rôle + domaine
|
||||||
|
- `pwa-expert` - Domaine + expertise
|
||||||
|
- `accessibility-auditor` - Domaine + rôle
|
||||||
|
|
||||||
|
**❌ À corriger :**
|
||||||
|
|
||||||
|
- `helper-agent` - Trop vague
|
||||||
|
- `ai-assistant` - Trop générique
|
||||||
|
- `tool` - Non descriptif
|
||||||
|
|
||||||
|
### Regex de Validation
|
||||||
|
|
||||||
|
```regex
|
||||||
|
# Kebab-case strict
|
||||||
|
^[a-z0-9]+(-[a-z0-9]+)*$
|
||||||
|
|
||||||
|
# Kebab-case sans nombres (recommandé)
|
||||||
|
^[a-z]+(-[a-z]+)*$
|
||||||
|
|
||||||
|
# Validation guillemets (doit échouer)
|
||||||
|
^["'].*["']$
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Validation des Descriptions
|
||||||
|
|
||||||
|
### Skills : 3ème Personne + Quand
|
||||||
|
|
||||||
|
**Structure recommandée :**
|
||||||
|
|
||||||
|
```
|
||||||
|
[Verb]s [object] and [action]. Use for/when [context].
|
||||||
|
```
|
||||||
|
|
||||||
|
**✅ Excellents exemples :**
|
||||||
|
|
||||||
|
```
|
||||||
|
Processes PDF files and extracts structured data. Use for document automation.
|
||||||
|
|
||||||
|
Analyzes bundle size and identifies optimization opportunities. Use before releases or when bundle exceeds 200KB.
|
||||||
|
|
||||||
|
Validates accessibility compliance against WCAG 2.1 AA. Use when modifying UI or before major releases.
|
||||||
|
```
|
||||||
|
|
||||||
|
**❌ À corriger :**
|
||||||
|
|
||||||
|
```
|
||||||
|
# 1ère personne
|
||||||
|
I process PDF files → Processes PDF files
|
||||||
|
|
||||||
|
# Impératif
|
||||||
|
Process PDF files → Processes PDF files
|
||||||
|
|
||||||
|
# Manque contexte d'usage
|
||||||
|
Processes PDFs → Processes PDFs. Use for document automation.
|
||||||
|
|
||||||
|
# Trop vague
|
||||||
|
Helps with files → Processes PDF files and extracts data. Use for automation.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Subagents : 3ème Personne + Quand + Proactivement
|
||||||
|
|
||||||
|
**Structure recommandée :**
|
||||||
|
|
||||||
|
```
|
||||||
|
Expert [role] specializing in [domain]. Use [proactively] [when/after/before] [context].
|
||||||
|
```
|
||||||
|
|
||||||
|
**✅ Excellents exemples :**
|
||||||
|
|
||||||
|
```
|
||||||
|
Expert code reviewer specializing in security and performance. Use proactively after code modifications.
|
||||||
|
|
||||||
|
PWA specialist for service workers and offline functionality. Use for PWA modifications or before production audits.
|
||||||
|
|
||||||
|
Performance analyst for web applications and canvas games. Use proactively for performance issues or before releases.
|
||||||
|
```
|
||||||
|
|
||||||
|
**❌ À corriger :**
|
||||||
|
|
||||||
|
```
|
||||||
|
# Manque "proactivement"
|
||||||
|
Reviews code for security → Expert reviewer. Use proactively after modifications.
|
||||||
|
|
||||||
|
# Manque contexte "quand"
|
||||||
|
Expert in accessibility → Expert auditor. Use proactively after UI changes.
|
||||||
|
|
||||||
|
# 1ère personne
|
||||||
|
I review code → Expert reviewer specializing in security.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Validation de Longueur
|
||||||
|
|
||||||
|
```
|
||||||
|
Max 1024 caractères
|
||||||
|
|
||||||
|
Recommandé : 100-300 caractères pour clarté
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Validation YAML
|
||||||
|
|
||||||
|
### Frontmatter Skills
|
||||||
|
|
||||||
|
**✅ Format correct :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: processing-pdfs
|
||||||
|
description: Processes PDF files and extracts structured data. Use for document automation.
|
||||||
|
allowed-tools: Read, Grep, Bash
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
**❌ Erreurs courantes :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
# Guillemets inutiles
|
||||||
|
name: "processing-pdfs"
|
||||||
|
name: 'processing-pdfs'
|
||||||
|
|
||||||
|
# Espace au lieu de tiret
|
||||||
|
name: processing pdfs
|
||||||
|
|
||||||
|
# PascalCase
|
||||||
|
name: ProcessingPDFs
|
||||||
|
|
||||||
|
# Field incorrect pour Skills
|
||||||
|
tools: Read, Write # Devrait être allowed-tools
|
||||||
|
|
||||||
|
# Description vide
|
||||||
|
description:
|
||||||
|
description: ""
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
### Frontmatter Subagents
|
||||||
|
|
||||||
|
**✅ Format correct :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: code-reviewer
|
||||||
|
description: Expert code reviewer specializing in security. Use proactively after modifications.
|
||||||
|
tools: Read, Grep, Glob, Bash, WebSearch
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
**❌ Erreurs courantes :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
# Guillemets inutiles
|
||||||
|
name: 'code-reviewer'
|
||||||
|
|
||||||
|
# Tools non définis (hérite de tout)
|
||||||
|
# Manque l'application du principe du moindre privilège
|
||||||
|
|
||||||
|
# Model non spécifié (perte de cohérence)
|
||||||
|
# Devrait avoir model: inherit
|
||||||
|
|
||||||
|
# Field incorrect pour Subagents
|
||||||
|
allowed-tools: Read # Devrait être tools (sans tiret)
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
### Frontmatter Slash Commands
|
||||||
|
|
||||||
|
**✅ Format correct :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
description: Review code for security and performance issues
|
||||||
|
tools: Read, Grep, Glob
|
||||||
|
model: sonnet
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
**❌ Erreurs courantes :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
# name n'est pas nécessaire (nom = nom du fichier)
|
||||||
|
name: review-code
|
||||||
|
|
||||||
|
# Description trop vague
|
||||||
|
description: Reviews code
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Exemples Complets
|
||||||
|
|
||||||
|
### Skill Conforme (Excellent)
|
||||||
|
|
||||||
|
**Fichier :** `.claude/skills/processing-invoices/SKILL.md`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: processing-invoices
|
||||||
|
description: Processes invoice PDFs, extracts line items and validates totals. Use for accounting automation.
|
||||||
|
allowed-tools: Read, Bash
|
||||||
|
---
|
||||||
|
|
||||||
|
# Invoice Processor
|
||||||
|
|
||||||
|
Automates invoice processing with validation.
|
||||||
|
|
||||||
|
## Quand utiliser
|
||||||
|
|
||||||
|
- Traitement de factures PDF
|
||||||
|
- Extraction de données structurées
|
||||||
|
- Validation de totaux
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
1. Lire PDF avec script
|
||||||
|
2. Extraire données
|
||||||
|
3. Valider totaux
|
||||||
|
4. Générer rapport JSON
|
||||||
|
|
||||||
|
[... < 500 lignes ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Score : 10/10**
|
||||||
|
|
||||||
|
### Skill Non Conforme (Nécessite Corrections)
|
||||||
|
|
||||||
|
**Fichier :** `.claude/skills/helper/SKILL.md`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: 'Helper Tool'
|
||||||
|
description: Helps with various tasks
|
||||||
|
---
|
||||||
|
# Helper
|
||||||
|
|
||||||
|
I help you with stuff.
|
||||||
|
|
||||||
|
[... contenu vague ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Problèmes :**
|
||||||
|
|
||||||
|
- ❌ Nom : guillemets, espace, trop vague
|
||||||
|
- ❌ Description : vague, pas 3ème personne, manque contexte
|
||||||
|
- ❌ Contenu : 1ère personne, pas focalisé
|
||||||
|
|
||||||
|
**Corrections proposées :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: processing-contracts
|
||||||
|
description: Processes contract documents and extracts key terms. Use for legal document automation.
|
||||||
|
allowed-tools: Read, Grep
|
||||||
|
---
|
||||||
|
|
||||||
|
# Contract Processor
|
||||||
|
|
||||||
|
Automates contract analysis and term extraction.
|
||||||
|
|
||||||
|
## Quand utiliser
|
||||||
|
|
||||||
|
- Analyse de contrats PDF
|
||||||
|
- Extraction de clauses clés
|
||||||
|
- Génération de résumés
|
||||||
|
|
||||||
|
[... contenu focalisé ...]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Score après corrections : 9/10**
|
||||||
|
|
||||||
|
### Subagent Conforme (Excellent)
|
||||||
|
|
||||||
|
**Fichier :** `.claude/agents/security-auditor.md`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: security-auditor
|
||||||
|
description: Expert security auditor specializing in web vulnerabilities and OWASP Top 10. Use proactively before releases or after security-critical changes.
|
||||||
|
tools: Read, Grep, Glob, Bash, WebSearch
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
|
||||||
|
Vous êtes un expert en sécurité web avec une connaissance approfondie de OWASP Top 10.
|
||||||
|
|
||||||
|
## Mission
|
||||||
|
|
||||||
|
Auditer le code pour détecter :
|
||||||
|
- Vulnérabilités XSS
|
||||||
|
- Injections SQL
|
||||||
|
- Failles CSRF
|
||||||
|
- Dépendances vulnérables
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
1. Analyser security-utils.js pour patterns
|
||||||
|
2. Chercher innerHTML avec données externes
|
||||||
|
3. Vérifier sanitization
|
||||||
|
4. Auditer dépendances avec npm audit
|
||||||
|
5. Générer rapport avec score
|
||||||
|
|
||||||
|
## Format de Sortie
|
||||||
|
|
||||||
|
Pour générer votre rapport, vous DEVEZ :
|
||||||
|
1. Lire `.claude/skills/security-report-template/SKILL.md`
|
||||||
|
2. Utiliser son contenu comme template exact
|
||||||
|
```
|
||||||
|
|
||||||
|
**Score : 10/10**
|
||||||
|
|
||||||
|
### Subagent Non Conforme (Nécessite Corrections)
|
||||||
|
|
||||||
|
**Fichier :** `.claude/agents/helper.md`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: 'Code Helper'
|
||||||
|
description: Helps with code
|
||||||
|
---
|
||||||
|
I help you write code.
|
||||||
|
```
|
||||||
|
|
||||||
|
**Problèmes :**
|
||||||
|
|
||||||
|
- ❌ Nom : guillemets, espace, vague
|
||||||
|
- ❌ Description : vague, manque "quand", pas "proactivement"
|
||||||
|
- ❌ Tools : non définis (trop permissif)
|
||||||
|
- ❌ Model : non spécifié
|
||||||
|
- ❌ Contenu : 1ère personne, pas de persona claire
|
||||||
|
|
||||||
|
**Corrections proposées :**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: code-refactoring-specialist
|
||||||
|
description: Expert code refactoring specialist for maintainability and performance. Use proactively after adding features or when complexity increases.
|
||||||
|
tools: Read, Write, Edit, Grep, Glob, Bash
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
|
||||||
|
Vous êtes un expert en refactoring avec une maîtrise des design patterns.
|
||||||
|
|
||||||
|
## Mission
|
||||||
|
|
||||||
|
Améliorer la maintenabilité du code :
|
||||||
|
- Réduire complexité cognitive
|
||||||
|
- Extraire fonctions réutilisables
|
||||||
|
- Appliquer SOLID principles
|
||||||
|
- Optimiser performances
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
1. Analyser le code existant
|
||||||
|
2. Identifier les code smells
|
||||||
|
3. Proposer refactoring patterns
|
||||||
|
4. Appliquer changements
|
||||||
|
5. Vérifier que tests passent
|
||||||
|
|
||||||
|
## Principes
|
||||||
|
|
||||||
|
- Ne jamais casser les tests existants
|
||||||
|
- Refactorer par petites étapes
|
||||||
|
- Toujours tester après chaque modification
|
||||||
|
```
|
||||||
|
|
||||||
|
**Score après corrections : 9/10**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Checklist Validation Rapide
|
||||||
|
|
||||||
|
### Pour Skills
|
||||||
|
|
||||||
|
```
|
||||||
|
✓ Nom kebab-case sans guillemets
|
||||||
|
✓ Nom forme gérondif (-ing) recommandée
|
||||||
|
✓ Description 3ème personne < 1024 chars
|
||||||
|
✓ Description inclut "Use for/when"
|
||||||
|
✓ Field: allowed-tools (avec tiret)
|
||||||
|
✓ SKILL.md < 500 lignes
|
||||||
|
✓ Pas de copie de code
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pour Subagents
|
||||||
|
|
||||||
|
```
|
||||||
|
✓ Nom kebab-case sans guillemets
|
||||||
|
✓ Description 3ème personne < 1024 chars
|
||||||
|
✓ Description inclut "quand" et "proactivement"
|
||||||
|
✓ Field: tools (sans tiret)
|
||||||
|
✓ Tools explicitement définis
|
||||||
|
✓ Model spécifié (inherit recommandé)
|
||||||
|
✓ Persona claire
|
||||||
|
✓ Workflow décrit
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pour Slash Commands
|
||||||
|
|
||||||
|
```
|
||||||
|
✓ Nom fichier kebab-case.md
|
||||||
|
✓ Description claire
|
||||||
|
✓ Arguments avec $ARGUMENTS
|
||||||
|
✓ Documentation du comportement
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Scores de Conformité
|
||||||
|
|
||||||
|
### Échelle de notation
|
||||||
|
|
||||||
|
**10/10 - Excellent**
|
||||||
|
|
||||||
|
- Tous les critères respectés
|
||||||
|
- Exemples concrets présents
|
||||||
|
- Documentation complète
|
||||||
|
|
||||||
|
**8-9/10 - Très bien**
|
||||||
|
|
||||||
|
- Tous critères majeurs respectés
|
||||||
|
- Quelques suggestions mineures
|
||||||
|
|
||||||
|
**6-7/10 - Acceptable**
|
||||||
|
|
||||||
|
- Critères majeurs respectés
|
||||||
|
- Plusieurs avertissements
|
||||||
|
|
||||||
|
**4-5/10 - Nécessite corrections**
|
||||||
|
|
||||||
|
- Quelques critères critiques non respectés
|
||||||
|
- Nombreux avertissements
|
||||||
|
|
||||||
|
**0-3/10 - Non conforme**
|
||||||
|
|
||||||
|
- Plusieurs critères critiques non respectés
|
||||||
|
- Corrections urgentes nécessaires
|
||||||
|
|
||||||
|
### Pondération des critères
|
||||||
|
|
||||||
|
**Critiques (bloquer) - 40% :**
|
||||||
|
|
||||||
|
- Nom conforme (kebab-case)
|
||||||
|
- Description conforme (3ème personne)
|
||||||
|
- Syntaxe YAML correcte
|
||||||
|
|
||||||
|
**Importants - 40% :**
|
||||||
|
|
||||||
|
- Tools correctement définis
|
||||||
|
- Contenu focalisé
|
||||||
|
- Structure appropriée
|
||||||
|
|
||||||
|
**Suggestions - 20% :**
|
||||||
|
|
||||||
|
- Exemples présents
|
||||||
|
- Documentation complète
|
||||||
|
- Optimisations
|
||||||
Reference in New Issue
Block a user