The setup-hooks.sh bash script is redundant since we have the cross-platform
Node.js version (setup-hooks.js) that works on Windows, macOS, and Linux.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replaced bash script with Node.js version using native fs/path modules
- Updated package.json to use 'node scripts/setup-hooks.js'
- Works on Windows (PowerShell/cmd), macOS, and Linux
- Handles chmod gracefully on Windows where it's not needed
Set up automatic git hooks that run all CI validation checks before pushing code. This prevents common CI failures by catching issues early in the development workflow.
Changes:
- Add .githooks/pre-push that runs format, spell, lint, and validation checks
- Add scripts/setup-hooks.sh to install hooks into .git/hooks/
- Update package.json with setup and postinstall scripts for automatic installation
- Document git hooks setup in CONTRIBUTING.md with usage instructions
The pre-push hook runs the same checks as CI:
- Prettier formatting validation
- cspell spell checking
- markdownlint markdown linting
- Skills structure validation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add prettier as dev dependency
- Create .prettierrc config with markdown-specific settings
- Add .prettierignore to exclude node_modules and generated files
- Add npm scripts:
- format: Format all files with prettier
- format:check: Check formatting without changes
- Update npm check script to include format:check
- Add format check step to GitHub Actions CI
- Format all existing files with prettier
Prettier config:
- Preserve line wrapping in markdown (proseWrap: preserve)
- 120 char print width for markdown
- Consistent formatting for JSON and JS files
This ensures all markdown, JSON, and JS files maintain consistent
formatting across the repository.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>