DEVSAIO

Claude Code workflow tips that save time and tokens

Practical habits for using Claude Code on real projects: CLAUDE.md, small tasks, the right model, and reviewing diffs.

DEVSAIO team · 2 min read
Share on X

Claude Code is powerful, but how you use it changes both the quality of the results and the bill. These habits come from using it on real projects.

1. Write a CLAUDE.md

Put a CLAUDE.md file in your repo root with the things you'd tell a new teammate: how to run tests, code style, folders to avoid, and commands that are safe to run. Claude Code reads it automatically, which saves it from exploring (and spending tokens) to find out.

markdown
# Project notes
- Run tests with `npm test`. Lint with `npm run lint`.
- Never edit files in /vendor.
- Use TypeScript strict mode; no `any`.

2. Ask for small, specific tasks

“Add input validation to POST /signup and a test for empty email” works better than “improve the backend”. Smaller tasks mean less context, fewer wrong turns and smaller diffs to review.

3. Plan first for big changes

For anything touching several files, ask for a plan before code: “Plan how you'd add pagination to the orders API. Don't change files yet.” Fix the plan, then let it implement.

4. Pick the model for the job

TaskGood choice
Quick edits, renames, small fixesclaude-haiku-4-5
Everyday features and debuggingclaude-sonnet-4-6
Hard architecture or tricky bugsclaude-opus-4-7

You can set these with ANTHROPIC_MODEL and the default model variables (see the setup guide).

5. Clear context between tasks

Every turn resends the conversation so far. When you move to an unrelated task, /clear gives you a fresh, cheaper session.

6. Review every diff

Treat the output like a pull request from a fast junior developer: read it, run the tests, and ask for changes. Commit often so you can roll back easily.

7. Watch your usage

Check Usage Logs after a long session to see what it cost. If a single session is unexpectedly expensive, it usually means a huge file or log was read into context.

Try it with one API key

Claude, GPT, Gemini, DeepSeek, image and video models through one OpenAI- and Anthropic-compatible endpoint. Prepaid, pay only for what you use.

Keep reading