This is a collection of tips from across the internet on how to use Claude Code more effectively. Most of these are really simple tips but very effective.

1. Root CLAUDE.md file

Claude has some bad habits:

  • Makes assumptions on your behalf (especially when doing a long task)
  • Over-engineers
  • Alters things it was not asked to
  • Gets abstractions wrong (too much, not enough)
  • Automatically adds compatibility shims when none were needed.
  • Not completing all of what it was asked.

We can solve all of these by instructing Claude to not do these things.

Now we could add instructions to the CLAUDE.md file of every project BUT there is a better way. When CLAUDE starts up it will read the CLAUDE.md file of your project, and every parent folder up to the filesystem (or home directory) root. This means you can have different levels of specification, and write only once.

Here is a good base CLAUDE.md file which serves as a basis for all development: Andrej Karpathy Skills. Feel free to modify this as you see fit.

2. Use /clear

A Claude Code session builds up context over time. This context is paid for with tokens. If you are starting a new task and don't need the previous context, use /clear to clear it out and start again.

3. Use /compact

If you've finished a task and are about to begin working on a related task, then use /compact instead (with some instructions of what to focus on keeping). This will flush out the unimportant stuff and give you more context headroom for the next piece of work.

4. Naming sessions

When working with multiple agents at once, it is hard to remember which session is doing what. use /rename to give the session a name, so you know which is which. This is a good human cognition saving.

5. Use Caveman

Caveman is a 'skill' for cutting down on the verbosity of the model. This has two major benefits:

  1. Significantly less output tokens = cost savings.
  2. Less text to read = easier and faster for humans to read.

Caveman Skill

One downside I found with caveman is that it will use unicode characters in place of ASCII characters. For chat this is fine, but not so much in the code strings. No matter. Add a rule to your root CLAUDE.md file.

6. Automatic Code formatting

Add instructions on the tools to format code. At the end of every turn, instruct CLAUDE.md to auto-run the code formatter for your project. Now you have consistent style with no effort.

7. Use of Skills

Skills are nothing more than instructions on how to do a particular task. If there is a particular way you need something done, then write a skill for this.

The other way to do skills is to add a prompt to get Claude to draft its own skills based on work it has done recently.

NOTE: Don't over-do it with skills - too many skills can just turn into a mess. Be selective about what you convert to a skill.

8. Use Code in Skills

Code is deterministic. Generative AI is not. Where possible, add code files to your skill that Claude can run to perform the task. Not only do you get repeatable results, it is faster and costs less tokens.

9. Use @ to reference files

Don't make your agent search for files if you know where they are. reference with with the @ symbol. Most IDE's allow you to right-click, copy relative path. What's even better - add a hotkey for this.

I'll continue to add to this list over time. Happy coding.