Skip to content

Instantly share code, notes, and snippets.

@hadrienblanc
Last active July 20, 2026 07:56
Show Gist options
  • Select an option

  • Save hadrienblanc/2b0f2e9b7b0cfcc79a8f9d32ac5b20ce to your computer and use it in GitHub Desktop.

Select an option

Save hadrienblanc/2b0f2e9b7b0cfcc79a8f9d32ac5b20ce to your computer and use it in GitHub Desktop.
my claude.md

CLAUDE.md — Global Rules

Git

  • No bot / Claude signatures — Never add Co-Authored-By: Claude or any AI signature in commits
  • Commit often to track history
  • Unrelated changes → separate commits
  • Use git add <files> only (no -a or -A) unless asked otherwise

Tests (MANDATORY)

  • Before commit, run the appropriate confidence suite for the change
  • Do not ask the user to choose which tests to run, run them

Core rules

  • Simple, predictable, readable code, lisible for humans
  • No hacks
  • If you comment the code: do not repeat the code, explain the why, in English
  • Do not add useless commenting
  • All text, comments, and documentation must be in English unless explicitly requested otherwise.
  • Be critical
  • Say no to bad ideas
  • Be radically honest
  • Propose alternatives when they represent industry best practices

Sub-Agents / Second Opinion (CRITICAL)

Default review panel: GLM + Codex + Grok. Run them in parallel (background), then synthesize.

Available models & Commands

GLM-5.2

  • opencode run "[PROMPT]" -m zai-coding-plan/glm-5.2 or zai -p (claude code with model aliass)

Codex (gpt-5.6-sol — frontier tier, the most powerful)

  • codex exec "[PROMPT]" -m gpt-5.6-sol -c model_reasoning_effort=xhigh -s read-only -o /dev/stdout (model_reasoning_effort: low | medium | high | xhigh | max)
  • -s read-only: codex can read the whole disk but cannot write — enforces the read-only rule mechanically (verified working non-interactively). Do NOT use --dangerously-bypass-approvals-and-sandbox for reviews.
  • Do NOT silence stderr (2>/dev/null): errors must stay visible.
  • Never use model_reasoning_effort=ultra

Grok

  • grok -p "[PROMPT]"

Multi-model review prompting

When sending code for review to sub-agents you should share the list of modified files and not a diff. Share that a review is for static analysis only: - ALWAYS include in the prompt: "Do not modify any files. Static analysis only. Return your observations/recommendations. Do not create sub-agents with other models."

Review output display

After each multi-model review, print a short summary per model (max 3-4 lines) with a count of points raised (e.g. "3 remarks: 1 potential bug, 1 perf, 1 style"), then the global synthesis.

Communication

  • Never propose to pause or stop ongoing work

Codebase Understanding before editing

  • Before changing code, inspect surrounding files and existing patterns
  • Search for similar implementations before introducing a new one
  • Read relevant tests before writing new logic
  • Understand call sites before changing public behavior
  • Prefer the smallest safe change that fully solves the problem
  • Avoid speculative refactors during bug fixes
  • Do not rename/move/restructure unrelated code while fixing a focused issue

Specific for Rails projects

  • To cast a string to a boolean, use ActiveRecord::Type::Boolean.new.cast
  • Avoid yield in Ruby methods — prefer &block + block.call (and avoid this pattern if possible)
  • No new gems unless necessary
  • Code must be conventional Rails 8 + Hotwire + DHH Style

Rails 8 – note on Turbo Delete

  • link_to: ✅ data: { turbo_method: :delete, turbo_confirm: "..." } (Turbo intercepts the click)
  • button_to: ✅ method: :delete, data: { turbo_confirm: "..." } (generates a <form> with _method=delete)

Omarchy (personal machine)

  • more info: ~/Projets/hadrienblanc/utils/omarchy/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment