Claude Code for Product Designers
Lesson 22 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

2.8 Keep CLAUDE.md up to date

Next lesson in 8 s

2.7 Cleaning up

Adam refines the My bookings empty state in a few small prompts, then cleans up the changes with /simplify and has Claude split the work into two commits.

What you'll learn

  1. Use small, specific follow-up prompts for UI refinements; no plan mode needed for simple changes; lower the effort to Medium.
  2. Check changes in the browser at desktop and phone width (Chrome DevTools device toolbar, Option+Cmd+I).
  3. Redraw an asset in Figma and link the frame so Claude can pull the SVG.
  4. Run /simplify after a few rounds of loosely related changes and before committing: four sub-agents review reuse, simplification, efficiency and whether each change sits at the right level.
  5. You can suggest Sonnet for /simplify's sub-agents to save usage.
  6. Turning a repeated pattern into a shared component is a design-system decision you make (here: one shared empty state, 14 px).
  7. For a large diff, ask Claude whether to make one commit or several.
  8. Claude often adds more lines than it removes, partly because of verbose code comments; a diff with more removed than added is worth celebrating.

Chapters

  1. 00:00Centring the My bookings empty state
  2. 02:00A mobile arrow from Figma
  3. 04:51Hiding and centring the details panel
  4. 07:05Cleaning up with /simplify
  5. 11:18A shared empty-state component
  6. 13:03Asking Claude how to commit
  1. 00:00Okay, so let's start refining our first implementation of the my bookings view while keeping things simple with Claude.
  2. 00:07Let's see what this entails.
  3. 00:10So first, coming back to coming back to the select period view or like the my bookings view, I only like or I'm not a fan of this empty state.
  4. 00:23I don't really like how it's aligned to the top left corner and I would really wish to have the same sort of arrow over here above this text and
  5. 00:35I would like to keep it over here.
  6. 00:37So with that, I'm just going to I'm just going to really go back to Claude and I'm going to just ask it to do so and I'm going to
  7. 00:46use this session because the context window is looking pretty okay for now and perhaps one thing I'm going to do is I'm going to change the reasoning effort back
  8. 00:57to medium just so that, you know, it's a little bit cleaner this time around.
  9. 01:01It's no longer, you know, a big implementation we need to carry out.
  10. 01:05So yeah, let's go.
  11. 01:07Okay Claude, now I would like to start refining this implementation and first of all, I would like to update that empty state on the my bookings view.
  12. 01:19Right now it's left and top aligned.
  13. 01:22I would like to center it out both vertically and horizontally and I would also like to include the same arrow doodle SVG that we have on the panel on
  14. 01:36the side. Okay, let's see how Claude is going to handle this request.
  15. 01:46No plan mode, just keeping things on auto because, you know, it's just a simple simple follow-up request to that initial implementation.
  16. 01:56Okay, let's see Um, how does it look like.
  17. 02:00I'm going to head over to my browser, and it already looks much better than before, uh, in my opinion.
  18. 02:07Let's check it out on mobile as well.
  19. 02:09I'm going to hit inspect.
  20. 02:11I'm already here in this, um, in this, you know, um, device, um, toolbar mode or in this mobile preview.
  21. 02:19Uh, looks okay, although, hmm, now I'm noticing a little bit of a a little bit of a awkwardness because the arrow pointing to the left only makes sense on
  22. 02:30desktop. It doesn't really make sense to have that arrow pointing left, you know, when you're on a mobile.
  23. 02:35So, uh, you know what I'm going to do?
  24. 02:37I'm going to go back to Figma.
  25. 02:38I'm going to redraw this arrow, and I'm going to come back to Claude with an updated SVG, and I'm going to ask it to use it conditionally, okay?
  26. 02:48Okay, I have that arrow ready.
  27. 02:50Looks like this, uh, really simple.
  28. 02:52I'm going to copy a link to this frame.
  29. 02:55I'm going to go back to Figma to Claude, and I'm going to ask it to update the the arrow.
  30. 03:00Uh, looking okay, but I'm not a fan of how this arrow points to the left on mobile.
  31. 03:10How about we update the SVG on smaller viewports to this one?
  32. 03:18And then I 'm going to share a link to this particular Figma frame.
  33. 03:24I'm expecting Claude to, uh, pull up the SVG code for that arrow which I just, uh, changed in Figma, and I'm hoping it's going to take care of the
  34. 03:33implementation. Uh, [snorts] okay?
  35. 03:37Mhm. Okay, uh, seems like Claude has already taken care of this.
  36. 03:44Uh, it looks okay on the screenshot.
  37. 03:46Let's go back to my browser.
  38. 03:47Yeah, and it looks it looks pretty decent.
  39. 03:50It's a bit small, I think.
  40. 03:52Maybe it would make sense to have a little bit larger.
  41. 03:55Um, let me go back to Claude, and I 'm going to ask it, um Can you make that arrow um 150% larger on mobile viewports?
  42. 04:11Um yeah I like sometimes I just want like to be specific.
  43. 04:16Um could have said maybe like two times as large, but I don't think that would be uh well that would be it.
  44. 04:23So let's see um okay scale um phone arrow to 150% So I'm going to again bring up and by the way the shortcut to bring up uh dev tools
  45. 04:36um uh on Chrome is option command and I uh and it looks okay.
  46. 04:43It looks really good.
  47. 04:44Looks really good. I'm pretty happy with this.
  48. 04:47But you know what um hmm Now that I think of this I don't really like how we have these two duplicate arrows both in the main panel and with
  49. 04:57the details panel. I'm actually going to ask Claude to consider um consider something like this.
  50. 05:06So when we have no bookings whatsoever in any selected time period let's simply hide the details panel as well.
  51. 05:13Okay? Um okay so I'm going to ask it Okay thank you.
  52. 05:20It looks good. Um Can we also hide the details panel when there are no bookings whatsoever in your selected time period?
  53. 05:34Okay let's send it and uh wait for the response.
  54. 05:40Okay Claude is uh Claude is implemented and is currently checking in the browser.
  55. 05:44I'm going to do the same in my own browser and I think it looks a little bit cleaner this way.
  56. 05:49I hope you can agree.
  57. 05:51Um Okay one last thing that is now bothering me a little and I can imagine that must have been bothering you as well watching this video.
  58. 06:00Uh since I made a decision to send her the empty state here in this main container Why don't we make this arrow also centered here in the details panel
  59. 06:11in the book as space view, right?
  60. 06:13Or like in the details panel altogether.
  61. 06:19Okay, this is looking okay.
  62. 06:22Why don't we also center the arrow and the empty state in the details panel as well?
  63. 06:30I mean center vertically.
  64. 06:36Okay. It's always a good idea, I believe, to to pat Claude on the back for good job or decent job he's doing.
  65. 06:47Improves the team spirit, I guess.
  66. 06:51Okay, that was a very simple change to carry out.
  67. 06:54Yeah, and I think it looks it looks quite decent.
  68. 06:58Very nice. So while Claude is still checking both views in the browser, I think we got in a shape in which I'm quite happy with this.
  69. 07:09But notice what happened over the last couple of turns.
  70. 07:13So we didn't make any comments, right?
  71. 07:15And we have also touched on a couple of, you know, seemingly related things, but they were not really all that much related.
  72. 07:24Like it started off with just a simple idea of centering that initial empty state in the main panel, and then I wound it off, and we ended up also
  73. 07:36like updating the SVG illustration and updating the empty state in the details panel.
  74. 07:41So there is a couple of things that happen, and this is okay.
  75. 07:43That is totally how we are going to be working with Claude.
  76. 07:47But before we commit, because we've been, you know, changing and experimenting with things, it's a good idea before the next turn to use a command which I really like
  77. 07:59and a lot of other people in the Claude code community too, which is simplify.
  78. 08:04And that is that keep things simple part of this lesson.
  79. 08:07So it's really simple.
  80. 08:09I'm just going to type a slash and this is going to bring up the slash commands menu and I'm going to type in simplify and I can actually read
  81. 08:17the description uh what this is going to do in a nutshell as we are going to see is um we it's going to give Claude an instruction to spawn
  82. 08:28four sub agents and all of these sub agents are going to review the code which we just touched um and it's going to review it um under like four
  83. 08:39different angles like the simplification like the um like the duplication angle, security angle I believe is in there as well.
  84. 08:47I'm not sure we're going to see in a moment.
  85. 08:49Um so first Claude needs to gather the the diff, the diff being you know what has changed and then it's going to run four cleanup reviews um and here
  86. 08:59are the angles reuse, simplification, efficiency and whether each change can sits at the right level, okay?
  87. 09:06Uh so no security here.
  88. 09:07I I was wrong before um and all of these agents let's see by the way uh they all run on Opus models which is an okay thing um if
  89. 09:17I wanted to be extra mindful of my uh like tokens usage I would maybe uh drop in a suggestion along with the simplified command for Claude to consider using
  90. 09:29Sonnet models for this particular kind of a job but you know it's it's not worrying me that much.
  91. 09:35Uh I'm going to let these agents do their job.
  92. 09:38They are going to come back to this main agent that we talked to with a summary and then Claude is going to make a decision on like which findings
  93. 09:47are worth acting on and which ones are either things we should defer or maybe dismiss altogether.
  94. 09:54Um okay so let's give it a second um as you know the skill is or the command is basically doing its job.
  95. 10:02Okay well seems like it's already done um so let's give it a second.
  96. 10:11Okay and it seems like there is a little bit of things worth fixing into, and that are the things that we just uncovered.
  97. 10:19And we would have otherwise missed them if we were just to comment like that.
  98. 10:24It's always a good thing to do after you have these couple of rounds on like a seemingly related part of the work to run that simplify command before your
  99. 10:33next commit, okay? Okay, so let's give it a second.
  100. 10:39Okay, Claude has spawned us up agent to apply the fixes that it has deemed worth acting on.
  101. 10:46And that sub agent has just finished making the fixes.
  102. 10:50It's now like doing the like it's re-running the checks and basically it's making sure that the code is still correct and there are no like obvious errors.
  103. 11:00I'm going to also hit refresh here in my browser just to make sure things are still looking all right.
  104. 11:07I'm also going to bring up the mobile view.
  105. 11:11And yeah, things are looking overall quite good, quite decent.
  106. 11:15And there is there is one more thing which I noticed Claude Claude was wondering about and I really like the fact that this simplification pass has captured this.
  107. 11:29So over here Claude decided to skip one item which is creating one shared empty state component for both of these, you know, arrow situations and text.
  108. 11:41So yes, it has now become a pattern and I believe it does make sense to abstract it to a shared component, which is a developer way of saying, you
  109. 11:50know, of just turning a pattern which, you know, we can have in multiple places and like abstracting or elevating it into something that is shared and reusable and connected
  110. 12:01across many different places.
  111. 12:04Claude has also spotted a minor design discrepancy here while we were here, which is the fact that in one place we used a 12 pixel font size and in
  112. 12:13the other it was 14 pixel font size.
  113. 12:16So yes, merging this is a very much design design system decision and I'm going to I'm going to actually I'm going to actually reply to Claude that yes, I
  114. 12:31would like us to create shared component for this.
  115. 12:39I would like to use 14 pixel font size moving forwards.
  116. 12:50[snorts] And with that I'm hoping Claude is going to take care of this component.
  117. 12:58So it's creating a new shared empty state component.
  118. 13:01Wonderful. It's a good moment to bring up the file picker.
  119. 13:04I'm sorry, not the file picker, the the changes view.
  120. 13:09We can see if I want to only look at you know the things that we have changed since the last commit and the things that are not committed, it's
  121. 13:18over here. We are gathering quite a lot of files.
  122. 13:22So before we do the next commit, I'm actually going to ask Claude for guidance on what is the best way to commit that because I'm not sure if it's
  123. 13:32a wise idea as a designer, I'm not sure if it's a wise idea to have to like with a diff of this size.
  124. 13:39So many different files and seemingly unrelated changes to have them all grouped under one commit.
  125. 13:48So as it's still finishing the checks, I'm going to compose the the final message already.
  126. 13:54This is this is looking good.
  127. 13:59And because I'm saying this is looking good, let me make sure this is indeed looking good.
  128. 14:03And let me also do this.
  129. 14:07Okay, it's still looking good.
  130. 14:11Right. So with that this looking good.
  131. 14:17I'm ready to commit this work, but since our diff is so large, um I would appreciate your guidance on how to commit all of this.
  132. 14:35Uh whether it's one commit or split into multiple multiple smaller comments.
  133. 14:46And that is a thing that I would like genuinely do every now and then when working with Claude and when I know that my commit history is eventually going
  134. 14:55to make it into the main branch because that is also sometimes not what happens.
  135. 15:00We'll get into that a little bit later.
  136. 15:03Um but when I know that like orders are going to be saving my commit history, I will sometimes spend an extra turn on consulting the Claude on the commit
  137. 15:15strategy. And Claude indeed recommends two commits.
  138. 15:19The changes since your first commit are 11 files, about 230 lines added and a little bit more removed.
  139. 15:26Oh, that is always a thing worth celebrating like when your diff has more lines of code removed than added.
  140. 15:35Yeah, that is always a good thing.
  141. 15:37Typically when you work with Claude, you will like 90% of the time end up having a lot more lines of code added than removed.
  142. 15:44The reason behind this is that like Claude is very is very verbose sometimes with the comments or inline comments it makes in the code.
  143. 15:53I know some people are are really allergic to seeing, you know, these walls of text in the code.
  144. 16:00I'm still somewhat undecided whether it's a good thing or a bad thing.
  145. 16:03I do appreciate that sometimes there are some like these little nuances that future agents might simply not pick up on and, you know, Claude leaving these little cues or
  146. 16:17hints in the code here and there.
  147. 16:19I have seen sessions in which that was like genuinely helpful for other agents to know these gotchas left here and there.
  148. 16:26So uh okay that was uh that's not what this is about.
  149. 16:31Um two comments. Yeah, I'm just going to follow your recommendations.
  150. 16:33So the first one is um uh refine my bookings and then simplify shared view code.
  151. 16:38Okay, sounds about right.
  152. 16:39Uh oh sorry, I didn't mean to open photos up.
  153. 16:43Uh okay, yes, I'm going to say go with the two comments.
  154. 16:48And in a second we are going to see over here.
  155. 16:50And also you know what?
  156. 16:51I am going to bring up this um I'm going to bring up this um panel which we built um and which I mentioned in the previous video.
  157. 17:01Um right. Oh and make a backup in a scratch pad.
  158. 17:08Scratch pad being um that's temporary um you know empty space I mean I mean that's not empty space.
  159. 17:15It's uh like a temporary space hidden from you uh with a backup of everything that's happening in the repo.
  160. 17:22Um which is okay because we are splitting like the diff into two different comments.
  161. 17:27I'm okay with this.
  162. 17:28Um so let us let us see.
  163. 17:33Uh okay, right. So Claude is validating each comment separately, which is a really good thing to do.
  164. 17:40Uh-huh. And it's also checking visually the in between versions that starts to sound a little bit like Claude doing a bit of over engineering work.
  165. 17:52Uh but I'm going to let it slide here.
  166. 17:55And um so we can see that first commit here refine my bookings empty states.
  167. 18:02And then uh in a second I should see that other commit uh landing in here as well.
  168. 18:11And there there we have it.
  169. 18:13So here is that second commit.
  170. 18:15Perfect. And uh I'm going to close this panel.
  171. 18:20And in order to bring back that custom git tree or git graph, I'm going to just type in the comment git graph.
  172. 18:29And now we can also see how these commits are now exclusively living on that feature my bookings branch.
  173. 18:39And that is how we you know refine the implementation a little bit while also made sure that the code we leave behind is actually simple, simpler than the one
  174. 18:49we started off with.
  175. 18:51And with that, let's see what we are going to be doing in the next video.

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…