My CLAUDE.md — Claude Code Agent Rules (Caveman Mode + Model Routing + Autonomy)

7 rules to make Claude Code faster: terse replies, model routing, DOM-first browser automation, skill structure, TS standards, privacy checklist, autonomous mode.

6/19/2026 · 28 viewsCLAUDE.md

← Browse

My Claude Code Agent Rules

Stack: TypeScript · React · Node.js · PostgreSQL

A collection of rules I give Claude Code to make it faster and less verbose. Works with Claude Code CLI, Cursor, and any MCP-enabled setup.


1. Reply Style — Caveman Mode

Claude tends to over-explain. These rules cut the noise:

- Skip all filler phrases ("Sure!", "Of course", "Great question")
- Don't restate what the user just said
- One sentence if one sentence is enough
- Keep code blocks, commands, and paths complete — never abbreviate them
- No emoji unless explicitly asked

Why it matters: Claude's default verbosity wastes tokens and buries the answer. Caveman mode cuts responses by ~40% without losing information.


2. Model Routing — Save Tokens

Simple queries / summaries / classification / Q&A
  → use a cheaper or free model (e.g. NVIDIA free API, Haiku)

Complex reasoning / code generation / multi-step planning
  → use Claude Sonnet/Opus

For homelab setups, NVIDIA's free inference API (integrate.api.nvidia.com/v1) is OpenAI-compatible and works as a drop-in fallback.


3. Browser Automation — DOM First, Screenshots Last

DO:
- Use read_page (filter: interactive) to get element refs
- Click via ref: computer left_click ref:ref_X
- Use javascript_tool to query state
- Re-query before every action — never reuse stale refs

DON'T:
- Click by pixel coordinates
- Rely on nth-child or positional selectors
- Use screenshots to read text — parse the DOM instead

4. Agent Skill Structure (.github/skills/)

skills/
  web-research/SKILL.md       # research-first workflow
  nextjs-conventions/SKILL.md # App Router rules, middleware vs proxy
  code-review/SKILL.md        # type safety, perf, security checklist
  cf-worker/SKILL.md          # Cloudflare Worker + tunnel deploy
  keyword-research/SKILL.md   # SEO keyword methodology
  cover-gen/SKILL.md          # generate 1200x630 OG images

Auto-trigger in CLAUDE.md:

  • nextjs-conventions — auto: any nextjs mention
  • web-research — auto: new package, external API

5. Code Standards

- 2-space indent, max 120 chars per line, trailing commas
- Strict TypeScript — no any
- Function components only (no class components)
- Conventional commits: feat/fix/docs/refactor/test/chore(scope): message
- Before every commit: type-check → format → test → lint
- No comments explaining WHAT — only WHY

6. Publishing Checklist — Strip Private Info

grep -iE "myserver|192\.168\.|/home/[a-z]+|sk-[a-z0-9]+" /tmp/draft.md

Replace: Hostnames → myserver, IPs → 192.168.1.x, paths → /home/myuser, keys → [REDACTED]


7. Autonomous Mode

Act directly: edit files, run tests, install packages, read logs
Ask first: delete files/branches, force push, drop DB tables, post publicly