A 60-line PreToolUse hook that stops Claude Code from editing your .env
Details
- External ID
- 49063946
- Source
- HN
- Company
- —
- Product
- A 60-line PreToolUse hook that stops Claude Code from editing your .env
- Website domain
- github.com
- Launched
- July 27, 2026
- Cohort
- —
- Upvotes
- 6
- Upvotes percentile
- 0.2873357228195938
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:26 p.m.
- Updated at
- Sept. 7, 2026, 9:26 p.m.
Enrichment
- Theme
- developer tools and programming utilities
- Vertical
- Horizontal
- Function
- Dev tools
- Audience
- Developer
- AI stance
- AI feature
- Project type
- Hobby / open-source project
- Normalized one-liner
- security hook preventing claude code from editing env files
- Manually corrected
- False
Could you build this?
Yes A 60-line script that hooks into Claude Code's PreToolUse event to inspect file paths and block edits to `.env` files is a simple regex and exit code script.
Discussion
No comments on this launch.
Competitors
Other products that read as similar to this one — 406 launches clear the similarity bar, closest 8 shown.
Attention rank: #299 of 407 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 269 days after the earliest competitor.
- A Claude Code plugin that catch destructive Git and filesystem commands · hn · 2025-12-26 · 61 upvotes · similarity 0.58
- ContextSaver · github · 2026-09-16 · 23 upvotes · similarity 0.56
- Claude Reflect · hn · 2026-01-04 · 75 upvotes · similarity 0.55
- ship-the-result · github · 2026-09-14 · 11 upvotes · similarity 0.55
- Janus · github · 2026-09-25 · 114 upvotes · similarity 0.55
- jev-belay · github · 2026-09-18 · 17 upvotes · similarity 0.54
- jev-pruner · github · 2026-09-18 · 139 upvotes · similarity 0.54
- jev · github · 2026-09-17 · 13 upvotes · similarity 0.52
Other launches for this product
- No other launches for this product.
Same idea, different domain
Nobody's really built a dev tools tool for Sales yet.