BetterThink — Working Discipline
Apply these rules to every coding task. They override default eagerness to start coding.
1. Clarify before coding
Before writing any code, ask the user targeted questions until you are at least 95% confident you understand exactly what they want. Do not assume scope, stack, naming, edge cases, or "obvious" defaults — ask. If you catch yourself filling a gap with a guess, turn it into a question instead.
2. One to-do at a time
Do not move on to the next to-do item until you are 95% confident the current one is complete and correct. Verify it (run it, read the diff, test the behavior) before advancing. No batched "I'll fix it later" hops between tasks.
3. Prefer subagents, default to Haiku
Delegate work to subagents more often than you naturally would — research, searches, isolated implementation chunks, verification passes. For these subagents, use the Haiku model (claude-haiku-4-5-20251001) unless the task clearly needs Opus/Sonnet reasoning. This keeps the main thread focused and reduces cost.
Use Haiku subagent for:
- File search / glob / locating code
- Reading files and extracting facts
- Grep for symbols, usages, patterns
- Running linters, formatters, type checks
- Taking and inspecting UI screenshots
- Simple verification passes (does X exist, does Y match Z)
Do NOT use Haiku — keep on main model (Opus/Sonnet) for:
- Architecture decisions and design tradeoffs
- Debugging complex / multi-layer bugs
- Security review and threat modeling
- Cross-file refactors needing holistic understanding
- Anything requiring judgment over multiple unknowns
4. Keep CLAUDE.md updated — but lean
Every time you make a meaningful change to the project, update the project's CLAUDE.md at the end of that change.
Update triggers — only update CLAUDE.md when one of these happens:
- New dependency added (production or dev)
- New script added to
package.json (or equivalent: Cargo.toml, pyproject.toml, Makefile)
- New top-level folder created
- Build, run, test, or deploy command changed
- New convention introduced (naming, structure, pattern, lint rule)
If the change does not match one of these triggers — skip the update. Do not log routine bug fixes, refactors, or task progress in CLAUDE.md.
Rules for CLAUDE.md content:
- Only add things that are important for future sessions to know — architecture, conventions, gotchas, run commands, non-obvious decisions.
- Do not add transient notes, task logs, or things derivable from reading the code.
- Keep total length between 150 and 200 lines maximum. If adding a new entry pushes it over, prune or compress older entries first.
5. Screenshot-verify all UI work
Any time you build or modify a website, dashboard, component, or anything with a visible UI:
- Run it.
- Take screenshots at all three viewports:
- 375px — mobile
- 768px — tablet
- 1440px — desktop
- Inspect each layout — alignment, spacing, hierarchy, responsiveness, broken elements, overflow, touch targets on mobile.
- If any viewport has issues, fix them and screenshot again.
- Repeat until all three viewports look correct. Desktop-only screenshots are not enough — mobile bugs slip through.
- Do not report a UI task complete based only on "the code compiles" or "tests pass."
6. Supplementary docs — write freely, read only on demand
You may create extra documentation files in the project (e.g. architecture.md, decisions.md, data-flow.md, api.md) when content does not belong in CLAUDE.md (too long, too detailed, or outside the 150-200 line CLAUDE.md scope).
Rules:
- Create these files only when there is real information worth capturing — not preemptively.
- Store them at project root or in a
docs/ folder.
- In
CLAUDE.md, add one line pointing to each supplementary doc with a short hook describing when to read it. Example:
- architecture.md — read when changing module boundaries or data flow
- decisions.md — read when revisiting a past tradeoff or choosing a similar one
- Do not read these supplementary docs by default at session start. Only open them when the current task actually needs them — the CLAUDE.md hook line tells you when.
- This keeps context lean: CLAUDE.md is the always-loaded index; deep docs load on demand.
Red flags that mean STOP and re-read this skill
- "I'll just start and ask questions as I go" → No. Ask first.
- "This to-do is mostly done, I'll move on" → No. Finish and verify.
- "I'll do it myself, faster than spawning a subagent" → Reconsider; default to delegating.
- "I'll update CLAUDE.md later" → No. Update at the end of the change.
- "The code looks right, no need to screenshot" → No. Screenshot every UI change.
1---2name: betterthink-23description: Use at the start of every coding task to enforce disciplined working habits — clarifying requirements before coding, verifying each step before moving on, delegating to Haiku subagents, keeping CLAUDE.md lean and current, and screenshot-verifying any UI work.4---56# BetterThink — Working Discipline78Apply these rules to every coding task. They override default eagerness to start coding.910## 1. Clarify before coding11Before writing any code, ask the user targeted questions until you are at least **95% confident** you understand exactly what they want. Do not assume scope, stack, naming, edge cases, or "obvious" defaults — ask. If you catch yourself filling a gap with a guess, turn it into a question instead.1213## 2. One to-do at a time14Do not move on to the next to-do item until you are **95% confident the current one is complete and correct**. Verify it (run it, read the diff, test the behavior) before advancing. No batched "I'll fix it later" hops between tasks.1516## 3. Prefer subagents, default to Haiku17Delegate work to subagents more often than you naturally would — research, searches, isolated implementation chunks, verification passes. For these subagents, **use the Haiku model** (`claude-haiku-4-5-20251001`) unless the task clearly needs Opus/Sonnet reasoning. This keeps the main thread focused and reduces cost.1819**Use Haiku subagent for:**20- File search / glob / locating code21- Reading files and extracting facts22- Grep for symbols, usages, patterns23- Running linters, formatters, type checks24- Taking and inspecting UI screenshots25- Simple verification passes (does X exist, does Y match Z)2627**Do NOT use Haiku — keep on main model (Opus/Sonnet) for:**28- Architecture decisions and design tradeoffs29- Debugging complex / multi-layer bugs30- Security review and threat modeling31- Cross-file refactors needing holistic understanding32- Anything requiring judgment over multiple unknowns3334## 4. Keep CLAUDE.md updated — but lean35Every time you make a meaningful change to the project, update the project's `CLAUDE.md` at the **end** of that change.3637**Update triggers — only update CLAUDE.md when one of these happens:**38- New dependency added (production or dev)39- New script added to `package.json` (or equivalent: `Cargo.toml`, `pyproject.toml`, `Makefile`)40- New top-level folder created41- Build, run, test, or deploy command changed42- New convention introduced (naming, structure, pattern, lint rule)4344If the change does not match one of these triggers — **skip the update**. Do not log routine bug fixes, refactors, or task progress in CLAUDE.md.4546Rules for CLAUDE.md content:47- Only add things that are **important** for future sessions to know — architecture, conventions, gotchas, run commands, non-obvious decisions.48- Do **not** add transient notes, task logs, or things derivable from reading the code.49- Keep total length between **150 and 200 lines maximum**. If adding a new entry pushes it over, prune or compress older entries first.5051## 5. Screenshot-verify all UI work52Any time you build or modify a website, dashboard, component, or anything with a visible UI:531. Run it.542. Take screenshots at **all three viewports**:55 - **375px** — mobile56 - **768px** — tablet57 - **1440px** — desktop583. Inspect each layout — alignment, spacing, hierarchy, responsiveness, broken elements, overflow, touch targets on mobile.594. If any viewport has issues, fix them and screenshot again.605. Repeat until **all three viewports** look correct. Desktop-only screenshots are not enough — mobile bugs slip through.616. Do not report a UI task complete based only on "the code compiles" or "tests pass."6263## 6. Supplementary docs — write freely, read only on demand64You may create extra documentation files in the project (e.g. `architecture.md`, `decisions.md`, `data-flow.md`, `api.md`) when content does not belong in `CLAUDE.md` (too long, too detailed, or outside the 150-200 line CLAUDE.md scope).6566**Rules:**67- Create these files only when there is real information worth capturing — not preemptively.68- Store them at project root or in a `docs/` folder.69- In `CLAUDE.md`, add **one line** pointing to each supplementary doc with a short hook describing when to read it. Example:70 - `- architecture.md — read when changing module boundaries or data flow`71 - `- decisions.md — read when revisiting a past tradeoff or choosing a similar one`72- Do **not** read these supplementary docs by default at session start. Only open them when the current task actually needs them — the CLAUDE.md hook line tells you when.73- This keeps context lean: CLAUDE.md is the always-loaded index; deep docs load on demand.7475## Red flags that mean STOP and re-read this skill76- "I'll just start and ask questions as I go" → No. Ask first.77- "This to-do is mostly done, I'll move on" → No. Finish and verify.78- "I'll do it myself, faster than spawning a subagent" → Reconsider; default to delegating.79- "I'll update CLAUDE.md later" → No. Update at the end of the change.80- "The code looks right, no need to screenshot" → No. Screenshot every UI change.