Skip to content
Guides··10 min

15 Claude Code tips that experienced developers actually use

After building real products with Claude Code, these are the patterns and habits that separate fast, confident usage from frustrating trial-and-error.

15 Claude Code tips that experienced developers actually use
These aren't the tips in the official docs. These are the ones you figure out after shipping a few real projects with Claude Code — the habits that make sessions feel smooth instead of frustrating. 1. Start every task with a plan request ----------------------------------------- Instead of: > add authentication to my app Do: > I want to add GitHub OAuth via Supabase. Before writing any code, explain your plan: which files you'll create, which you'll modify, and any assumptions you're making about the existing setup. You'll catch wrong assumptions before they become wrong code. This one habit saves more time than any tool tip. 2. Use /clear aggressively between tasks ------------------------------------------ Context in Claude Code degrades as sessions get long. When you finish one task and start another unrelated one, run /clear first. The agent will re-read your current file state fresh and give better results than if it's still holding context from an hour ago. Exception: don't clear if the new task depends on what you just did — multi-step tasks benefit from shared context. 3. Paste error messages verbatim, never describe them ------------------------------------------------------ Wrong: > there's a type error somewhere in my auth code Right: > Type 'string | undefined' is not assignable to type 'string'. at lib/supabase/server.ts:24:18 Paste the full error with the file and line number. Claude Code reads your files — it will go directly to that line and fix it, often getting it right on the first attempt. 4. Ask for tests before the implementation ------------------------------------------- > before implementing the sortByDate function, write the unit tests for it. I'll review them, then you write the implementation. This forces clarity about what the code should do before any code is written. It's also how you catch specification ambiguity — if Claude Code's tests don't match your mental model, your spec was unclear. 5. Use "only change X, don't touch Y" --------------------------------------- Claude Code sometimes helpfully refactors things you didn't ask it to refactor. Prevent this: > fix the race condition in the fetchUser function. only change that function. do not touch the auth middleware or the session handling. Scope constraints are essential on large, interconnected codebases. 6. Read the CLAUDE.md file pattern ------------------------------------ Create a CLAUDE.md file in your project root with always-on instructions: # Project context This is a Next.js 14 App Router project using Supabase for auth and data. Always use Server Components where possible. Never use any in TypeScript — use unknown or specific types. Run npm run typecheck after making TypeScript changes. Commit message format: feat(scope): description Claude Code reads this automatically on every session start. You write it once, it applies forever. This is essentially a lightweight, project-specific skill. 7. "What would break if..." questions --------------------------------------- > what would break if I changed the User type to make email optional? > what would break if I moved the auth middleware from the root to the app/ directory? These are faster and safer than just making the change and finding out. The agent traces dependencies across your entire codebase. 8. Commit after every successful change ----------------------------------------- Claude Code doesn't make commits automatically. Build the habit of committing after every successful agent-produced change: > the auth flow is working. commit it with a conventional commit message. Clean commit history means clean git bisect when something breaks. And something will break. 9. Use --dangerously-skip-permissions only locally --------------------------------------------------- Claude Code will ask for permission before running terminal commands (npm install, running tests, etc.). In a local dev session you trust, you can run: claude --dangerously-skip-permissions Never do this on a server, in CI, or anywhere the agent could have unintended effects. Locally, it makes the workflow much faster. 10. Multi-file tasks need explicit file lists ---------------------------------------------- > refactor the user authentication to use a token-based approach instead of sessions. the relevant files are: lib/auth.ts, middleware.ts, app/api/auth/[...]/route.ts, and components/auth-provider.tsx. start with lib/auth.ts. Telling the agent exactly which files are relevant prevents it from guessing and potentially modifying the wrong ones. 11. Use structured output for code review ------------------------------------------- > review the following function for: 1) correctness (does it do what the comment says?), 2) performance (any obvious O(n²) issues?), 3) error handling (unhandled edge cases?). format your review as a numbered list under each category. Structured review requests get structured, actionable answers. 12. Ask it to explain code you wrote -------------------------------------- This sounds obvious but is underused. If you wrote something complex six months ago: > explain what the middleware chain in middleware.ts is doing, step by step. assume I've forgotten the context. Claude Code reads the file and gives you a prose explanation. Faster than re-reading your own comments, especially when the code is dense. 13. The "rubber duck" pattern ------------------------------- When you're debugging and stuck: > I'm trying to understand why this function returns undefined when the user is authenticated but the session is valid. here's what I know: [paste what you've already tried]. what are the likely causes I haven't checked? The act of explaining the problem structured clearly, combined with the agent's cross-file knowledge, often surfaces the answer immediately. 14. Skills are reusable context — install them once ---------------------------------------------------- For any tech stack you use regularly, find the matching skill on ClaudeSkill and install it: claude skills add react-hooks-toolkit claude skills add typescript-strict-coder claude skills add nodejs-express-api These give Claude Code expert knowledge of your exact stack before you type a single instruction. The difference is noticeable — answers are more specific, code follows your patterns, you correct it less. 15. Build your own project skill --------------------------------- After a few months on a project, you know its patterns better than any generic skill. Write a SKILL.md for your project: name: my-startup-app description: > A Next.js 14 / Supabase SaaS app. App Router, TypeScript strict, shadcn/ui components, Stripe for billing, Resend for email. rules: - Always use Server Components unless interactivity is required - Use Zod for all form validation and API input parsing - Payment flows must go through /api/stripe — never client-side - Run npm run typecheck before considering a TS task done Install it at the start of every session. Your codebase-specific skill outperforms any generic one.