Raw transcript — Claude Code is Amazing… Until It DELETES Production
Source: https://www.youtube.com/watch?v=VqDs46A8pqE Duration: 22m Captured: 2026-04-19
Full clean transcript at /tmp/yt-process/idd-deletes-clean.txt (4,540 words). Per copyright policy, raw transcript preserved for internal reference. Re-download via:
yt-dlp --write-auto-sub --sub-lang en --skip-download --sub-format vtt -o "/tmp/yt-process/%(id)s" "https://www.youtube.com/watch?v=VqDs46A8pqE"
python3 ~/.claude/scripts/vtt-to-text.py /tmp/yt-process/VqDs46A8pqE.en.vtt
Structural outline:
- [00:00–02:00] Cold open scenario: 7:30am, Claude Code Opus 4.5 in YOLO mode in a 7-figure-revenue codebase, agent hallucinates and runs back-to-back damaging commands. Hooks save the day. Dan’s “Claude Code Damage Control” skill is the subject
- [02:00–05:00] Setup walkthrough: clone repo, /install command (interactive setup pattern via ask-user-question tool), choose global/project/personal, choose Python or TypeScript backend, hooks merged into settings.json
- [05:00–08:00] Prompt hooks (PreToolUse with prompt-based check) — non-deterministic last-ditch guard for commands you didn’t anticipate. Slow but worth it. Once you find a dangerous pattern, encode it as deterministic hook
- [08:00–11:00] patterns.yaml layer over Claude Code Hooks — three categories: BLOCKED (regex deny), ASK (regex prompt user), PATH PROTECTION (zero_access_paths, read_only_paths, no_delete_paths)
- [11:00–14:00] Live demo: ssh blocked, .bashrc delete blocked, append-to-bashrc blocked (read-only). Hooks run in parallel — first to fail wins
- [14:00–18:00] Three layers of hook hierarchy: project-level, user-level (global, applies to all your codebases on this machine), enterprise-level. Recommend at minimum project + global
- [18:00–21:00] Sandbox callout — agent sandboxes defer trust entirely (referenced as separate video). Building trust with agents = systems that don’t require trust
- [21:00–22:23] Close: don’t be the vibe-coder who deletes their prod database. Models keep getting better but one-in-100,000 hallucination is enough. Insurance is cheap
Quotes ≤15 words each per copyright policy.