โ Claude Hacks (10x Productivity)
Claude Code Tips & Tricks Nobody Tells You, 8 Principles to Build Faster & Smarter
Video 3 of 3 ยท 19:33
Chapters
- 00:00- Why most people use Claude Code wrong
- 02:40- Live Demo: Building a Full-Stack Website the right way
- 05:47- The 8 Claude Code Best Practices (Full Framework)
- 06:52- Tip 1 & 2: How to plan architecture & use Claude for real-time research
- 09:19- Tip 3: Break problems into logical, testable components
- 11:00- Tip 4: Always use a test-first mindset with Claude Code
- 13:25- Tip 5: Version control โ your safety net against hallucinations
- 15:05- Tips 6, 7 & 8: Sessions, context windows & staying in control
- 16:52- Full Best Practices Summary
- 17:41- What's Next
Transcript
Auto generated by YouTube. Click any timestamp to jump to that moment.
Show
Transcript
Auto generated by YouTube. Click any timestamp to jump to that moment.
- 0:02are doing well. This is Rajesh
- 0:03here. Today I'm going to cover
- 0:06principles of AI coding for product
- 0:09and I think we are at a very
- 0:11juncture right AI has evolved so
- 0:15that now there's lot of power in
- 0:17hands of product managers to build
- 0:20they want and we are at AI
- 0:22managers are at a very central
- 0:24because we have two very good
- 0:26right one skill is understanding
- 0:29requirements we understand the user
- 0:31thoroughly we understand
- 0:33market dynamics
- 0:34have been working on ways and means
- 0:37improve revenue for a company,
- 0:39engagement for a company. As a
- 0:42PM probably we go much much
- 0:44into improving performance
- 0:46and couple of important aspects
- 0:48users journey, right? We have been on
- 0:51of lot of different things and lot
- 0:53us have high level understanding of
- 0:55design, right? Okay. What is a
- 0:57level architecture? What does it
- 0:59to build a scalable analytics
- 1:01What does it take to build a
- 1:03uh website or gaming engine
- 1:06caters to millions of people right
- 1:08a lot of interesting ways and means
- 1:11which we have been driving the
- 1:13forward and often times we
- 1:16the space where probably there's no
- 1:19our backlog list is so long often I
- 1:22in a state when I was working with
- 1:23Walmart or zinga in the past we
- 1:26huge backlog right we have backlog
- 1:28100 plus items and my engineering
- 1:31barely scraps through 10 of them.
- 1:33cost of that to the company is huge.
- 1:36thanks to AI, the power is now in
- 1:39hands to s sort of launch something
- 1:40launch something in the market,
- 1:43to gather feedback very very fast
- 1:45see if you want to put additional
- 1:47strength to take it to a
- 1:49huge scale. Right? Having said
- 1:51you can also now debate that
- 1:53teams are more than capable to
- 1:56something huge. Right? As an
- 1:58I have been running CodePai as
- 2:01solo founder. Again, PM for almost 15
- 2:04now. Worked with companies like
- 2:06Flipkart and Walmart. Obviously,
- 2:09millions of DAUs and millions
- 2:11dollars in revenue. But last one year
- 2:13been pretty fascinating and I've
- 2:15pretty deep into AI, right? And
- 2:17used some of these AI coding tools
- 2:18cloud code or cursor or other tools
- 2:23sort of create an end toend website
- 2:25is codepi. And in codepi which
- 2:29I'm going to show you very
- 2:30we just cover high level aspects
- 2:32that you can understand what a
- 2:34manager can do with the right
- 2:37of tools and this and in this AI
- 2:39Right. Great. Let me go through
- 2:42AI website. When you log into Codep
- 2:44you got three types of websites you
- 2:47generate. A simple website is a
- 2:49prototype that you want to build
- 2:51that you want to create on the
- 2:52and showcase to your team.
- 2:54website is something that
- 2:56with a basic database. So you need
- 2:59provide your superbase access token
- 3:02you're working on a superbase
- 3:03right now. You may not even
- 3:05to enter the superbase token in the
- 3:07but effectively it creates a
- 3:09stack website. And last one is
- 3:11store which creates an end
- 3:12e-commerce store along with
- 3:14gateway integration with stripe.
- 3:17So this how it looks. I mean this
- 3:18to show you guys the art of what
- 3:20possible when AP really goes deeper
- 3:22executions and leverages right
- 3:24of AI coding tools and skills.
- 3:27I'll go I'll take you through as
- 3:29discussed earlier we have built
- 3:31of browse engines event-driven
- 3:33engines and even the
- 3:34campaign engines I think
- 3:36built in a span of 2 weeks single
- 3:38in two weeks and I was trying to
- 3:40a landing page for that using
- 3:42now let me see how that looks what
- 3:44did is I created a full stack website
- 3:47then I wrote a simple prompt I
- 3:49like the initial layout so I need
- 3:51made couple of modifications and then
- 3:53I landed in this particular page
- 3:55now when you see this page
- 3:58talks about hey this is my assembly
- 4:00where you can in fact go in it's
- 4:03a mini amplitude where you have an
- 4:05you can integrate with your main
- 4:06and all the events get captured
- 4:08later you can use them to target
- 4:10customers right I can request
- 4:12when I request access I can write
- 4:16name email id right and then timeline
- 4:20maybe I need to integrate this as
- 4:21and then I asked it to make the form
- 4:24bit dynamic have couple of addition
- 4:27elements based on what the
- 4:29needs. I need smart card targeting
- 4:33probably I was with mix panel before
- 4:36I have 100k
- 4:39per month. I'll do submit request
- 4:42now as you see when I submit the
- 4:45actually goes and sits in my
- 4:47account right so it's all full
- 4:50completely integrated and if I
- 4:52through the site you can see the
- 4:54you can see how to use
- 4:56SDK quick start guides again core
- 5:00API references what are the key
- 5:02cases that you want to run through
- 5:04what are the best practices use
- 5:06right welcome emails cart
- 5:08user activation and again
- 5:11entire website is created using
- 5:12PBI. Once I create the website, you
- 5:15do a oneclick deploy. You can attach
- 5:17custom domains. You can also view
- 5:20right? This is the browser
- 5:21SDK that runs on the site.
- 5:23someone goes and visits your
- 5:25we generate basic traffic metrics
- 5:28how many visitors, which pages did
- 5:30visit, how many audience came up,
- 5:32countries are they from, how many
- 5:34what is the bounce rate, what
- 5:35the duration. Again all this created
- 5:39one or two people within a span of
- 5:42to three weeks right beautiful isn't
- 5:45what AI can do in this modern world
- 5:47let's switch some gears let me go
- 5:50to the presentation and I will just
- 5:52you so I think we have talked
- 5:54about couple of what code does
- 5:57I have now captured is what does
- 6:00mean for you right I've been
- 6:02all this for you to sort of show
- 6:04the art of what is possible now what
- 6:06this mean to you. What this means
- 6:08with low teams, with low budgets, you
- 6:10build very high quality products in
- 6:12less time. One year back none of
- 6:14was possible. Now almost everything
- 6:17possible. But again, it's not so
- 6:18dory that you write a single
- 6:20and AI can create everything one
- 6:22You need to have some basics. You
- 6:24to have some good understanding.
- 6:26need to have a strong discipline in
- 6:28of how to work with AI. And that's
- 6:30I'm going to cover today. Right?
- 6:32going to cover what are the
- 6:34that I observed while doing AI
- 6:36while building codepai while
- 6:39couple of these peripheral
- 6:41that we talked about and how
- 6:43can benefit from my learnings over
- 6:46period of last one year. So I split
- 6:48into eight highle principles. Let's
- 6:50through each of them individually.
- 6:52are the foundations? How do I
- 6:53do this? Right. Um when I come
- 6:56an idea as product managers, we
- 6:58understand the user
- 6:59very thoroughly. We write a
- 7:02thorough PRD or a document so that
- 7:04understand what the users are trying
- 7:07convey and we also sort of when we
- 7:09the document we internal
- 7:10some of those workflows and
- 7:12and why we're doing what we're
- 7:14The next step given that all of
- 7:16are product managers you know how to
- 7:17PRDs is all about how do you now
- 7:20highle architecture right for
- 7:22you need some basic level of
- 7:23of how high level system
- 7:25what I typically do given I know
- 7:28basics of high level system designs
- 7:31go to GPD 502 thinking I upload my PRD
- 7:34terms of use cases what I want to do
- 7:36I ask it to create a high very high
- 7:38architecture in terms of different
- 7:41interactions how does it work
- 7:43high level view right high level
- 7:45design and I do this for two to
- 7:47days at a stitch I don't just
- 7:49a single prompt I wait for it to
- 7:51me something ad hoc and start
- 7:54immediately I wait I converse
- 7:56it quite a lot of things it doesn't
- 7:59in the first iteration so I have
- 8:01own questions I have my own doubts
- 8:03happens when we hit 1 million
- 8:05what happens when we hit 10
- 8:07events per second that's too
- 8:09but again just for the benefit of
- 8:11right what happens When an
- 8:14user turns up into a signed up
- 8:16how do we handle this scenario?
- 8:18scenario typical product manager,
- 8:21But you need to do that
- 8:22You need to do that
- 8:23so that your architecture
- 8:26is perfectly strong and sound. So
- 8:28thing that I do, I brainstorm
- 8:30a lot of thinking model. I prefer
- 8:33Thinking it depends upon you. Then
- 8:36do I do? My second step is AIS have
- 8:39have stale data. I obviously need
- 8:42data whenever I need an API
- 8:44So I tend to depend quite a
- 8:46on perplexity to get all the latest
- 8:48If I let's say want to
- 8:50with a anthropic API, an open
- 8:54API, right? Or some other API, I
- 8:56or recent API, I jump into
- 8:59to get all the recent
- 9:01or summarize the documents and
- 9:02now I have a highle plan, high
- 9:05architecture. Before even that I
- 9:08a high level PR I have a high level
- 9:10and I also have the latest
- 9:12on any of the external
- 9:14that my engine needs to
- 9:16right what next I break them into
- 9:20parts LLMs are super super
- 9:22but they have peanut sized
- 9:24right the brains are very small
- 9:26can't go beyond 200k context window
- 9:30claim they can go till 1 million
- 9:31the moment you go beyond 200k the
- 9:33quality deteriorates drastically
- 9:35how do you manage is this don't try
- 9:38build the entire system in a single
- 9:41It's not built for that. We're
- 9:43there yet. LLMs are not there yet.
- 9:45how what do you do? You break
- 9:48highle component into multiple
- 9:50and sub components. Typical
- 9:53typical product principles
- 9:55terms of problem solving right one
- 9:57solving. Now let's take an
- 9:59I'm building an analytics
- 10:00What does it mean for me? I need
- 10:02collect data from customer
- 10:03I need to then store the
- 10:06somewhere for different purposes.
- 10:08can be for logs just to replay just
- 10:12look at the past data and validate if
- 10:14work correctly or not. Another
- 10:17streaming the live events onto the
- 10:19website. Another for probably
- 10:22all these events and
- 10:24my campaigns. Another for
- 10:27analytics I want to roll up at an
- 10:28level, at a day level, at 7-day
- 10:31things like those right there. So
- 10:33are multiple use cases. So break
- 10:34into individual components. First
- 10:36probably is data collection,
- 10:38Only build that component, then
- 10:41the data storage component, then
- 10:43the analytics component, so on and
- 10:45forth, right? Break it into as many
- 10:48usable, feasible, testable
- 10:52as possible. And then you
- 10:54them one after the other and then
- 10:56connect and then you make a full
- 10:57Right? That is the third
- 10:59What is the fourth principle?
- 11:02are very good at goal-driven path
- 11:06Right? Now, what do I mean by
- 11:08If I say build me this analytics
- 11:10it'll definitely libert quite a
- 11:12It will take quite a lot of time.
- 11:15will take quite a lot of tokens. It's
- 11:17token efficient. Then what do you
- 11:19You probably go in with a test first
- 11:22right? You always already had
- 11:24use case document. You have your
- 11:26definition. You know which
- 11:28component you're working on.
- 11:30Now ask the LLM to create lot of
- 11:32cases based on what you want to
- 11:35Customer data acquisition or
- 11:38data capture. That's your
- 11:40statement, right? Write lot of
- 11:41cases, right? Test cases. One of the
- 11:44that I quickly want to show you
- 11:45how I do it, right? So this was the
- 11:48think I showed you analytics in terms
- 11:49how it captured in codebook AI or
- 11:51campaigns. There's an SDK
- 11:54we released recently onto the
- 11:55If you want you can subscribe
- 11:57you know you can start using. You
- 11:59have to drop in a mail and we'll
- 12:00you an API key. But again, so this
- 12:02an SDK that we have recently built.
- 12:05for this SDK when I was developing
- 12:07I needed to test it, right? I this
- 12:09a end to end mini amplitude kind of
- 12:12SDK which captures all the events and
- 12:14you can trigger campaigns based on
- 12:16Now what did I do? So this is a
- 12:17example of how I tested my SDK,
- 12:20I created this particular
- 12:22with lot of examples with lot
- 12:25examples. Right?
- 12:27you can see, I've got edge cases, I
- 12:30test cases, I got trackers, I got
- 12:34are lot of things that you know
- 12:36case that I created even before
- 12:39it. So ask LLM to create all
- 12:43test cases. Ask it to be
- 12:45at the same time don't ask
- 12:47to overgineer. Right? LLM LLM tends
- 12:50overengineer quite a lot. So you have
- 12:52be very very very about some of those
- 12:55you prompted prompted to say hey
- 12:58comprehensive test cases but
- 12:59overengineer at all. So the fourth
- 13:02is test first mindset okay so we
- 13:06brainstorming with thinking
- 13:07GBD 5.2 Two, research latest
- 13:10using complexity. Break
- 13:12into logical parts. As many
- 13:15components as possible, test
- 13:17mindset. Create all the test cases
- 13:19before you even start coding the
- 13:22SDK.
- 13:24now the fifth part, LLM tend to
- 13:26quite a lot, right? It it
- 13:29should not touch the code that I
- 13:31ask it to code, but it tends to do
- 13:33quite often, right? And there are
- 13:36approaches to stop it. One is you
- 13:38always tend to plan on cloud code.
- 13:41do shift. You do plan mode. You
- 13:43quite a lot during plan mode.
- 13:45look at the plan, read the plan,
- 13:46the plan. Once you're all good,
- 13:49do auto approve all the changes.
- 13:51Always do manual monitoring of
- 13:54Right? So it'll so when you
- 13:57that option, you can see what
- 13:59the changes it is making and
- 14:00dynamically. But even then there
- 14:02a lot of changes that are possible.
- 14:04are a lot of code messing that
- 14:06be possible. So what do you do for
- 14:08You get push, right? Git is a
- 14:12beautiful tool for you to
- 14:14It's free to use. Push into
- 14:17as much as possible so that you have
- 14:19many backups as possible. Again, just
- 14:22product managers, we advise to a
- 14:24of product managers to communicate
- 14:26a lot. Overcommunication is always
- 14:29Under commmunication is very very
- 14:30Similarly, try to push to get as
- 14:33as possible. Now, how do you do
- 14:34You can either ask cloud itself do
- 14:36or you can create a create a concept
- 14:40hooks right whenever it writes
- 14:43a code file you create a hook post
- 14:45usage do a good push right test it
- 14:48do a good push so there are a lot of
- 14:51in tools I'm not going to
- 14:52all those today that will become
- 14:54will make the conversation too long
- 14:57take away for you do get push quite
- 15:00so that your hard work is not
- 15:02and LM don't ruin your time. What
- 15:05the sixth point? Restart when stuck.
- 15:08happens quite often, right? Often
- 15:10get stuck in a huge context window
- 15:12pileup mess and it tends to shift you
- 15:15multiple different directions which
- 15:17never wanted to go. So what do you
- 15:19then? Simply restart. Restart always
- 15:22right? Laptop doesn't work,
- 15:24it. Code doesn't work, restart
- 15:26Right? But jokes apart, that
- 15:29quite a lot. 30% of the time, I
- 15:31to clear my conversation. and I
- 15:32to restart the session and it works
- 15:35well. The last two points are
- 15:37about how do you use the context
- 15:40more efficiently. I tend to
- 15:42lot of MD files. So whenever I
- 15:45any major decision within the
- 15:47I capture those in MD
- 15:50For large code bases like
- 15:52I think I have got roughly
- 15:5525 to 30 plus MD files with all
- 15:58decisions captured over there.
- 16:00whenever I start my clot again, the
- 16:03session need not read the entire
- 16:05which is way too exhaustive. It
- 16:08looks at this MD files and figures
- 16:10the critical decisions and moves on
- 16:12there. It's a very beautiful way of
- 16:14your overall context windows.
- 16:17again, don't let this mess up your
- 16:19Don't let this mess up your Git
- 16:23So always add a g ignore
- 16:25so that your github repository
- 16:28clean and precise.
- 16:31last point context is the king.
- 16:33try to dump too much information
- 16:35the context window and expect LLMs
- 16:38make magic. Llms only amplify the
- 16:41sets that you have. So you know
- 16:43you need to learn a lot. You need to
- 16:45on top of your game and use LLM for
- 16:48the required highquality context to
- 16:50it work beautifully well. make it
- 16:52for you and beautifully well right
- 16:55overall what does it mean for you
- 16:57are the key learning lessons you
- 16:59lot of time in brainstorming with
- 17:01models like GBD52
- 17:03perplexity as much as possible
- 17:05real-time information break a big
- 17:08into multiple small components
- 17:10on one component at a time test
- 17:13mindset create lot of test case
- 17:15so that your LLM has a goal to
- 17:17get pushed quite aggressively so
- 17:21you don't lose your hard work due
- 17:22LM calcinations. Restart when stuck,
- 17:25happens quite often, 20% of the
- 17:27Markdown files as much as possible
- 17:30manage your context window more
- 17:31and capture your important
- 17:33Context is the king. Don't
- 17:36garbage. Fill LLMs with only the
- 17:39that you need. Right? I
- 17:42that's all from my side. Again,
- 17:44one more. So based on all these
- 17:46at codepai we were able to
- 17:48four plus production grade
- 17:50including a full-fledged loable
- 17:53of a system analytics engine
- 17:55testing engine browser
- 17:57engine and quite a lot to come
- 17:59all this done with simple one
- 18:02founder with multiple with couple
- 18:04interns and for managing all this
- 18:07we have lot lot of MD files
- 18:09files so it's all fun if you
- 18:12this session I think I would
- 18:14encourage you to explore the
- 18:16starting in March first week.
- 18:19I'm still figuring out the cohort
- 18:21and details and further things
- 18:23those. But at a very high level,
- 18:25is this will be super super
- 18:27friendly. Any product manager,
- 18:29founder who wants to get onto this
- 18:31use AI to expedite their
- 18:33use AI to build something usable,
- 18:36production ready, this
- 18:38this cohort will be super
- 18:40for you. So we I'll be personally
- 18:42you to use claude code teach
- 18:46some of the design first principles
- 18:48terms of component making create a
- 18:50project you can pick your
- 18:52and I'll guide you in terms of
- 18:54to build what to build when you get
- 18:56you know how to unlock and all
- 18:57things and how to build guardrails
- 18:59AI coding right so that AI builds
- 19:02very very costefficient token
- 19:05system for you to create these
- 19:07right and also build guardrail
- 19:10that you don't expose your API keys
- 19:12security codes outside and you have
- 19:15of these patterns well baked in
- 19:17you hit the production. So, we're
- 19:19to teach all this. It's all going
- 19:20be about AI coding and it's all going
- 19:22be how you can leverage AI coding to
- 19:24your skills to the next level. Hope
- 19:25see you guys soon and if you have any
- 19:27drop a note to me on Rajes at
- 19:29redcodep codepub.a. Call it chase.
Want the next one in your inbox?
Join 1,000+ Product Managers getting one deep dive every Friday.