You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
This is a collection of custom [pre-commit](https://pre-commit.com) hooks implemented as shell scripts. The hooks are defined in `.pre-commit-hooks.yaml` and their implementations live in `scripts/`.
8
+
9
+
## Development Commands
10
+
11
+
```bash
12
+
# Run all pre-commit hooks on all files
13
+
pre-commit run --all-files
14
+
15
+
# Run a specific hook on all files
16
+
pre-commit run --all-files <hook-id>
17
+
18
+
# Update hooks to latest versions (with frozen revisions)
19
+
pre-commit autoupdate --freeze
20
+
21
+
# Install hooks locally
22
+
pre-commit install
23
+
```
24
+
25
+
## Architecture
26
+
27
+
-**`.pre-commit-hooks.yaml`**: Hook definitions that consumers reference. Uses `keep-sorted` directives to maintain alphabetical order.
28
+
-**`scripts/`**: Shell script implementations for each hook. All scripts use `#!/usr/bin/env bash` and `set -euo pipefail`.
29
+
-**`.pre-commit-config.yaml`**: This repo's own pre-commit configuration, used for self-validation and CI.
30
+
31
+
## Adding New Hooks
32
+
33
+
1. Create the script in `scripts/` with portable bash shebang (`#!/usr/bin/env bash`)
34
+
2. Add the hook definition to `.pre-commit-hooks.yaml` within the `keep-sorted` block
35
+
3. Update `README.md` with hook documentation
36
+
37
+
## CI
38
+
39
+
-**pre-commit.yml**: Runs pre-commit hooks on all files
0 commit comments