LongCut logo

How I use Claude Code (+ my best tips)

By Steve (Builder.io)

Summary

## Key takeaways - **Claude Code's Permission Bypass**: To avoid constant permission prompts, use 'Command C' followed by 'claude dangerously skip permissions and enter'. This is akin to Cursor's 'YOLO mode' and, despite the name, has proven safe in practice. [02:18] - **AI Code Review Outperforms Humans**: Claude's GitHub app integration offers automated PR reviews that can be more effective than human reviews, as AI models like Claude can focus on bugs and vulnerabilities rather than minor stylistic issues. [02:44] - **Optimizing AI Code Review Prompts**: Customize Claude's PR review by editing the 'claude code review.yaml' file to focus solely on bugs and security vulnerabilities, ignoring less critical issues for a more concise review. [03:11] - **Handling Large Files with Claude**: Claude Code excels at updating extremely large files (18,000+ lines) without issues, unlike other agents that struggle with patch resolution and often need to rewrite entire files. [05:00] - **Cost-Effective AI Coding with Claude**: Anthropic's direct integration of Claude Code with their models offers maximum value at a lower price compared to third-party solutions like Cursor, which have additional overhead and margins. [06:11] - **Queuing Prompts for Efficiency**: Claude Code allows queuing multiple prompts, enabling you to queue tasks and let the AI work through them sequentially without constant manual intervention, unlike Cursor which requires individual prompt submission. [07:44]

Topics Covered

  • Unlock Claude Code's full efficiency with power user tips.
  • AI finds more bugs than humans in code reviews.
  • Claude Code excels at large, complex codebases.
  • Anthropic's vertical integration creates a superior coding agent.
  • Tailor Claude Code with custom commands, hooks, and memory.

Full Transcript

I have now for the last several weeks

switched over from cursors agent to

claude code and I'm not looking back at

all. Here's how I use cloud code and my

best tips. First, I install the

extension which works with VS Code

cursor, and probably other forks like

Windsurf. It doesn't do a lot, but it

makes it really easy to launch Cloud

Code right in your IDE. I still use

Cursor by default because every once in

a while it's nice to use command K and

their tab completions, but the only time

I've touched the agent sidebar is when

Cloud was down. What the extension does

do is it makes it really easy to open

cloud code. I often have it in multiple

panes at a time. So I can run things in

parallel as long as they're working on

different parts of the codebase and

different files. And if I have a file

open, it'll automatically pull that into

the context. Now Claude uses a terminal

UI which I was very hesitant about at

first, but they actually do a really

good job with it. You can tag files

easily and choose what you want to

include. They have slash commands which

are awesome. Speaking of, I use the

model command a lot and usually work

with opus unless opus is having issues

which happens and then switch to sonnet.

A lot of people should probably just use

the defaults. It'll use opus until

you're at 50% of your usage limits and

then switch to sonnet which is more

costefficient. I found opus isn't slow

like 3.5 used to be compared to sonnet

at least not noticeably. And both models

are very good but opus is just a little

bit better. Other commands I use a lot I

use clear a lot in my opinion. every

time you're doing something new, clear.

You don't need all that chat history in

your tokens every time. And you don't

need Cloud always trying to compact it

either because compaction basically runs

another LLM call to output a bunch of

tokens, which takes time to summarize

the conversation history. Just clear

clear every time you're doing something

new. The up arrow key will go back to

past chats, including chats from prior

sessions. So if you close out of Claude

and open it again, for instance, another

day, you can still go back to prior

sessions. Speaking of opening Claude

one thing it does that's really annoying

is after you type a prompt, it'll start

working. Agents take a while. So, I'll

go about my business. I'll check Slack.

I'll check email. I might code something

manually. But then here's the problem. I

come back and I see it's asking me, can

I edit this file? It's really annoying.

Yes, you can edit files. It's the point

of being an agent. Like, edit the files.

And there's no way I found to globally

say just edit files. It's fine. And then

you'll go about your business and come

back and it's asking if it can run a

basic bash command. Can I run lint? Yes.

Oh my god. Yes. So, here's what I

actually do. Every time I open claude

code, I actually quickly hit command C

and then I run claude dangerously skip

permissions and enter. It's not

necessarily as dangerous as it sounds.

It's akin to what cursor used to call

yolo mode. And while it runs a minor

risk that a rogue agent could run a

command you didn't expect that's

destructive, I've never seen that happen

in my life. So, up to you if you want to

take the risk. I have for weeks and

weeks and I've never run into a problem

whatsoever. Now, speaking of slash

commands, Claude has a lot. One really

cool one is installing the GitHub app.

This makes it so when you submit a PR

Claude will automatically do a code

review. This is pretty awesome because

as you use more AI tools, your volume of

pull requests might increase. And I

found in certain cases the AI models are

better at finding bugs than humans

because they frankly put more effort

into it in some ways. While I've seen

humans are really common to nitpick at

oh, this could be named differently and

stuff like that, I've seen Claude

actually find real bugs that our humans

missed in a good chunk of cases. The

main tip I have for this is Claude will

add a claude code review.yaml. It'll

have a prompt in it already. Here's the

prompt I use. The original issue we

found with this tool is it was really

verbose. It would comment on all kinds

of like nuanced, unimportant things and

write a whole essay on every PR. What we

really care about most for the AI to

review is bugs and potential

vulnerabilities. So we tell it look for

bugs and security issues only report on

bugs and potential vulnerabilities and

be concise. The cool part is when you

run this command and edit that one line

you have a pretty awesome new addition

to your workflow. There's a lot of other

really cool stuff it can do like pull

comments from a get a pull request and

address them, review a pull request and

do things like set up your terminal

because out of the box shift enter will

not work for adding new lines. But we

can just hit enter and tell it to do it

for us. And there we go. Shift enter

adds new lines. Beautiful. Speaking of

quirks with using a terminal interface

with cloud code, you might be surprised

but you actually can drag files in.

Though in tools like cursor and probably

VS Code, it opens it in a new tab. If

you drag in and hold shift, it'll

actually pop it in and reference it like

you need. Now, one thing that doesn't

work is it doesn't paste images from

your clipboard. So, if I do the Mac

thing where I take a screenshot of this

and command V, nothing happens. A

special trick for this is control +v

actually will work there. It pasted the

image. That one took me a long time to

figure out. Another thing that took me

way too long to figure out because this

is not a normal UI interface is when

cloud is working. I always thought to

hit C to tell it to stop. That doesn't

do it. Hitting control C twice just exit

entirely. Oops. To actually stop Cloud

you need to escape. And if you want to

jump to any previous message, you can

hit escape twice and see a list of

previous messages and pop back to them.

There's a lot of invisible features like

this in Cloud Code. If you want to be

hardcore, Cloud also has a Vim mode, but

I'm not a Vim user, so I do not use it.

Now, let's talk a little bit more about

why Cloud Code is so good. In builder

we have one React component that is so

large, I can barely even scroll to the

bottom. It is 18,000 lines of code.

There's never been an AI agent that can

reliably update this file and tell Cloud

Code. When using Cursor, I have still

found a lot of little hiccups. It has

trouble resolving patches and has to

rewrite files often. It really struggles

to update extremely large files. Cloud

Code has no issue updating this file

like not even remotely. Cloud Code works

great with large code bases and complex

tasks. And I find it just getting stuck

incredibly rarely. I'm not even sure if

I've noticed that at all. Whereas with

cursor, I feel like I have to babysit it

more and when it gets stuck, stop it and

realize maybe this was just not a good

task to ask. Cloud is also exceptionally

good at navigating a large codebase

searching for patterns, understanding

relationships between different parts of

the code, components, shared state

stuff like that. It's honestly kind of

incredible. If you think about it

cursor built a product as a general

purpose agent intended to support a

variety of models. In order to do this

you have a whole additional team

involved. They trained custom models as

well and there's just more layers and

requirements and things going on here as

well as cursor doesn't build or control

the core models that do the core AI.

Compare that to anthropic. They

definitively make the best coding models

and so they make cloud code the best at

using the model. And when they hit

challenges with cloud code, they go and

make the model better. They only care

about supporting their model. They know

everything about how the model works

how it's trained, and how to use it in

depth. And they continue to train the

model to work well with what they need

for cloud code. It also means that

Anthropic can give you the most possible

value for the least possible price

because you only have to worry about

paying them. So they could compete on

giving you maximum access to models like

Opus without situations like cursor has

where cursor has to make money too. So

cursor needs to make a margin and

anthropic which fundamentally means you

need to pay some degree more with cursor

or they need to lose more money which

isn't sustainable. So, I commend the

Anthropic team for making such a good

tool with cloud code because they can

give you the maximum performance at the

lowest price directly from the experts

and make their models and products

better altogether. It's really smart and

it's where I am betting my time and

money right now today given the

incredible results I've been seeing.

Now, speaking of pricing, I pay for the

max mode. Now, if you're used to cloud

code previously being based on API

pricing, cloud code now supports the

standard pricing plans. Max mode, in my

opinion, is an absolute steal. If you

feel like a shockingly intelligent coder

working for you 247 is not worth $100 a

month, you need to look hard at what a

human costs per hour for engineering

regardless of where you look in the

world, and it's orders of magnitude more

than that. So, if you're having trouble

justifying it for yourself or from your

work, always remember the gains this has

given you compared to actual manual

human work. One other feature of Cloud

Code that I absolutely swear by is

queuing. So we could type a message say

add more comments. This is a thread

about adding comments to some code. And

often I think about oh the next thing I

want to do. What I used to do is create

a notepad and start drafting other

prompts that I want to do. And then when

I see one is done I'll go and paste the

next one and enter. That's what I did

with cursor which is really annoying

because again I'll usually go about my

day and answer Slack messages, answer

email, do something else and come back

and see the agents been idle for who

knows how long. Type the next prompt go

away. It was not very time efficient.

But now with Claude, you can just cue

more messages. So if I think of another

one, actually also add comments to the

main chunks of the JSX. I can cue them

and to the computed values. And what's

great is Cloud is really smart about

knowing when it should actually run

those things. If it needs feedback from

you, it's not going to automatically run

the cued messages. It's a pretty smart

system, but when it's wrapped up

something, it will start addressing them

when it makes sense. So you could queue

up a lot, go about your day, and in a

lot of cases just come back to a ton of

work done in a good and smart way. But

again, check it from time to time

because it might need your input. A

couple other cool power features you

could do with Claude is add custom hooks

and custom slash commands. And the

coolest part is you can have Claude

build those for you. In this case, I

asked for Claude to add a couple default

hooks, commands, and settings and

created a settings file that I can

easily edit. It added a Claude MD which

gives a bit of project overview and some

key commands that it should know about.

This prevents it from having to figure

that out each time and scan the codebase

for is there a build command or a lint

command. It always has awareness of

that. And it added some hooks for what

code should run before edits are

accepted, such as run prettier on a

specific file or after edits, like run a

type check on a specific file to make

sure that it only accepts good and

correct files. Another really cool one

you could do is add custom slash

commands. Like if I want to output a

test, I can describe my tests. To add

commands, just add acloud/comands

folder. add its name and then MD. You

just write these in natural language and

you can use this arguments string to

place an argument into the prompt and

the cloud will do exactly what you asked

just by typing slash and whatever it is.

You can even have subfolders and those

we can access like this like builder

colon plugin matches the builder folder

plugin.mmd and that's how we can create

a new builder plugin super easily.

Another cool one is we can use the pound

sign and add memory super fast like

always use mui components for new stuff

and then it'll automatically save that

to the most relevant file. Cloud.md

files can be hierarchical. So you can

have one project level and you can have

one in nested directories. It'll look at

them all and prioritize the most

specific the most nested when relevant.

You could also save this to global user

memory preferences you want to apply

everywhere or local project memory

that's memory specific to you and gets

get ignored. add it to any of these

files and then it'll write it for you.

Now, the main problem I sometimes feel

and I see people point out the most is

sometimes you really just want a normal

UI. It is kind of annoying that typing

out long responses have these weird

escape keys. I can't just click on what

I want to edit and highlight and edit.

It's still very clear you're working

with a terminal and that comes with some

inherent limitations. For those times

where you want a UI or you prefer UI

interface, but you still want the

mechanics of cloud code, one trick is to

use the builder.io VS Code cursor

windsurf extension. At any point you can

just launch into a visual UI from your

IDE sidebar. What you get is a much more

visual interface with a typical chat

dynamics that you're used to and a live

preview. And under the hood, we built

the system to match almost exactly how

cloud code works. This tool uses

effectively the same agent and approach

as cloud code down to the tiniest

details. We reverse engineered it as

closely as humanly possible. And then

you can preview your changes quickly.

Like I actually just moved items from

here to right here. Perfect. And what's

kind of cool is at any time we can

switch to design mode and we get a Figma

style interface where we can change up

any of the styling we want and edit it

just like a design tool. It's kind of a

cool way to bridge the worlds of visual

editing and code and get a bit of the

best of them both at the same time. We

can explore different UI patterns

quickly and make precision edits and

then just apply our changes to the code.

You can do all this stuff from a browser

interface, too, which can be really cool

for letting people on your team create

prototypes right with your design

systems and applications. And then when

you're happy with your changes and

you're ready, you can just fire off a

pull request. Here's our PR with a title

and description. We can look what files

changed. Looks like it's using our

design system correctly as hoped. And I

can leave a comment anywhere and say

"Hey, build a bot. Move this to be in

its own component in a new file." In

this world now, we're effectively just

communicating with Claude code, but

through the PR directly. The agent will

then reply and push up commits

addressing the feedback. And here we go.

The builder bot address the feedback and

describe the changes. Now, it looks like

we have our customers table in its own

file. And we are using it as expected in

the original, we can merge away. So

whether you want to use cloud code in a

visual way or in a terminal, I hope

these tips were useful for you to be

able to build awesome stuff like never

before. Check out my full list of tips

over on the builder.io blog. If you want

to try the visual interface for cloud

code, go to fusion.builder.io

Loading...

Loading video analysis...