Claude Code for Product Designers
Lesson 9 of 49, 0 of 49 lessons completed
Sign in
Watch on YouTubePlay

Plays from YouTube. Google's privacy policy (opens in a new tab) applies.

Up next

1.5 A walk through the files

Next lesson in 8 s

1.4 Plan the first build

Adam switches Claude to Plan mode and has it explore his Figma file and ask design questions, which he answers as a product owner. Claude then builds a first version close to the design with subagents, while Adam explains the context window and why subagents keep it fresh.

What you'll learn

  1. Copy the right Figma link: nothing selected, on the right page.
  2. Pick model and effort for the job: a strong model and high effort for the first build; medium is a decent default.
  3. Plan mode: Claude researches and plans before changing anything; Adam starts most sessions this way.
  4. Answer Claude's questions as a product owner and split the work into phases.
  5. Read what you can of the plan, then "Accept and use auto mode".
  6. The context window (1M tokens), context rot (from about 500k) and the context panel.
  7. MCPs and plugins take context in every session, so keep only the ones you use.
  8. Subagents take parts of the work so the main "orchestrator" stays fresh; you can steer which model they use.

Chapters

  1. 00:00Copy the right Figma link
  2. 01:20Model, Plan mode and effort
  3. 02:49Writing the planning prompt
  4. 06:58Exploring Figma and answering questions
  5. 15:05Reviewing and accepting the plan
  6. 17:21The build, context and subagents
  7. 23:33First version in the browser
  1. 00:00Okay, now, with Figma MCP and Figma skills ready to be used in our Claude desktop application and with Node.js and developer tools installed on our Mac, we are finally
  2. 00:11ready to take our Figma design, paste the link in Claude to plan and carry out the implementation.
  3. 00:18So first, I'm going to make sure I copy the link properly.
  4. 00:22I just need to make sure that there is nothing in my selection and that I'm on the right page in my Figma design file in case your has a
  5. 00:30couple of pages. This is because a thing that some designers still miss is that when you copy a link to your Figma file, what you have selected is carried
  6. 00:39out in this link and we just don't want Claude spending time figuring out where it should navigate.
  7. 00:45So just to make it a little bit easier, just make sure there is nothing in your selection.
  8. 00:49You can actually go over here and copy a link just like that.
  9. 00:54And then I'm going to go into the my Claude desktop application.
  10. 00:58Make sure you are in the right folder first.
  11. 01:01So you can, for example, get over here.
  12. 01:03I'm going to use my Tonik Parking Course folder, which is empty.
  13. 01:07I can actually double check by going into this file picker over here, making sure there is absolutely nothing in this file, in this folder.
  14. 01:16And then let's see.
  15. 01:18I 'm going to, first of all, change the model.
  16. 01:21So previously we used Sonnet for that quick Figma test, but this is going to be a pretty heavy task carrying out an implementation from scratch with an empty folder.
  17. 01:32I could consider using Fable, Claude's current most capable model, but this is going to burn through a lot of tokens.
  18. 01:40So for now, I'm going to try out with Opus 5.5.
  19. 01:45And then I'm also going to switch the mode this time to plan.
  20. 01:50Now plan is this special kind of mode in which Claude is not really able to do anything, write or edit any files.
  21. 01:58It is actually forced to take back, uh, do a little bit of a research, um, gather all of the resources it has at its disposal to create with a
  22. 02:08decent implementation plan. And it yields much better result.
  23. 02:13In fact, my personal rule of thumb is that whenever I open up a new session in Claude, most of the time I end up starting with a plan mode.
  24. 02:23Um, okay. So with the plan mode and Opus selected, I can actually, just because this is that first implementation, I'm going to increase the effort level here to high.
  25. 02:34Although I can say that medium has turned out to be a pretty decent default choice at least with my, uh, with my use cases.
  26. 02:44But again, this is that first important implementation.
  27. 02:47I need to make sure that my setup is right.
  28. 02:51I'm going to, I'm going to paste the link over here, and I'm going to say, uh, hello, Claude.
  29. 02:57Claude, this is a brand new empty folder, and I would like you to help me out, uh, implementing my, uh, Figma design into a working Next.js application.
  30. 03:10Now, please do, um, explore my Figma file, uh, see what views we have, see what components we have, uh, what kind of variables and styles are set up and
  31. 03:23plan the implementation thoroughly.
  32. 03:26Please ask me questions as we go, uh, about design decisions, and, um, consider using sub-agents and in for breaking the implementation down into multiple phases.
  33. 03:42Okay. So a couple of things, uh, worth pointing out.
  34. 03:47Um, although at the time of recording I am pretty sure that Claude, by looking at my application, would probably recommend using the Next.js application, implementing using Next.js, just to
  35. 04:01be extra careful and just to make sure we are going to be looking at the same thing, it's a good idea to uh include next js in this.
  36. 04:10Um I'm going to uh you know make sure that Claude understands that it is my intention for it to take a walk through my Figma file and look into
  37. 04:21what kind of UI components we have just to make sure that you know it can include it in the final implementation plan.
  38. 04:28I want to make it um extra aware of the fact that I have variables and styles set up and I do expect for those to be mhm to be
  39. 04:39carried out uh fairly truth like faithfully in the implementation and I'm just you know uh emphasizing the fact that I'm looking for Claude to come up with a plan
  40. 04:51first. And then finally um suggesting that it should ask me design questions, although that is something that you can assume is going to be happening with most of your
  41. 05:02plan mode usages, which is a great thing because um you know I'm still being surprised by the kind of questions Claude can oftentimes um present me with and how
  42. 05:13it makes me consider um use cases or uh flows that I didn't really consider before.
  43. 05:20And then I'm going to recommend that Claude uses sub agents and break down the implementation into phases.
  44. 05:28Now what do I mean by sub agents?
  45. 05:30We are going to see it all in action very shortly, but for now um the only thing we need to know is that as we talk to Claude code,
  46. 05:40it has the power to spawn new sub agents to carry out like smaller pieces of task.
  47. 05:47This is important because as we begin a new conversation or a new session with Claude, its context window is limited to currently 1 million of tokens and we want
  48. 05:59to make sure that this context window is as as as possible because the moment we reach about half a million tokens threshold, we can start observing what's called context
  49. 06:14rot. And this is that thing in which Claude starts hallucinating or making mistakes or just, you know, feeling tired.
  50. 06:21So, uh, and because we don't want this orchestrator agent, uh, to, you know, get tired too quickly, we're actually suggesting for it to offload, uh, the work to sub
  51. 06:33agents and for this particular agent to just focus on, you know, the orchestration part.
  52. 06:39Uh, okay. And with this kind of a prompt, I'm just going to hit enter.
  53. 06:45Um, and by the way, this is something you can like the prompt is something you will be able to copy and paste into your Claude if you want, uh,
  54. 06:53whenever wherever you are watching this video right now.
  55. 06:56And, uh, okay, let's see what's going to be happening.
  56. 06:59Because we are in the plan mode, this is not the auto mode.
  57. 07:01Let you let me remind you, Claude is going to need our approval, our permission to, uh, use things such as plugins.
  58. 07:09So I'm going to allow it to, uh, use the Figma plugin, to use the Figma MCP, to inspect our, um, to inspect our Figma file.
  59. 07:19And, um, as it's, um, as it's getting screenshots, uh, of the things uh, it implements, we can actually open this up to see what kind of things Claude is
  60. 07:29currently looking at. Uh, this is pretty neat.
  61. 07:32Um, and we can see it's getting uh, definitions of variables, which is great.
  62. 07:40As we've already, uh, seen in uh, one of the previous videos, we do have quite an elaborate uh, variables set up in this Figma file.
  63. 07:49Um, and then it's going to pool the exact typography spacing and component details, which is great, exactly what we want it.
  64. 07:59Um, okay, let's give it a few seconds, uh, and let's see how it's how it's going to perform here.
  65. 08:07Okay, uh, Claude has done the initial exploration and it came back with a couple of questions.
  66. 08:13And the first one is spot on.
  67. 08:15So Claude is essentially asking us how serious this is.
  68. 08:19And because we are building more of a proof of concept at this stage, [snorts] uh, I don't really want Claude to be setting up any real databases right now.
  69. 08:29I very much want the data to be local so that it is fast and easy for us to iterate on this.
  70. 08:36So I'm going to follow its recommended question or recommended answer here, um, and we are going to use some sample data first.
  71. 08:43Let's see what the next question is.
  72. 08:46Now Claude is noticing we don't have any authentication here.
  73. 08:49There is no sign in design screen in the design.
  74. 08:52Um, how should the application know which bookings are mine for the my bookings views?
  75. 08:58And again, because we are building more of a proof of concept at this stage, it's perfectly fine to be for us to be faking some of the things and
  76. 09:07for this application or this initial version to just remember our names.
  77. 09:12So I'm again just going to follow with the recommended answer here.
  78. 09:16Uh, let's see. The book space my bookings switch only appears on the my booking screens.
  79. 09:22And on the book space screen, the name spot says select a date.
  80. 09:27How should someone get from a booking to their bookings?
  81. 09:31That's a little bit convoluted.
  82. 09:32So let me make it a little bit easier by going back to Figma.
  83. 09:36So what Claude has noticed is that this initial parking view screen over here, it only has one option, uh, and it's more of a label.
  84. 09:45It just says select a date versus if I go over here to this booking view, which is a view that allows me to, um, oh, sorry, which is a
  85. 09:55view that allows me to see all of the bookings that I have made on my account in one place.
  86. 10:03Um, we this acts more as a, you know, tab switcher.
  87. 10:07And I'm really glad that Claude has surfaced this question because I would like to break this first initial implementation into two phases.
  88. 10:17And just to make sure we iron out the details, I'm going to ask Claude to disregard the booking view and omit it for the purpose of that first try.
  89. 10:30So I don't really see I don't really see this answer in any of the in any of the options, so I'm just going to type it manually.
  90. 10:40For the first pass, let's focus just on the and let me be precise.
  91. 10:46What's the name? On the parking view.
  92. 10:52On the parking view and let's skip the booking Is it bookings or booking view?
  93. 10:59The booking view completely.
  94. 11:02We are going to tackle it later.
  95. 11:07I'm going to hit next.
  96. 11:10Okay, and the next question is the resolution.
  97. 11:12Okay, so this design happens to be in Figma, you know, just a standard nowadays current MacBook Pro's resolution.
  98. 11:21Should we be focusing on different viewports?
  99. 11:25So again, just to make sure that this first implementation is as, you know, clear as possible, it is generally a wise decision to focus on what matters first and
  100. 11:35then it's it's a great idea to break this implementation down into phases.
  101. 11:40So I'm going to focus just on desktop for now.
  102. 11:44I'm going to submit and let's see if there are any other follow-up questions.
  103. 11:54Okay, we have a next round of questions.
  104. 11:59And it seems like this time around we are entering more of the product design territory.
  105. 12:04So Claude is noticing that the list of days over here on the left-hand side, it includes uh weekends, so Saturdays and And so it's asking, you know, how many
  106. 12:16days we should be displaying over here.
  107. 12:19And I'm going to follow the recommended answer here, which is the Oh, I'm actually this is not the recommended answer.
  108. 12:26Uh I'm going to just say, yes, let's focus on just the next eight days including weekends.
  109. 12:32Who knows? It might be possible there is a party we are throwing over a weekend and it might be just a good idea to have that ability to book
  110. 12:41a spot on a weekend day as well.
  111. 12:45Okay, let's see the next question.
  112. 12:47Uh available parking cards don't have a hover state in the design.
  113. 12:51Buttons and list items do.
  114. 12:53What should hovering an an available card look like?
  115. 12:56Okay, well, this is an example of Claude being perhaps a bit too proactive and it is right.
  116. 13:03Um we don't have any hover state.
  117. 13:06Let's see. Is that true?
  118. 13:08It is true. We don't have any hover state and I don't really want to have any.
  119. 13:13Um I just feel the interaction would be a little bit cleaner if that part were you know, just a bit more static because, you know, each spot like each
  120. 13:24parking spot is rather large um tile or a card and I am a little bit afraid that it would be a bit too distracting to be just, you know,
  121. 13:34um like to have your cursor going around and having all of these spots constantly flashing with different colors.
  122. 13:41So I'm going to pick the no hover option.
  123. 13:44On the booking screen is the next question.
  124. 13:47What happens when I click a space that I booked myself?
  125. 13:50Right. And this is a case that we have already covered and that part is covered in the parking spot details component.
  126. 13:59So if I go into this component, it actually has four variants.
  127. 14:03We have the empty state, we have the booked state, and we have the available and then booked, which I named user.
  128. 14:11So I'm just going to Oh, and it seems that Claude has already figured it out.
  129. 14:15Just wanted to make sure.
  130. 14:17So the details shows the booked user variant with editable fields plus save and delete.
  131. 14:22Delete opens the delete the booking dialogue every design component gets used.
  132. 14:26That is correct. Uh, okay.
  133. 14:29Only the booking confirmed toast is designed.
  134. 14:32Can I reuse that toast tile for the order actions with this copy such as changes saved or booking deleted?
  135. 14:39Um, yes. Um, actually happy for Claude to take the lead on designing like different variants uh like different copy versions for uh for this toast.
  136. 14:51As it is right, I only have one for you know the happy path so just the booking confirmed.
  137. 14:58So I'm going to submit and let's see.
  138. 15:01I'm going to submit.
  139. 15:02Okay. Let's see if there is a third round of questions.
  140. 15:08Okay. Seems like uh there are no more questions and Claude just presented a plan to me.
  141. 15:15Uh and that plan has appeared over here in this uh right hand side panel.
  142. 15:19This is a good moment for me to uh take a pause, read through it uh or perhaps focus just on the parts that I can understand.
  143. 15:27And if I'm happy with it, I'm just going to hit accept and use auto mode.
  144. 15:33If there is anything I would like to change or course correct, I can do the revise option or even reject.
  145. 15:41Um if I were to just hit the accept, it would um allow Claude to change its mode from plan to um accept edits.
  146. 15:50But um as we covered already in one of the previous videos um auto mode would be just a little bit more convenient for us because Claude this way doesn't
  147. 15:59have to like uh keep asking us for permissions to run different kinds of commands and there will be quite a lot of commands.
  148. 16:07Uh let me just take a quick look.
  149. 16:09Um the color variables seem to be right.
  150. 16:13Um the type settings are right as well.
  151. 16:15Uh Miranda Sans is the type face that we ended up using.
  152. 16:19Um, hm, it has noticed uh, minor adjustments in things like letter spacing.
  153. 16:26Uh, it will be able to pick up assets, uh, hopefully like the Tonik logo.
  154. 16:33Um, and all of the decisions have been saved.
  155. 16:37Um, and let's see.
  156. 16:38Uh, it recommends using Next.js, perfect.
  157. 16:41TypeScript, of course, and Tailwind CSS, uh, which is I'm fine with this.
  158. 16:47Um, let's see. Okay, um, things look generally good.
  159. 16:56Um, and I can see in the phases that yes, the implementation is broken broken down into phases and I can see there are parallel sub agents for different phases,
  160. 17:08which is great. And then we have this session uh, carrying out things such as foundations, which does make sense.
  161. 17:14So without further ado, I'm just going to hit accept and use auto mode and let us let the show begin.
  162. 17:21I'm going to hide the plan and um, let's see how it's going to work out.
  163. 17:27And as Claude is working, we can actually observe um, you know, what's happening over here.
  164. 17:33In the background tasks, uh, we can get into this and see how Claude is initializing a new Next.js project, which is basically a command we could run ourselves, um,
  165. 17:44you know, in a terminal.
  166. 17:46Um, it just creates uh, a lot of files uh, in our folder uh, automatically so that we don't have to do it ourselves.
  167. 17:54Um, and it even says that the Next.js project is created.
  168. 17:58Let's see if that's true.
  169. 17:59I can actually go ahead and open up the file picker and we can see, you know, previously it was empty.
  170. 18:06By the way, one personal preference kind of a thing uh, that I do have is I generally like my file tree on the left high left hand side, so
  171. 18:15I'm just going to change the file tree position to the Um, and we can see the readme, uh, a couple of files such as readme markdown file, agents markdown
  172. 18:25files, a couple of folders, all of which are here because this is, um, this is how, uh, a typical Next.js installation looks like.
  173. 18:35Um, and this is just something that we get by default when starting a brand new Next.js application.
  174. 18:42Um, okay. Let me close this out.
  175. 18:45One more thing that I'm going to be keeping an eye on here is this context panel.
  176. 18:51So as I mentioned previously, right now we are working within this 1 million, um, a tokens context window, but you know, generally I tend to stay, you know, below
  177. 19:02the 500 like below 5 100 tokens, um, threshold because Claude starts um, behaving radically uh, once once once we passed this passed this threshold.
  178. 19:15Over here so far we have used 17% of the context window.
  179. 19:19So yes, and it is true.
  180. 19:21We are looking at 168 uh, thousand tokens.
  181. 19:26And this panel offers us um, an overview of uh, how is this context window filled up?
  182. 19:33So most of the current session's context window is filled up by our messages, but we can also see the MCP tools such as Figma also use um, you know,
  183. 19:45I wouldn't say a substantial amount, but definitely uh, an amount that is something to consider.
  184. 19:51Uh, 25,000 tokens. Um, so you know, one thing about installing MCP and plugins is um, you know, we generally want to keep enabling just the ones we actually use
  185. 20:06on a daily basis.
  186. 20:07Um, installing plenty of MCPs or plenty of plugins uh, will make your Claude a little bit heavier each time you start a brand new session because Claude needs to
  187. 20:18have this context um, in their memory uh, so that it knows that in this particular conversation it has certain tools at its disposal.
  188. 20:29And these instructions can make it a little bit more sluggish right at the beginning.
  189. 20:34So far it is looking fairly okay.
  190. 20:38I think that towards the end of this session we are probably going to pass that half a million threshold, but I'm fine with this because I know that a
  191. 20:46lot of work is going to be carried out by the sub agents and I also understand the gravity of this session.
  192. 20:53This is you know our initializing chat with Claude in which our application is going to be created out of a thin air.
  193. 21:01So I'm fairly okay with this for the time being.
  194. 21:06Okay, things are going fairly well and there are some interesting there are some interesting things that are happening that I believe are worth covering right now.
  195. 21:17So seems like that main orchestrator agent has finished setting up the foundations and it has just spawned three sub agents which show up also over here in this background
  196. 21:29task sections to take care of like smaller, more focused or isolated portions of the implementation.
  197. 21:37And we have the first one and we can actually see this is like a brand new session that this Claude has generated.
  198. 21:47This is the prompt that our main orchestrator agent has given to a new sub agent.
  199. 21:52We can see it's running.
  200. 21:53This sub agent is also running on Opus 5.5 and its task is going to build a couple of first primitive UI components such as button, list item, toast and
  201. 22:05alert dialog it seems.
  202. 22:07Then we have another agent who's going to be taking care of info field, spot card and spot details component.
  203. 22:15And finally [snorts] the third one is going to be working on the data layer.
  204. 22:20So that is an interesting choice.
  205. 22:23One thing to know is um our, you know, main agent that we are talking to has the ability of not just pounding sub agents, but also specifying which models
  206. 22:37they are running on.
  207. 22:38So right now our orchestrator has decided to use Opus models, which I am fine with because, you know, it's better to get the foundations right.
  208. 22:47Later on, if I continue seeing this pattern, I might actually consider you know, sending an additional instruction and suggesting to my orchestrator agent to consider using Sonnets for smaller,
  209. 23:03less demanding tasks. This is a neat little way to optimize your you know, limits consumption and it helps you keep going a little bit longer before you run into
  210. 23:15limit sessions. Oh, and it seems that the card and the details components are already done.
  211. 23:23Perfect. And the order yeah, just the data layer helper or like the sub agent is still working.
  212. 23:32So perfect. Okay. Let's see how it unfolds.
  213. 23:37Okay, interesting things happening.
  214. 23:39First of all, I'm noticing that this to-do list that Claude has put together is getting a little bit out of sync with the true progress of of the implementation,
  215. 23:50but that's okay. I have just been prompted that Node would like access to my to the files in my documents folder, which is totally understandable.
  216. 24:00I'm going to hit allow because I know that this project folder happens to be stored within within my documents folder.
  217. 24:08And there it is.
  218. 24:09I'm really surprised by how fast it was.
  219. 24:12Seems like we already have the first implementation ready to be open up in the browser.
  220. 24:19Claude is right now taking screenshots to basically double check itself and see how it compares to Figma.
  221. 24:27And it is notices and it is noticing that it is already close to Figma already.
  222. 24:32Well, let ask be the judge of that, huh?
  223. 24:35I'm going to hit open and this is going to bring up the built-in browser.
  224. 24:41It will prompt you to like share cookies.
  225. 24:44I'm not going to be doing this for now.
  226. 24:47And let's see. Let me close the sidebar so that we can take a closer look.
  227. 24:51Now, if I wanted to, I can also just copy this URL and open this up in my main default browser of choice.
  228. 25:00But for now, it seems like wow, this first implementation is already is already quite decent.
  229. 25:09I'm really surprised. Now, a little confession time.
  230. 25:14So, we have already done a similar course at Tonik in Polish.
  231. 25:21That was a couple of months ago back when Opus 4.6 was around.
  232. 25:26And let me tell you, like the fact that Opus 5.5 was able to one-shot it right from, you know, the get-go is really impressive with Opus 5 I think
  233. 25:38that was 4.7. It took quite a lot of turns for us to get into this shape.
  234. 25:45So, things are already looking good.
  235. 25:48Okay, let's see. So, Claude is actually using this browser to take screenshots and look at things and compare.
  236. 25:56Right now, it's right now it has put together what I think is Oh, okay.
  237. 26:03Let me bring this up.
  238. 26:04I can actually open up the screenshot that Claude took.
  239. 26:06So, it seems like Claude has put together a temporary playground page of sorts just to put all of the components together on one flat surface and see how they
  240. 26:18compare to their Figma counterparts.
  241. 26:21I'm really glad to see this happening.
  242. 26:24Let me close this.
  243. 26:27And okay, seems that the implementation the first of the implementation is done.
  244. 26:34We are looking at a summary and it's okay.
  245. 26:38The first pass is done.
  246. 26:40The book a space screen is running in the browser pane.
  247. 26:44Perfect. Okay. I clicked through every flow myself.
  248. 26:49I mean not that we had that many flows but sure.
  249. 26:53Cards come out at this dimension and the heading at 48 pixels.
  250. 26:59The column widths match what I can try.
  251. 27:02Okay, definitely. The design system is encode.
  252. 27:07Perfect. A couple of calls it has made.
  253. 27:11The toast descriptions yeah we already covered that.
  254. 27:14Empty required fields nice touch.
  255. 27:17Narrow wear screens of course.
  256. 27:20Figma tidy up. Okay.
  257. 27:25Right. Okay, well seems like that first implementation was quite quite a success.
  258. 27:34So I think it's a good moment to wrap things up for this video and let's see what are the next steps going to be.
  259. 27:42I'll see you in the next one.
  260. 27:44Thank you.

The cheat sheet is for signed-in viewers. Inside: the lesson's prompts ready to reuse, the commands and shortcuts, useful links and what to watch out for.

Sign in to get the cheat sheet

Loading the cheat sheet…