HOW-TO GUIDE

How to run Claude Code on 322 lines of rules, one review skill, and six hooks

Based on a post by Coldboot (@coldboothq) on X · Nov 26, 2026

You'll end with: A small Claude Code setup where hooks block .env reads and placeholder code, and the type-check must pass before Claude stops.

Why it's worth having: The setup went from 570 lines across 10 files to 322 lines across 4, small enough to read in one sitting.

At a glance

WHO IT'S FOR
Software engineers and tech leads who run Claude Code, Cursor, or Copilot on the same repo.
LEVEL
Intermediate
COST
Free to read. The method needs Claude Code and a repo with eslint and a type-check.
YOU NEED
Claude Code · An AGENTS.md file · A repo with eslint and a type-check

The method, in short

  1. 1Keep nearly all rules in AGENTS.md, have an 11-line CLAUDE.md import it, and point Cursor and Copilot at the same rules.
  2. 2Add one PR review skill that checks every change first and proposes a new AGENTS.md line when a mistake shows up twice.
  3. 3Use hooks to block .env names, placeholder code, skipped tests, and secret keys, and to run eslint --fix after each edit.
  4. 4Deny .env reads and git push, and ask first for commits and edits to app config, Firestore rules, lockfiles, and CI workflows.

The post breaks down the rule files, the review skill, all six hooks, and the permissions list.