Best tips and tricks
These are the habits worth turning into team defaults. A tip that one engineer uses saves minutes. The same tip in a repo template saves hours across the org.
Prompting → Prompting Guidelines
| Habit | Why it scales |
|---|---|
| "Follow patterns in src/services/" | Agents reuse your architecture instead of inventing one |
| State constraints ("no new deps") | Constraints are cheaper than review comments |
| Turn good prompts into shared skills | One engineer's discovery becomes everyone's default |
Workflow → Generative Coding Workflow, Subagents
| Habit | Impact |
|---|---|
One Claude worktree per feature (claude -w <feature>) | Parallel agents without branch collisions |
Research, then /clear, then implement | Fresh context produces better code |
| Subagents for searching | Main context stays on the decision at hand |
| Size parallelism to review capacity | Output that nobody reviews is not progress |
Cost → Token Optimization
| Technique | Effect |
|---|---|
| Prompt caching on stable prefixes | Cached reads cost about a tenth of normal input |
| Right model and effort per task | Cheap models for mechanical work, strong ones for judgment |
| Curate skills and MCP servers | Every listed tool costs context in every session |
Quality gates → Security, Code Review
| Gate | Enforced by |
|---|---|
| Lint, types, tests | Hooks locally, CI on every PR |
| Security review | /security-review plus Semgrep and secret scanning in CI |
| Second opinion | A fresh agent session reviews the diff |
| Human approval | Domain owner via CODEOWNERS |
Mistakes that compound
| Mistake | Fix |
|---|---|
| Shipping unreviewed AI code | Diff review before commit, owner review before merge |
| Rules only in people's heads | Write them into CLAUDE.md, lint rules, or hooks |
| Context bloat | /clear between tasks. Durable context goes in files |
| Premature optimization | Ask "is this needed for launch?" and park the rest |
| Mandating unmeasured tricks | Pilot on one team, compare, then roll out |