39 Essential Claude Code Tricks in Just 17 Minutes
Read full transcript 14 segments
-
Today, I'm going to go over 39 Claude code tricks that are going to work for you guys right now in four levels, from fixing your setup all the way to running a team of agents the way that Anthropic's own engineers actually do. Now, I've noticed that a lot of the advice out there is outdated, so hopefully at the end of this video, you guys are going to understand how to get more out of your Claude code setup. So let's not waste any time and just get straight into this one. A lot of setups are still running on advice that was written for older models and on thin data, so we're going to start there. And every one of these tricks is just going to take you a few minutes. So number one is to use auto mode. Instead of you clicking allow on every single command, a second model reviews each action, approves the safe stuff, and then blocks the risky stuff. And all you have to do is hit shift tab a few times to cycle through those modes or just choose auto mode. In Anthropic's own testing, auto mode blocked 89% of dangerous commands when people manually were only catching about 14%. Now, yes, that still lets about one in 10 dangerous commands through, but we'll close that gap in level three of this video. And if you notice that it keeps blocking normal stuff, then you can run slash auto mode setup so it learns what's normal for you. Now, number two is using effort, which is the actual control for how hard Claude thinks. So typically the advice here is to start on medium effort and then you can dial that up or down when you need to. Now, just to be honest with you guys, you hardly ever need to reach for high or extra effort unless you're doing something that takes a lot of creative work or a lot of brain power for, you know, massive code bases are a massive problem. But if you're writing emails, if you're organizing files, if you're creating documents and slides, you don't really need high effort unless maybe you're using like haiku. So save yourself the token, save yourself the money, save yourself the time, and just
-
try to match the task to the effort level. I've actually found that when I use too high of an effort level, it actually overthinks the task and then it creates a worse output and sometimes just burns through my usage a lot quicker. Now, number three is about context rot. A test in September stuffed 250,000 tokens of unrelated text into Opus 5 and it did about as well, but when those tokens were its own earlier attempts at the same problem, it solved about 15% fewer tasks. So the point I'm trying to make here is if you've corrected Claude twice in the same session and it's still wrong, then just go ahead and slash clear. Clear it out and start fresh. You can also use a slash rewind to just rewind instead of having Claude look through those mistakes again. But of course, what you want is make sure you're feeding those mistakes into update the skill and the instructions. You just don't want to leave those wrong paths sitting there in the context taking up space. Now number four is also kind of about context fraud. It's about your auto compact setting. So by default, Claude code will let a chat grow until about 967,000 tokens before it auto compacts. And by then, it's dragging on a ton of old attempts and context that gets recent with every message. So what I've done is I've set my auto compact threshold to 400k instead of the default 967k.
-
Especially when I'm running long goals and overnight sessions, having this auto compact be lower means that I'm not going to hit that context fraud territory as much. Now obviously there is some sort of tradeoff between more compactions and less compactions, but for me, I found that this is really really helpful. Number five is your list of don'ts. I write a ton of these because they're basically my failures that I've codified. But Anthropic does say the newest models treat never as an absolute and important in all caps makes Claude over apply it. So give each rule its own reason or say what to do instead like, you know, ask before deleting files instead of saying something like never delete files. But anything that can literally never happen belongs in the permission rather in the prompt. And we'll talk a little bit more about that in level three as well. But moving on to number six, we have a one line fix. A research paper in October gave Claude code and Codex 40 projects where the Claude .md said one thing and then the code said another. And Claude noticed the conflict in 79 out of 80 of those runs and it still followed the outdated file. So add this to your global Claude .md or your global agent .md. When the instructions and the existing code disagree, the code wins. With that line, they followed the code about 91% of the time. And what you wanted to do is not only follow the code, but you also wanted to escalate and let you know whenever there's a discrepancy. Now number seven helps find the rest of that stale stuff. So use slash doctor prompt audit and this will scan your Claude .md, your skills, and your agents for habits written for older models and it will tell you what to cut. Lance Martin from the Anthropic team ran it on his own eval and got better performance at a much lower cost. Number eight is keeping your Claude .md to what Claude can't You know, it reads your code itself, so
-
describing your folders and your stack is wasted space. My Claude.md is basically just routing rules, like, you know, where my business wiki lives or where my transcript wiki lives, where my brand assets are. I'm basically just telling it where things live and where to go whenever it needs to find stuff. Now, number nine is about giving Claude better data. And this one is coming from Clay, who's sponsoring this part of the video. Now, yes, you can have Claude go find leads with things like web search and other scrapers, and it will work, but it takes forever and the data is going to come back pretty thin. So Clay plugs right into Claude code, and Claude code can use it to check over 250 data providers one after another until it finds a match. So you can literally just ask Claude for, you know, every dental office in Austin, and then you can have it go enrich each of those leads and then find the actual decision maker with their work email. This is going to make finding clients way easier, and it works for finding people to hire as well. So if you guys want to check it out, the link is in the description. And number 10 is a default that you'll want to change. Claude code deletes your session history after 30 days by default. So if you want to change that default setting, then just go and change your cleanup period days to whatever you want it to be, and then you can keep those sessions longer or shorter. And then you can have Claude read the last month of your sessions and tell you what you have to keep re-explaining. And that's exactly how I found out that I told Claude seven separate times not to overwrite another chat's work. And then you can start to build skills and rules around the things that you keep repeating. Okay, so moving on to this next part. Once your setup is pretty clean, what you actually say to Claude makes the biggest difference, and these are the lines that I use the most.
-
So number 11 is to ask Claude code how Claude code works. Most of what I've learned about Claude code and how I taught myself Claude code was just from handing it the docs and having it explain them to me. So if anything in this video sounds useful but you don't completely understand it, just ask Claude to set it up for you. Number 12 is a line at the end of almost all my prompts, which is to ask me questions until you're 95% sure you understand. This helps Claude find the parts that you haven't figured out before anything gets built. And for bigger projects, I use a skill specifically for this called Grill Me that saves every single answer to a file, and it's also a free skill in my AOS starter kit. Now, number 13 is about having Claude make different plans, an original plan and then a plan from a different angle and then a plan from a different angle, and then you can ask which one has the best chance of working and why. And you can have these different plans take different perspectives, and this is actually how I built out my whole roast idea where I have a bunch of different business personas tackle my idea and help me make better decisions. If you guys want to check out that video, I'll link it right up here. Now, number 14 is just two words. Be ambitious. Claude tends to build the smartest thing that technically works. When I had it improve the same website 200 times, it never searched the web once because nobody told it to. So when you say something like build me the settings page or build me this, be ambitious, and you can actually spell out what fold looks like, like empty states, error states, and the save flow wired up. And this really isn't as much in my mind about the way you talk to Claude, it's more about how you decide what work you should delegate to Claude. You've even got completely average people that are having Grokbot do things like negotiate car prices or their, you know, energy bills, and it's actually working. So start trying to default more work over to AI and just be
-
sure to set a definition of what does good look like. All right, now number 15 is a sentence that Simon Willison spotted in Anthropic's prompting guide, which is you are the owner and long-term maintainer of this codebase, and its design is up to you. In Anthropic's own testing, this took Fable from merging duplicated code in under 10% of runs to about 75%. It also uses more tokens and makes changes that you didn't ask for, so leave it out for small fixes. But the whole point is have AI start to feel like it's taking ownership in things. Number 16 is for when Claude misses something that it definitely should not have. Just ask it, why were you unable to find that without me telling you where to look? And it'll basically walk back, retrace its steps, and tell you where it went wrong, and then you can just say, hey, cool, update your instructions so this doesn't happen again. And that's how you can keep building out routing rules and a routing map so that your Claude code becomes more efficient. And I specifically keep a section in my Claude MD called Applied Learning for exactly this, one short line per lesson, so a mistake only happens once and then it becomes a rule. Number 17 is making Claude do its own chores. When it hands you a list of steps like, hey, I need you to install this or go grab this or go do this, literally just say, no, [music] you go do it. I do this so often it sounds so silly, but a lot of times it'll be like, yeah, you're right. I don't know why I told you to do that because I can actually do that myself.
-
So just push back on it and see how far it can take you before you actually need to step in. Now number 18 is artifacts. Instead of copying what Claude made into a Google Doc or having an HTML that your team has to send back and forth with an iteration every time, just ask it to publish it as an artifact, which is a live page at a private link on Claude.ai. It can be a dashboard, a deck, a tracker, anything like that. It could even store data for you. And every update is going to automatically update that link so that your team can just click on it and everything is synced right there. This makes it so much easier for teams to collaborate on deliverables, share feedback, and just move faster. All right, we're moving on to part three now. So everything so far makes Claude better while you're watching it, but this level is what lets you stop watching and it works best when you treat Claude like your newest employee. So number 19 is just briefing it like your newest employee. Always make sure you're giving it your intent, tell it what good looks like, and show it examples including bad ones. If you want it to write like you, then give it your 10 best writing posts and the ones that also flopped. And then have it build a writing guide so that it can always sound like you when you need it to. Number 20 is making it prove its work. In my own experience, the first thing that AI hands you is maybe, you know, 60% or 70% of the way there, but then from there you have to keep checking and giving feedback and iterate until you get about 90 to 95%. So just ask yourself, how do you manually check the work and what is the standard that you hold yourself to? And then just tell Claude about that stuff and have it go check its own work and iterate until it gets to 90% of the way there and gives you that as a V1. Anything that you can do on a laptop or a computer, Claude can do. So if you need to look at something, it can do that. If you need to watch something, it can do that. If you need
-
to listen to something, it can do that. If you cross-check it, it can do that. Basically, don't let Claude hand you a V1, have it always hand you like a V10. All right, number 21 is giving it away to check what it can't read. So similarly to what I was just talking about, maybe it can't natively watch a video, but it can read a transcript and look at a grid of frames. Or you could also give it something like Gemini Vision in order to actually watch that. I add it pretty much every video now with AI and a huge part of that pipeline is having Claude watch it back, find anything that looks off, and then fix it for me. Number 22 is slash code review, which checks your changes with a fresh agent that never saw the conversation. For a completely different model, OpenAI has an official Codex plugin for Claude Code and then slash Codex review almost always finds something that the Claude models missed. Number 23 takes that review all the way to the pull request, and it's a new feature that just dropped called ship. So you can do slash ship, which Anthropic just launched in beta. When your change is done, you just type slash ship, and then Claude commits it, pushes it, opens the PR on GitHub, reviews it, keeps watching it, fixing failing checks, and answering review comments until everything's ready. The one thing that it won't automatically do until you've given it permission to start going a little bit more autonomous is merge. [music] Boris Cherny, who leads Claude Code, says that he uses this all day, every day. Number 24 is a review panel. Spin up sub agents as your ideal customer, a skeptic, a competitor, and someone who isn't your customer at all, because the last one catches what everyone in your bubble misses. And I talked about this a little bit earlier, but this is basically my version of this called the roast room. Number 25 is for anything that you might have just vibe coded a little bit too heavily. Instead of asking Claude if it's secure, make it try to break in. Have it launch three
-
sub agents logged in as user A, user B, and an admin, and then try things like reading user B's data as user A. Make it show proof of every hole, and then fix them all at once. Number 26 is a prompt with over a million views. Find all of the implicit state machines in my app, and then improve them for users, developers, and agents without breaking anything. A state machine is just every mode that your app can be in, like loading or halfway through checkout, and a lot of the bugs live in the ones that nobody really planned for or thought about the journey through. So this can help service a lot of issues with an app. Now number 27 closes that one in 10 gap from auto mode that we talked about earlier. This is a true story. We once had an agent email about 150,000 people a discount code that nobody actually told it to send. Because if an agent can touch something, you have to assume that it eventually will. The same way you wouldn't hand a new hire a credit card and say, hey, this is a real credit card, but just don't ever use it. You just wouldn't give them that credit card. So use deny rules in your settings or use scoped API keys that can draft an email but not send one or archive something instead of delete. Number 28 is about skills, because a skill is really just a prompt. Before you install a random one from the internet, have Claude read it, flag anything that looks like a hidden instruction or if it points to any other sort of URL, and then you you rebuild yourself a clean version of it. Your best skills are going to come from a real run anyways.
-
So do the task once, and when it works, say, hey, turn this into a skill. And number 29, once a quarter, I copy my whole setup somewhere safe, and I have Fable read the Cloud Code docs and everything in my folder and give me an audit, and then I have Codex do the same thing. The reason I do this is because the models are always changing and the harness is always changing. So once a quarter, just go through and do a sweep, make sure everything's synced, make sure everything is still necessary, and make sure that you're not wasting tokens and stuff bloating your context for no reason. All right, and now moving on to final level four. Once Cloud Code can prove its own work, you can run a lot more of it at once, and that's how Anthropic engineers are working now. So Lydia Hallie from the Cloud Code team said that they've essentially become managers for dozens of sessions, and Anthropic themselves went from about 2,500 code changes a day in May to more than 30,000 a day in September. So number 30 is one home folder for everything. Matt Pocock just put out a video calling it the Home Repo, and I've been basically running this exact same setup for a long time just as my AI operating system, my Herc 2 Repo. I've got my skills, my settings, my business wiki, and every project lives in folders under my iOS Repo so that I can just basically always have access to everything. So I've got one place to push to GitHub, and on my laptop I just say, hey, pull in the latest commit of Herc 2. The one exception, of course, is client data, which I would say gets its own separate project, especially if you want to keep things separate and keep things private. Number 31 is the prompt cache. Every message resends your whole chat, and the cache is what makes that cheap. Now on a subscription, it lasts about an hour, and after your next message, it has to reprocess and basically repay for everything. So for example, one of my long chats could cost
-
about $3.50 to rewrite cold at API prices versus just 8 cents if we kept that cache warm. [music] So what I would do is I would build a mod which leads into number 32, which is mods. These are basically plugins that change how Cloud Code itself looks and behaves, and you can ask Cloud to build it for you, and it can do basically anything. So I built Cache Keeper to keep my big chats warm, and it also tells me exactly how much it would cost if I rewrote as well as how much time is left on that cache. And I've got this mod as well as a few other ones that I've built like Collision Guard and my Goal Meter and my Free School Community, which will be linked down in the description. When a chat starts getting long and you want to either auto compact or clear, I use a skill called session handoff where Claude writes what's been done, what's decided, what's next, and then I start a fresh session with that as the first message. That new session then gets the conclusions without all the failed attempts and it knows exactly where to pick up and what decisions are still open. Now, real quick, you might be wondering, okay, so why would you do handoffs but also have auto compact lower? Well, that auto compact tip is more for when I'm running long goals that I'm not going to be managing and watching. But if I'm just sitting here driving every single prompt, that's when I use my session handoff. All right, number 34 is background sessions.
-
/background keeps the session working while your terminal freeze up and Claude agents can show everything that's running, what's blocked on you, or what's done, and you can see that all in one view. And then /fork branches the chat into its own copy of the code so two chats don't build over each other and then sessions can now message each other when one changes something another one depends on. And this is really helpful if you want to run a bunch of sessions but you don't want to see all of them up, it gets a little bit distracting. Now, number 35 is /goal. Set a finish line like all tests pass and the build is clean and Claude will actually keep working until that goal or that, you know, done condition has been met [music] and it will have a separate model checking after each turn. About one in five of the prompts that I use are /goals and I actually learned that from investigating my session logs. So I built a free mod called goal meter that shows me a progress [music] bar. Number 36 is chunking. Put the word ultra code in your prompt or ask for a workflow and Claude runs tens to hundreds of agents in the background. So for motion graphics on a 20-minute video, I will split it into 1-minute pieces and run 20 agents at once. Breaking stuff up like this can really speed things up as well as increase the quality. Number 37 is /advisor. You can run your everyday model for the actual work and then you can do /advisor fable and Claude checks in with fable at the key moments like, you know, before it's going to commit to a plan or when the same error keeps coming back and before it ever says it's done. So fable, the smartest model, is basically going to see the whole conversation so you get the best model's judgment without paying for it on every turn. Now, this is still a feature that's in experimental beta and it might consume more tokens. But number 38 flips that around and it's a prompt that I use with fable all the time, which is basically you are the manager of this
-
project. Don't build or code or research or execute anything. Your job is just to orchestrate. You plan, you spin up sub-agents, you drive a strategy, and you interpret what they bring back and help with verification. [music] That way each agent is getting their own job and these agents can be Sonnet or Opus, and then the main chat is going to stay very clean and that's Fable. That's your orchestrator. And this is actually helped me use Fable's intelligence, but not use much of my Fable limit at all. It's been really really awesome. And number 39 is taking that one step farther and now we have like an official version of this with the how the Claude Code team actually works. It's called Claude Code Projects and it is in beta on the Pro, Max, and Ultra plans still rolling out. And this is really cool because you talk to one main conversation and it splits the work into threads. And if you're in the Claude Code desktop app, you can literally see how the threads split open beneath it. So it really is the same thing as having the Fable orchestrator with a bunch of different Opus sub-agents, but now we get this really cool visualization to see how the threads can actually talk to each other. So if you guys have ever been like, wow, it's so hard for me to keep track of all my 20 sessions that I run, well maybe instead of running 20, you just run two or three and you just talk to those and then they're actually delegating work out to threads beneath them. So that's pretty much the whole climb. Fix your setup, talk to it better, manage it like an employee, and then scale it. But anyways guys, that is going to do it for this one. So if you enjoyed or you learned something new, then please give it a like. It helps me out a ton. And as always, I appreciate you guys making it to the end of the video and I'll see you on the next one.
-
Thanks everyone.
Summary
This video presents a comprehensive guide on optimizing your Claude Code setup through a series of practical configuration tricks, ranging from basic setup adjustments to advanced multi-agent workflows used by Anthropic engineers. Key subjects covered include enabling auto mode, managing effort levels, preventing context rot by adjusting auto-compaction thresholds, avoiding conflicting instructions in markdown files, and leveraging external data providers like Clay for efficient lead generation. The primary takeaway is that updating your configuration with modern best practices—such as lower compaction limits, explicit negative prompting, and specific routing rules—prevents overthinking, saves token costs, and significantly improves the overall performance and reliability of your AI coding workflows.