Mastering Claude Code: Some Tips and Tricks after 3 Months of Use

Correspondence from the Code with Claude Conference on Claude Code-ing responsibly!

A shot of the conference A funny slide deck from a Code with Claude presentation

After attending Code with Claude in person in May, I’ve spent most of my free coding time using Claude Code. In fact, this very website was first coded in Cursor, and now entirely in Claude Code!

Here are some tips I really enjoyed while using it, and also some things that I didn’t find obvious in the docs too.

I loved using Claude Code so much, I actually cancelled my Cursor subscription! And now, Claude Code is included in the Claude Pro plan, so if you’re already convinced or curious, you should try it!

Now, onto the good stuff!

Tip 1. Use claude -p for quick questions

Sometimes you just need to ask Claude a question. Or, you need to quickly get a response. Using Claude -p is a great way to do so without activating and deactivating the terminal:

claude -p "What does it mean to embed a vector?"

And yeah, the “p” stands for prompt! The cool part about this is that you can pipe the response out as well. So suppose you generate some sample data, you could totally do the following:

claude -p "Generate restaurant review data. Must be username, review, and stars 1-5" --output-format json > reviews.json 

Which could be handy for local testing!

Tip 2. Use Claude Code INSIDE VS Code!

You can instantiate a Claude Code instance inside Visual Studio Code, and it vastly improves the experience. In this mode, Claude Code will also pop up diffs of key files as well, which makes it way easier to use. And, you can open files and refer to them in context. However, you still don’t have autocomplete, which is the one feature I really miss.

I go back and forth on this. Not having autocomplete actually forces me to write code when I need to, and let agents focus on the architecture or overall design, something I’m not so great at. It’s almost a bit better than having autocompletion/autocoding everywhere, but I’m still feeling it out.

Tip 3. Use @ to engineer context for your requests with files in your workspace

You might be coming from other assistive coding tools like Cursor or Github Copilot, and might be a little confused by the terminal-only interface. While you lose autocomplete, you still have the ability to reference files and paths, which are key for properly constructing the context for your Claude code instance. However if you don’t do this, Claude will still attempt to search or look for the files you are interested in.

Take a look at @folder_name/file_name and write some tests

Tip 4. Ask Claude to Plan with you first, before Coding

This was a huge workflow unlock for me, and a tip I learned at the Code with Claude conference. Before planning a new feature, branch, or app, write a very long DEVELOPMENT_PLAN.md style file.

Write whatever you need, be as specific as possible, provide examples, etc. You don’t need to be super careful here as Claude can always search itself later. Heck, even ask Claude to help you write it and approve! Doing this plan will greatly help ground the tool calls and generations Claude will make, and keep itself on track.

Tip 5. Vibe responsibly and write with tests in mind

I get it. Vibe coding is really fun and makes you feel like you are developing at the speed of light. The thing is, we gotta talk about how out of hand it can get, especially with huge code bases and languages you aren’t familiar with.

Another tip I learned from Code with Claude is to approach vibe coding much like one could create anything without being an expert: create a set of satisfying requirements and tests that ensure the output you need is correct, without needing to look under the hood.

While you code, make sure to make Claude write tests (or better yet, write them yourself!) and run tests in between making new files. And of course, version your code to avoid catastrophic mistakes!

Tip 6. Use .md files to plan, and persist information across runs

Even though Claude Code is almighty, you will eventually run out of context window.

BTW when you do, use claude —continue to start with the most recent conversation, or claude —resume to find a previous conversation to resume from.

When working within Claude Code for a while, you might wanna take a break and document current changes as well as new things you wanna make next, without necessarily committing everything or something. Or, you’ll run out of context and run into an auto-compaction. For these cases, it’s really important to maintain key information in persisted .md files, and to refer to them when you need to. This is really key when you accidentally resume the wrong conversation, or just need to start from scratch (usually when hallucinations start to tick up)

Tip 7. Enable Web Search for Claude by doing the following:

This is a trick I learned from Deedy Das’s post on Linkedin. You can enable Claude’s WebSearch and WebFetch tools to find and get up-to-date content. Useful for when you are referencing things on the internet or need to use a new package. Approve them by using the /allowed-tools command, located here: Claude Code settings.

Then, if you want to search the web, just tell Claude to do so!

Tip 8. Do worktrees if you truly unhinged

This is a truly wild buried tip in the Claude Code docs, and also one Anthropic talked about at the conference.

You can have multiple Claude Code instances running on branched copies of your repository, called worktrees. This allows you to add new features at the same time, at blistering speeds, only limited by our tiny human brain attention spans and Anthropic rate limits. Sounds pretty awesome right? And it’s super simple to do, based on their docs located here.

However, there’s a big problem. Things can get out of hand and unsynced really, really quickly. This is basically the key problem identified by new articles from Anthropic and Cognition on maintaining state across agents working on the same repo. I wouldn’t recommend this unless you have rigorous testing implemented, and are willing to context switch (ha!) repeatedly to approve changes.

Go try you some Claude Code!

Go forth and do cool stuff with Claude Code, and shoot me a line if you build anything cool after reading this!

Enjoy, and vibe code responsibly!