claude-git-hooks 1.5.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -1
- package/README.md +130 -35
- package/bin/claude-hooks +253 -287
- package/lib/hooks/pre-commit.js +335 -0
- package/lib/hooks/prepare-commit-msg.js +283 -0
- package/lib/utils/claude-client.js +373 -0
- package/lib/utils/file-operations.js +409 -0
- package/lib/utils/git-operations.js +341 -0
- package/lib/utils/logger.js +141 -0
- package/lib/utils/prompt-builder.js +283 -0
- package/lib/utils/resolution-prompt.js +291 -0
- package/package.json +52 -40
- package/templates/pre-commit +58 -411
- package/templates/prepare-commit-msg +62 -118
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,95 @@ Todos los cambios notables en este proyecto se documentarán en este archivo.
|
|
|
5
5
|
El formato está basado en [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [2.0.0] - 2025-10-30
|
|
9
|
+
|
|
10
|
+
### 🚀 BREAKING CHANGE: Migration from Bash to Node.js Hooks
|
|
11
|
+
|
|
12
|
+
**Why this change?**
|
|
13
|
+
The bash-based hooks created fundamental incompatibilities with Windows Git and IDE workflows (VSCode, IntelliJ), causing:
|
|
14
|
+
- Git worktree path conflicts (Windows paths incompatible with WSL)
|
|
15
|
+
- IDE commit failures when using Windows Git
|
|
16
|
+
- Developers forced to use WSL terminal exclusively, abandoning IDE Git features
|
|
17
|
+
|
|
18
|
+
### ✅ Advantages
|
|
19
|
+
|
|
20
|
+
**Cross-Platform Native Support**
|
|
21
|
+
- ✅ Works with Windows Git, WSL, and Bash
|
|
22
|
+
- ✅ No more worktree path issues
|
|
23
|
+
- ✅ Single codebase for all platforms
|
|
24
|
+
|
|
25
|
+
**Dramatically Improved Maintainability**
|
|
26
|
+
- ✅ JavaScript/Node.js: ~60-70% of developers proficient vs ~1-2% with bash/jq/sed/awk
|
|
27
|
+
- ✅ Modern tooling: ESLint, Prettier, Jest testing framework
|
|
28
|
+
- ✅ VS Code debugging support vs echo statements
|
|
29
|
+
|
|
30
|
+
**Professional Development Practices**
|
|
31
|
+
- ✅ Unit and integration testing with Jest
|
|
32
|
+
- ✅ Type safety optional (TypeScript)
|
|
33
|
+
- ✅ Consistent error handling patterns
|
|
34
|
+
|
|
35
|
+
### ⚠️ Disadvantages
|
|
36
|
+
|
|
37
|
+
- ⚠️ Initial migration effort
|
|
38
|
+
- ⚠️ Startup performance: +40-90ms overhead (~1% of total execution time)
|
|
39
|
+
|
|
40
|
+
### 🏆 Industry Success Cases
|
|
41
|
+
|
|
42
|
+
**Node.js Git Hooks - Proven Track Record:**
|
|
43
|
+
- **Husky**: 43k GitHub stars, 500+ contributors, 7M+ weekly npm downloads
|
|
44
|
+
- **lint-staged**: 12k stars, 200+ contributors
|
|
45
|
+
- **Commitizen**: 16k stars, industry standard
|
|
46
|
+
- **simple-git-hooks**: Fast, minimal, 1M+ weekly downloads
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- 🔄 **Migrated from Bash to Node.js with ES6 modules** - Hooks now in `lib/hooks/*.js` with bash wrappers, removing jq/sed/awk dependencies
|
|
51
|
+
- 🌐 **Cross-platform support enabled** - Works on Windows Git Bash, WSL, Linux, and macOS with automatic Claude detection
|
|
52
|
+
- 🔧 **Platform compatibility** - CRLF-to-LF conversion during install, Windows path support (C:\ to /c/) in bash wrappers
|
|
53
|
+
|
|
54
|
+
### Migration Guide
|
|
55
|
+
|
|
56
|
+
Existing installations will continue working. To upgrade:
|
|
57
|
+
1. Run `claude-hooks update` to get v2.0.0
|
|
58
|
+
2. Run `claude-hooks install --force` to reinstall with Node.js hooks
|
|
59
|
+
3. No configuration changes needed - works transparently
|
|
60
|
+
|
|
61
|
+
## [1.5.5] - 2025-10-29
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
|
|
65
|
+
- 🚀 **Parallel Analysis with Subagents**
|
|
66
|
+
- New `CLAUDE_USE_SUBAGENTS` environment variable to enable parallel file analysis
|
|
67
|
+
- Each file analyzed by dedicated Claude subagent for faster processing
|
|
68
|
+
- Works across all analysis functions: pre-commit, message generation, and analyze-diff
|
|
69
|
+
- Significantly faster for commits with 3+ files
|
|
70
|
+
|
|
71
|
+
- ⚙️ **Subagent Configuration Options**
|
|
72
|
+
- `CLAUDE_SUBAGENT_MODEL` - Choose model: haiku (fast), sonnet (balanced), opus (thorough)
|
|
73
|
+
- `CLAUDE_SUBAGENT_BATCH_SIZE` - Control parallel processing (default: 3 files at once)
|
|
74
|
+
- Automatic result consolidation across all subagents
|
|
75
|
+
|
|
76
|
+
- ⏱️ **Execution Time Measurement**
|
|
77
|
+
- All operations now display execution time in seconds and milliseconds
|
|
78
|
+
- Pre-commit analysis: Shows time on success and failure
|
|
79
|
+
- Message generation: Shows generation time
|
|
80
|
+
- Analyze-diff: Shows analysis time
|
|
81
|
+
- Helps identify performance improvements and bottlenecks
|
|
82
|
+
|
|
83
|
+
- 🔧 **Git Worktree Support**
|
|
84
|
+
- `claude-hooks` now recognizes worktrees created in PowerShell from WSL
|
|
85
|
+
- Automatically converts Windows paths (C:\) to WSL paths (/mnt/c/)
|
|
86
|
+
- No more "not a git repository" errors when working in cross-platform worktrees
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
|
|
90
|
+
- 📝 Subagent instructions include explicit consolidation logic for consistent results
|
|
91
|
+
- 🎨 Help command updated with batching examples and clarifications
|
|
92
|
+
- 📋 Post-install text now mentions parallel analysis feature with examples
|
|
93
|
+
- ✅ **Batch size validation** - `CLAUDE_SUBAGENT_BATCH_SIZE` now validated (minimum: 1)
|
|
94
|
+
- 📚 Batching behavior explicitly documented with concrete examples
|
|
95
|
+
|
|
96
|
+
## [1.5.4] - 2025-09-15
|
|
9
97
|
|
|
10
98
|
### Fixed
|
|
11
99
|
|
package/README.md
CHANGED
|
@@ -2,14 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
🚀 **Transforma tu flujo de desarrollo con IA**: análisis de código instantáneo, mensajes de commit automáticos y generación de PRs perfectas. Claude revisa tu código antes de cada commit, detecta issues críticos al estilo SonarQube, y genera toda la documentación que necesitas. ¿Lo mejor? Se ejecuta localmente sin contaminar tu CI/CD.
|
|
4
4
|
|
|
5
|
+
## ✨ Novedad v2.0.0 - Ahora Cross-Platform
|
|
6
|
+
|
|
7
|
+
**¡Nueva arquitectura!** Migración completa a Node.js con ES6 modules para soporte más universal:
|
|
8
|
+
- ✅ **Windows** - Git en Bash y Powershell
|
|
9
|
+
- ✅ **WSL** - Subsistema de Linux
|
|
10
|
+
- ✅ **Linux** - Funcionamiento nativo
|
|
11
|
+
- ✅ **Worktrees** - Compatible con git worktrees en cualquier entorno
|
|
12
|
+
- ✅ **IDEs** - Compatible con git manager de IntelliJ and VSCode -> mensaje de commit "auto" committea (y pushea si se quiere) con mensaje automático. Si el commit tiene problemas, se bloquea.
|
|
13
|
+
|
|
5
14
|
## 🎯 Características principales
|
|
6
15
|
|
|
7
16
|
- 🔍 **Análisis de código pre-commit**: Detecta issues críticos antes de que lleguen al repo
|
|
8
|
-
- 💬 **Mensajes de commit automáticos**: Escribe "auto" y Claude genera el mensaje
|
|
17
|
+
- 💬 **Mensajes de commit automáticos**: Escribe "auto" y Claude genera el mensaje
|
|
9
18
|
- 📋 **Generación de PRs**: Título, descripción y tests sugeridos con un solo comando
|
|
10
|
-
-
|
|
11
|
-
-
|
|
19
|
+
- 🚫 **Skip inteligente**: Excluye código con comentarios SKIP-ANALYSIS
|
|
20
|
+
- 🕵️♂️ **Paralelización**: Análisis asincrónico de archivos con sub agentes
|
|
12
21
|
- 🔄 **Auto-actualización**: Se mantiene actualizado automáticamente
|
|
22
|
+
- 🌍 **Cross-platform**: Windows, WSL, macOS, Linux sin configuración especial
|
|
13
23
|
|
|
14
24
|
## 📋 CHEATSHEET
|
|
15
25
|
|
|
@@ -31,15 +41,15 @@ claude-hooks install --force --skip-auth
|
|
|
31
41
|
|
|
32
42
|
### 📦 Instalación y Gestión
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
✨ **v2.0.0+**: Funciona terminales WSL y Bash.
|
|
35
45
|
|
|
36
46
|
Se debe instalar el paquete globalmente, para luego gestionarlo localmente en cada repositorio.
|
|
37
47
|
|
|
38
48
|
```bash
|
|
39
|
-
#
|
|
49
|
+
# Instalar globalmente (desde cualquier terminal)
|
|
40
50
|
npm install -g claude-git-hooks
|
|
41
51
|
|
|
42
|
-
# Luego en cada proyecto
|
|
52
|
+
# Luego en cada proyecto
|
|
43
53
|
cd /tu/proyecto
|
|
44
54
|
claude-hooks install
|
|
45
55
|
|
|
@@ -101,6 +111,11 @@ public void methodToIgnore() {
|
|
|
101
111
|
# Variables de entorno
|
|
102
112
|
export CLAUDE_ANALYSIS_MODE=sonarqube # Modo de análisis
|
|
103
113
|
export CLAUDE_DEBUG=true # Debug detallado
|
|
114
|
+
|
|
115
|
+
# Subagent configuration (parallel analysis for multiple files)
|
|
116
|
+
export CLAUDE_USE_SUBAGENTS=true # Enable subagent parallel analysis
|
|
117
|
+
export CLAUDE_SUBAGENT_MODEL=haiku # Model: haiku (fast), sonnet (balanced), opus (thorough)
|
|
118
|
+
export CLAUDE_SUBAGENT_BATCH_SIZE=3 # Parallel subagents per batch (default: 3)
|
|
104
119
|
```
|
|
105
120
|
|
|
106
121
|
### 🎯 Casos de Uso Específicos
|
|
@@ -134,25 +149,85 @@ git commit -m "fix: resolver issues"
|
|
|
134
149
|
5. **Archivos grandes**: Se omiten automáticamente archivos > 100KB
|
|
135
150
|
6. **Límite de archivos**: Máximo 10 archivos por commit
|
|
136
151
|
|
|
152
|
+
### 🚀 Parallel Analysis with Subagents (NEW in v1.5.5)
|
|
153
|
+
|
|
154
|
+
**When analyzing 3+ files**, enable subagents for faster parallel processing:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Enable subagent parallel analysis
|
|
158
|
+
export CLAUDE_USE_SUBAGENTS=true
|
|
159
|
+
|
|
160
|
+
# Optional: Choose model (default: haiku for speed)
|
|
161
|
+
export CLAUDE_SUBAGENT_MODEL=haiku # Fast & cheap
|
|
162
|
+
export CLAUDE_SUBAGENT_MODEL=sonnet # Balanced quality/speed
|
|
163
|
+
export CLAUDE_SUBAGENT_MODEL=opus # Maximum quality
|
|
164
|
+
|
|
165
|
+
# Optional: Adjust batch size (default: 3 files at a time)
|
|
166
|
+
export CLAUDE_SUBAGENT_BATCH_SIZE=3
|
|
167
|
+
|
|
168
|
+
# Now commits will use parallel analysis automatically
|
|
169
|
+
git commit -m "feat: implement multiple features"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**How batching works:**
|
|
173
|
+
- `BATCH_SIZE=1` with 4 files → 4 sequential batches (1 subagent each)
|
|
174
|
+
- `BATCH_SIZE=3` with 4 files → 2 batches (3 parallel, then 1)
|
|
175
|
+
- `BATCH_SIZE=4` with 4 files → 1 batch (all 4 in parallel)
|
|
176
|
+
- Batch size is validated automatically (minimum: 1)
|
|
177
|
+
|
|
178
|
+
**How it works:**
|
|
179
|
+
- Each file is analyzed by a dedicated Claude subagent
|
|
180
|
+
- Files are processed in batches for optimal performance
|
|
181
|
+
- Results are consolidated automatically into single response
|
|
182
|
+
- Shows execution time for all operations
|
|
183
|
+
- Uses one-line prompt injection - no complex architecture changes
|
|
184
|
+
|
|
185
|
+
**Best for:** Large commits (3+ files), refactoring tasks, feature branches
|
|
186
|
+
|
|
187
|
+
### 🎨 Personalización y Customización
|
|
188
|
+
|
|
189
|
+
**Archivos clave para modificar:**
|
|
190
|
+
- `.claude/CLAUDE_PRE_COMMIT_SONAR.md` - Criterios (backend/frontend/data/db)
|
|
191
|
+
- `.claude/CLAUDE_ANALYSIS_PROMPT_SONAR.md` - Template del prompt
|
|
192
|
+
- `lib/hooks/pre-commit.js` - CONFIG object (extensiones, límites, umbrales)
|
|
193
|
+
|
|
194
|
+
**Subagents (v1.5.5+)** - Para commits multi-archivo (3+), reduce análisis 60-70%:
|
|
195
|
+
```bash
|
|
196
|
+
export CLAUDE_USE_SUBAGENTS=true # Activar paralelo
|
|
197
|
+
export CLAUDE_SUBAGENT_MODEL=haiku # haiku/sonnet/opus
|
|
198
|
+
export CLAUDE_SUBAGENT_BATCH_SIZE=3 # Archivos simultáneos
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Ejemplo:**
|
|
202
|
+
```bash
|
|
203
|
+
vim .claude/CLAUDE_PRE_COMMIT_SONAR.md # Agregar reglas API REST/Spring Boot
|
|
204
|
+
```
|
|
205
|
+
|
|
137
206
|
## 🔧 Configuración Previa Importante
|
|
138
207
|
|
|
139
|
-
###
|
|
208
|
+
### Requisitos del Sistema
|
|
140
209
|
|
|
141
|
-
|
|
210
|
+
✨ **v2.0.0+**: Los hooks funcionan en cualquier terminal donde tengas:
|
|
211
|
+
|
|
212
|
+
- **Node.js** >= 16.9.0
|
|
213
|
+
- **Git** configurado
|
|
214
|
+
- **Claude CLI** instalado y autenticado
|
|
215
|
+
|
|
216
|
+
### Credenciales Git
|
|
217
|
+
|
|
218
|
+
Si es tu primera vez configurando git en esta terminal, configura tus credenciales:
|
|
142
219
|
|
|
143
220
|
```bash
|
|
144
|
-
# En WSL
|
|
145
221
|
git config --global user.name "Tu Nombre"
|
|
146
222
|
git config --global user.email "tu.email@ejemplo.com"
|
|
147
223
|
|
|
148
|
-
# Si usas
|
|
224
|
+
# Si usas credential helper (opcional)
|
|
149
225
|
git config --global credential.helper store
|
|
150
|
-
# O configura tu credential helper específico
|
|
151
226
|
```
|
|
152
227
|
|
|
153
228
|
## 🚀 Instalación
|
|
154
229
|
|
|
155
|
-
**
|
|
230
|
+
✨ **v2.0.0+**: Instalación cross-platform. Funciona en PowerShell, CMD, WSL, macOS Terminal, Linux shell.
|
|
156
231
|
|
|
157
232
|
```bash
|
|
158
233
|
# Instalar el paquete globalmente
|
|
@@ -163,15 +238,18 @@ cd tu-proyecto
|
|
|
163
238
|
claude-hooks install
|
|
164
239
|
```
|
|
165
240
|
|
|
166
|
-
El comando `claude-hooks install`
|
|
241
|
+
El comando `claude-hooks install` incluye:
|
|
167
242
|
|
|
168
|
-
- ✅ Verificación completa de dependencias del sistema
|
|
169
|
-
- ✅ Instalación automática de paquetes faltantes (jq, curl)
|
|
170
|
-
- ✅ Configuración de Git (line endings WSL/Windows)
|
|
243
|
+
- ✅ Verificación completa de dependencias del sistema (Node.js, Git, Claude CLI)
|
|
171
244
|
- ✅ Verificación de autenticación Claude con entretenimiento (omitible con `--skip-auth`)
|
|
172
|
-
- ✅ Instalación de hooks
|
|
245
|
+
- ✅ Instalación de hooks con arquitectura bash wrapper + Node.js
|
|
246
|
+
- ✅ Instalación de archivos de pautas y templates
|
|
173
247
|
- ✅ Actualización automática de .gitignore con archivos de Claude
|
|
174
248
|
|
|
249
|
+
**Nuevo en v2.0.0 - Soporte Cross-Platform:**
|
|
250
|
+
|
|
251
|
+
Auto-detecta plataforma, convierte CRLF→LF en install, busca Claude en WSL (Windows), instala bash wrappers que convierten rutas C:\ a /c/
|
|
252
|
+
|
|
175
253
|
**Opciones de instalación:**
|
|
176
254
|
|
|
177
255
|
- `--force`: Reinstala aunque los hooks ya existan
|
|
@@ -215,7 +293,7 @@ Si no existe un `.gitignore`, se creará uno nuevo. Si ya existe, las entradas s
|
|
|
215
293
|
|
|
216
294
|
### Hook pre-commit (Análisis de código)
|
|
217
295
|
|
|
218
|
-
1. **Intercepta cada intento de commit**
|
|
296
|
+
1. **Intercepta cada intento de commit**
|
|
219
297
|
2. **Extrae y filtra archivos modificados**:
|
|
220
298
|
- Solo analiza: Java, XML, properties, yml, yaml
|
|
221
299
|
- Omite archivos mayores a 100KB
|
|
@@ -311,17 +389,17 @@ claude-hooks status
|
|
|
311
389
|
|
|
312
390
|
### Scripts
|
|
313
391
|
|
|
314
|
-
|
|
392
|
+
✨ **v2.0.0+**: Configuración en archivos Node.js dentro de `lib/hooks/`.
|
|
393
|
+
|
|
394
|
+
En `lib/hooks/pre-commit.js`:
|
|
315
395
|
|
|
316
396
|
- **`MAX_FILE_SIZE`**: Tamaño máximo de archivo a analizar (default: 100KB)
|
|
317
397
|
- **`MAX_FILES`**: Número máximo de archivos por commit (default: 10)
|
|
318
|
-
- **`
|
|
319
|
-
- **`GUIDELINES_FILE`**: Archivo de pautas (default: ".claude/CLAUDE_PRE_COMMIT_SONAR.md")
|
|
398
|
+
- **`ALLOWED_EXTENSIONS`**: Extensiones permitidas (default: .java, .xml, .properties, .yml, .yaml)
|
|
320
399
|
|
|
321
|
-
En
|
|
400
|
+
En `lib/hooks/prepare-commit-msg.js`:
|
|
322
401
|
|
|
323
402
|
- **`MAX_FILE_SIZE`**: Tamaño máximo para incluir diff completo (default: 100KB)
|
|
324
|
-
- **`CLAUDE_CLI`**: Comando de Claude CLI (default: "claude")
|
|
325
403
|
|
|
326
404
|
### Pautas de Evaluación
|
|
327
405
|
|
|
@@ -346,27 +424,42 @@ No hay... esto es la perfección hecha código.
|
|
|
346
424
|
|
|
347
425
|
### Estructura del Proyecto
|
|
348
426
|
|
|
427
|
+
✨ **v2.0.0+**: Nueva arquitectura modular con ES6 modules.
|
|
428
|
+
|
|
349
429
|
```
|
|
350
430
|
claude-git-hooks/
|
|
351
431
|
├── bin/
|
|
352
|
-
│ └── claude-hooks # CLI principal
|
|
432
|
+
│ └── claude-hooks # CLI principal (ES6 modules)
|
|
433
|
+
├── lib/ # 🆕 Código Node.js modular
|
|
434
|
+
│ ├── hooks/
|
|
435
|
+
│ │ ├── pre-commit.js # Hook de análisis (Node.js)
|
|
436
|
+
│ │ └── prepare-commit-msg.js # Hook de mensajes (Node.js)
|
|
437
|
+
│ └── utils/
|
|
438
|
+
│ ├── logger.js # Sistema de logging centralizado
|
|
439
|
+
│ ├── git-operations.js # Operaciones git abstractas
|
|
440
|
+
│ ├── file-operations.js # I/O con filtro SKIP-ANALYSIS
|
|
441
|
+
│ ├── claude-client.js # Cliente Claude CLI
|
|
442
|
+
│ ├── prompt-builder.js # Constructor de prompts
|
|
443
|
+
│ └── resolution-prompt.js # Generador de resolution prompts
|
|
353
444
|
├── templates/
|
|
354
|
-
│ ├── pre-commit #
|
|
355
|
-
│ ├── prepare-commit-msg #
|
|
445
|
+
│ ├── pre-commit # Bash wrapper (llama a lib/hooks/pre-commit.js)
|
|
446
|
+
│ ├── prepare-commit-msg # Bash wrapper (llama a lib/hooks/prepare-commit-msg.js)
|
|
356
447
|
│ ├── check-version.sh # Script de verificación de versión
|
|
357
|
-
│ ├── CLAUDE_PRE_COMMIT_SONAR.md # Pautas SonarQube
|
|
448
|
+
│ ├── CLAUDE_PRE_COMMIT_SONAR.md # Pautas SonarQube
|
|
358
449
|
│ ├── CLAUDE_ANALYSIS_PROMPT_SONAR.md # Template de prompt para análisis
|
|
359
450
|
│ └── CLAUDE_RESOLUTION_PROMPT.md # Template para resolución de issues
|
|
451
|
+
├── test/ # 🆕 Tests unitarios con Jest
|
|
452
|
+
│ └── unit/
|
|
453
|
+
│ └── logger.test.js # Tests del logger
|
|
360
454
|
├── .claude/ # Directorio de configuración local (gitignore)
|
|
361
455
|
│ └── settings.local.json # Configuración local del usuario
|
|
362
|
-
├──
|
|
456
|
+
├── jest.config.js # 🆕 Configuración Jest para ES6
|
|
457
|
+
├── .eslintrc.json # 🆕 Configuración ESLint
|
|
458
|
+
├── .prettierrc.json # 🆕 Configuración Prettier
|
|
459
|
+
├── package.json # Configuración NPM (type: "module")
|
|
363
460
|
├── package-lock.json # Lock file de NPM
|
|
364
461
|
├── README.md # Este archivo
|
|
365
|
-
├── README-NPM.md # Documentación para publicación NPM
|
|
366
462
|
├── CHANGELOG.md # Historial de versiones
|
|
367
|
-
├── PUBLISH.md # Guía de publicación
|
|
368
|
-
├── CLAUDE_PRE_COMMIT_SONAR.md # Pautas de evaluación (legacy)
|
|
369
|
-
├── pre-commit # Hook principal (legacy)
|
|
370
463
|
└── .gitignore # Archivos ignorados por git
|
|
371
464
|
```
|
|
372
465
|
|
|
@@ -392,10 +485,12 @@ claude-hooks install
|
|
|
392
485
|
|
|
393
486
|
#### 1. Modificar Hooks
|
|
394
487
|
|
|
395
|
-
|
|
488
|
+
✨ **v2.0.0+**: La lógica de los hooks está en `lib/hooks/`:
|
|
396
489
|
|
|
397
|
-
- `
|
|
398
|
-
- `
|
|
490
|
+
- `lib/hooks/pre-commit.js` - Lógica de análisis de código (Node.js ES6)
|
|
491
|
+
- `lib/hooks/prepare-commit-msg.js` - Lógica de generación de mensajes (Node.js ES6)
|
|
492
|
+
- `templates/pre-commit` - Bash wrapper que llama al script Node.js
|
|
493
|
+
- `templates/prepare-commit-msg` - Bash wrapper que llama al script Node.js
|
|
399
494
|
|
|
400
495
|
#### 2. Probar Localmente
|
|
401
496
|
|