Pre-Commit Hooks
Establishes automated code quality checks before commits to enforce coding standards and improve project maintainability.
Install this skill
Security score
The Pre-Commit Hooks skill was audited on Mar 1, 2026 and we found 18 security issues across 2 threat categories, including 2 high-severity. Review the findings below before installing.
Categories Tested
Security Issues
Direct command execution function call
| 661 | execSync('npm install --save-dev husky lint-staged @commitlint/cli @commitlint/config-conventional', { stdio: 'inherit' }); |
Direct command execution function call
| 730 | execSync('npm run prepare', { stdio: 'inherit' }); |
Template literal with variable interpolation in command context
| 117 | return `eslint --fix ${filenames.map(f => `"${f}"`).join(' ')}`; |
Template literal with variable interpolation in command context
| 121 | return `prettier --write ${filenames.map(f => `"${f}"`).join(' ')}`; |
Template literal with variable interpolation in command context
| 548 | console.log(`${colors[color]}${message}${colors.reset}`); |
Template literal with variable interpolation in command context
| 556 | colorLog(`ā Created ${hookName}`, 'green'); |
Template literal with variable interpolation in command context
| 559 | colorLog(`ā Failed to create ${hookName}`, 'red'); |
Template literal with variable interpolation in command context
| 651 | colorLog(`\nš Setup Summary: ${successCount}/${hooks.length} hooks created`, |
Template literal with variable interpolation in command context
| 809 | (filenames) => `eslint --fix --max-warnings 0 ${filenames.join(' ')}`, |
Template literal with variable interpolation in command context
| 818 | return `npx tsc --noEmit ${tsFiles.join(' ')}`; |
Node child_process module reference
| 534 | const { execSync } = require('child_process'); |
Hex-encoded characters
| 538 | reset: '\x1b[0m', |
Hex-encoded characters
| 539 | red: '\x1b[31m', |
Hex-encoded characters
| 540 | green: '\x1b[32m', |
Hex-encoded characters
| 541 | yellow: '\x1b[33m', |
Hex-encoded characters
| 542 | blue: '\x1b[34m', |
Hex-encoded characters
| 543 | cyan: '\x1b[36m', |
Hex-encoded characters
| 544 | magenta: '\x1b[35m', |