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

5.2 Sketch in code: throwaway UI playgrounds

Next lesson in 8 s

5.1 Your product's context, in a folder

Adam shows how to keep design-system patterns in .claude/rules/, loaded only for the folders they apply to, then walks through his private .local/ folder of business context, user context, personas and project notes that Claude can read.

What you'll learn

  1. CLAUDE.md works best short (roughly 150–300 lines); documenting every design-system pattern there makes Claude forget or make things up.
  2. Rules in .claude/rules/ hold UI and UX conventions that every teammate's agent should follow, like how to write error messages or which component asks for confirmation.
  3. A paths setting in a rule's frontmatter makes Claude load it only when it reads or edits files in that folder.
  4. Everything in .claude/ is shared with the team unless you exclude it from git on purpose.
  5. A private, git-excluded .local/ folder can hold the business context, user context and synthetic personas for exploratory conversations.
  6. Anonymise sensitive material, such as investor decks, before sharing it with Claude.
  7. An analytics connector (PostHog, for example) lets Claude answer questions about how people really use a feature.
  8. One folder per larger project keeps its to-dos, research reports, briefs and meeting transcripts in one place for Claude.

Chapters

  1. 00:00Design rules and CLAUDE.md's limits
  2. 03:31The rules folder
  3. 05:55Rules that load per folder
  4. 07:47A private .local folder
  5. 09:51Business and user context
  6. 11:48Analytics data and synthetic personas
  7. 13:47A folder for each project
  1. 00:00Hello and welcome back.
  2. 00:02In the previous modules, we talked a lot about um using Claude Code to, well, write code.
  3. 00:07It's sort of in the name.
  4. 00:09But there are many other ways we can go beyond code in using Claude Code in the daily product design workflow.
  5. 00:17And this is exactly what we are going to dive into, not just in this particular lesson, but also in this module uh specifically.
  6. 00:25So it's going to be a little bit more theoretical.
  7. 00:28I encourage you to just sit back and relax as I'm going to walk you through some of the things that have been proven um, you know, successful for me
  8. 00:36and some of my other colleagues which I talked to here at Tonik.
  9. 00:40Um and in this video specifically, we are going to talk about working with your product design context.
  10. 00:45And there are two things that I would like to uh cover in this video.
  11. 00:51The first one are rules or documenting your UI UX patterns or design system patterns.
  12. 00:58So um previously, we have briefly skimmed over uh files such as CLAUDE.md or log your local CLAUDE.md file.
  13. 01:07But we only really talked about them uh in the context of this being a good place for you to document um uh your, you know, um code related stuff,
  14. 01:18um, you know, your gotchas uh from your implementations, um, and uh perhaps your own preferences uh for working with Claude Code or well working with code in general or
  15. 01:32a little bit of information about who you are in general.
  16. 01:35What we haven't talked about is that this might be also a good place for you to document um some of the UI UX rules that you really wish for
  17. 01:44not just your own AI agents to be aware of, but also AI agents of other engineers on your same team so that your UI, so that it's not just
  18. 01:54the UI that rips apart, so that it's the UX that doesn't drift apart as well.
  19. 01:59Uh now, the thing about using CLAUDE.md file is that document everything, every single pattern or every single rule over here, I really quickly turn this uh document into
  20. 02:11something that has way more than I don't know, 1,000 2,000 lines.
  21. 02:16And let me remind you, right, that the sweet spot for the CLAUDE.md file length, um I think it's still it's still considered between uh 150 and 300 lines
  22. 02:28at most. Uh anything more than that will very quickly make our Claude AI agents uh forget about the things that are written down here or start hallucinating.
  23. 02:39We really want to be mindful of the context.
  24. 02:42And yet, there are still these other things that we just need Claude to be mindful of sometimes, not all the times, but just sometimes.
  25. 02:51So for example, when you write and write down or create a new error message, there is this convention that we would like for all of the AI agents to
  26. 03:00be respectful of. Whenever you need to ask the user for a confirmation, you always use this particular component over this classic dialogue approach, which might be a very common
  27. 03:11scenario. Um you know, all of these really custom things, custom to your design system that you need to Claude to to remember whenever it's starting these areas of the
  28. 03:22work. So if we were to document them over here, this would also sort of hurt other engineers who might not be working on UI or UX all that much.
  29. 03:32So a better place to document these types of rules is using rules folder.
  30. 03:38And we haven't talked about it yet, so let's unpack it.
  31. 03:41So you might remember from other lessons that dot Claude folder, and this is where we would keep our skills, for example, right?
  32. 03:48And so everything that is here in this dot Claude folder is something that is shared with everyone else working on the same product unless unless you decide to get
  33. 03:57exclude anything inside. And we have decided to get exclude this particular skill a couple of lessons ago, but unless you do this consciously, everything you put into here is
  34. 04:08going to be shared with everyone else.
  35. 04:10What we haven't talked about is that we have this rules folder in here, and this mature version of the booking application, which we which we've been working with over
  36. 04:18the course of the last two modules, actually comes with one rule already in here.
  37. 04:23And it's a rule about bookings.
  38. 04:25It's a very general thing, like basically things for Claude to know whenever it works on modifying or whatever it modifies anything about bookings in general.
  39. 04:37Really this type of things that wouldn't really make sense to Claude to remember all the time, but you know, whenever it's working with bookings, it makes sense to load
  40. 04:46this rule into its into its context.
  41. 04:49So this is exactly why rules are so great, because rules, when I now switch over to this view source mode over here in the Claude code, rules also come
  42. 05:00with this in this raw format markdown file, right?
  43. 05:05They come with this front matter section, and we've already talked about the front matter section.
  44. 05:10You might remember it from our lesson about skills when we were creating this skill.
  45. 05:15We talked about the front matter section in here.
  46. 05:18For this skill specifically, the front matter needs to have a name, like for each skill we need to have a name, we need to have a description, and then
  47. 05:26optionally we can also define a couple of other things.
  48. 05:29We decided to define things such as disable model invocation so that this skill doesn't like so that Claude never automatically invokes this skill, and instead this is something we
  49. 05:41do manually. You can read more about things you can define in the front matter of both skills and rules in the official Claude code documentation.
  50. 05:51Optionally you can just ask Claude to walk you through it.
  51. 05:54So for rules, one really neat thing we can define in the front matter is the path, a path for the files, so that whenever Claude is going to read
  52. 06:06or modify anything within this particular folder, it will be forced to load this particular rule into its context and read through it.
  53. 06:15And it's going to happen only only when Claude is actually modifying or reading files in that folder, which is great because for engineers who don't really work on files
  54. 06:25related to this, this will never be a thing they need to worry about or their AI agents need to worry about.
  55. 06:32So let's see. We have the SRC features booking, so that would be this folder, features, and then we have bookings.
  56. 06:39So whenever Claude is reading any of these files, only then this rule is going to be loaded up into its context memory.
  57. 06:46And we can really go crazy with this.
  58. 06:49We can have, you know, different rules for different things like rules for writing down error messages or success messages or rules for approaching empty states, rules for asking for
  59. 07:01confirmations, any sort of pattern that is really custom to your design skill that you need for not just your AI agents, but the AI agents of other engineers to
  60. 07:11know as well. This is a good place to document it.
  61. 07:14And if your rule doesn't happen to to be suitable for any folder in particular, what you can do instead is in your CLAUDE.md file under rules, what you
  62. 07:26can do is you can like list down all of the rules that you have and briefly mention when it makes sense for Claude to load this rule into its
  63. 07:35context, working context. So yeah, that are these are rules, a great place for you to document your design system patterns.
  64. 07:46So this is the first way of working with the context.
  65. 07:49And then there is the second way which I wanted to talk about.
  66. 07:51And the the second way is more local.
  67. 07:55And for this second way, let me actually go back to this old goody.
  68. 08:00So the double diamond from the design thinking process.
  69. 08:04So basically everything that we've talked about in this course so far was really focusing in that second diamond, specifically the develop or well sometimes the deliver part as well,
  70. 08:16but mostly the develop part.
  71. 08:18What we haven't really talked about is that Claude is also really great at like helping or supporting you out in this like first diamond phases as well.
  72. 08:28So discovering, defining, researching, ideating, and the way it can support you or the the web the best way for Claude to support you is for it to have all
  73. 08:40of the context that you have.
  74. 08:42So this is why I think that I tend to do in every new product that I work on is I tend to create this dot local folder which I
  75. 08:51then remember to get exclude so that it doesn't get committed and it doesn't really pollute the repository for everyone else because this is truly my own personal space for
  76. 09:01keeping, you know, my like context files or just really rough notes about things that I'm doing.
  77. 09:10I'm going to walk you through some of the things that I sometimes put into this folder.
  78. 09:14There are two things you need to know.
  79. 09:15The first one is that for each product the contents of the local folder is going to look slightly differently and it's not always so neatly organized as it is
  80. 09:24over here. The second thing is that this local folder over here and the what I'm going to be showing you here on my screen is a total This is
  81. 09:34basically something that I just asked Claude to come up with on the spot because this entire product is really non-existent.
  82. 09:41But I really wanted to like make the get the point across.
  83. 09:45So this is why I'm having these files so that we can have something to look at.
  84. 09:49Let me actually zoom in over here so that it's a little bit easier for us to see.
  85. 09:53And let's see. A couple of things that I tend to tend to keep in this local folder is user context and business context.
  86. 10:03So whenever I'm not sure about whether it's a good moment to share this context with everyone else on my team and I'm only getting started, I'm actually gathering the
  87. 10:12information about the user base, the target demographic, or the business context, I would sometimes keep these files over here in this dot local folder.
  88. 10:21And I would oftentimes ask Claude to help me out create these files based on things such as pitch decks or like investor decks, which I also always remember to
  89. 10:34anonymize before sharing with Anthropic of course.
  90. 10:37That is a very good habit to have.
  91. 10:40And I would just ask it to create a brief markdown summary of everything we know already up to this point about our users and the business.
  92. 10:48And the business that like if it's in one file, it needs to be a really high level thing and you really need to remember to keep coming back to
  93. 10:55this and like review it every now and then as your business is evolving.
  94. 10:59Things such as you know, if it's a startup, then what kind of stage startup it is?
  95. 11:03Are we looking for a new series?
  96. 11:05What kind of rounds have we completed yet?
  97. 11:08What is the main goal for this quarter?
  98. 11:10What are we focusing on?
  99. 11:11What are the key customers?
  100. 11:13Do we have any design partners that we need to be focusing on?
  101. 11:16Everything that I need Claude to know whenever I'm about to use it to simply brainstorm an idea before I even get down to like creating first mockups in you
  102. 11:28know, Figma or paper or even in Claude code, whenever I just need to have that casual exploratory conversation just to help me gather my thoughts, I would just you
  103. 11:38know keep these files around and I would attach them to my context just like this so that Claude basically knows almost as much as I do.
  104. 11:49One additional really nice thing that you can do is you can see if there are any analytics tools that you have installed in this particular codebase, if you can
  105. 11:59get access to and if it's okay for the rest of the team for the information that store in there to be also accessed by AI agents, you might actually
  106. 12:09look out for connectors.
  107. 12:11One example is PostHog, a really popular analytics tool that comes with a really nice connector to Claude code.
  108. 12:19Installing it really unlocks the ability for you to have these deeper and more meaningful conversations with Claude about, hey, what like like what are the ways people interact with
  109. 12:31this particular features? What are the problems that you might be noticing in the recordings that we have or in the events that we are collecting?
  110. 12:41Really need a way to have your exploratory conversation much more grounded in real world data.
  111. 12:49Going back to users, whatever information I have about this about this, if I have enough, sometimes I would even go to create and ask Claude to create these, you
  112. 13:00know, fake user personas or sometimes these are called actually, you know, synthetic user personas.
  113. 13:05This is really nice because later down the line when I'm you know, evaluating feature that I'm that I already have a mockup for or prototype for I would sometimes
  114. 13:18ask Claude to spawn a sub agent acting as one of these personas so that I can have a conversation with these personas and ask them for their point of
  115. 13:29view on whether, you know, the way I'm I'm thinking about solving a particular problem really addresses their own needs or their own workflows.
  116. 13:39So yeah, just another way of including more of the like more users into your process.
  117. 13:46And then finally, there is this projects folder and this is the the one that is the least organized of them all.
  118. 13:52So whenever I need to whenever I need to work on something that goes beyond a really small linear issue or a Jira ticket or you know, a Asana ticket,
  119. 14:02whatever you use, whenever it's a slightly larger initiative, it's a broader project, I would actually create a new folder for this and I would keep this folder or or
  120. 14:13this folder as a place to store anything that is relevant to this work.
  121. 14:19Um, typically, it would be a really rough to-do file, which I would actually create and maintain myself, uh, just to help me keep a better track of, you know,
  122. 14:27what have I, uh, like what's still ahead of me and what things that I have done already.
  123. 14:33Um, if I have conducted any usability tests and I use Claude to generate a summary or report of this, I would keep those uh reports here in this project
  124. 14:42folder. Um, when I have a brief or when I have a transcript from a call with the rest of the team, when we discussed, um, like the initial requirements
  125. 14:52for this new project, all of this context would be kept in here and it's really useful sometimes for Claude and my exploratory conversations to have access to these files
  126. 15:03to help me create better plans or help me validate my own ideas, um, with, you know, the things that I already know.
  127. 15:12Um, so yeah, that is that second way of incorporating context into your product design, uh, workflow, uh, or like the your product design way of working with Claude Code.
  128. 15:24So yeah, that is it for this video.
  129. 15:26Um, in the next one, we are going to look a little bit again, we are going to go back to this double diamond and we are going to, uh,
  130. 15:34take a closer look into this defining layer of this, so ideating and testing different ideas and how we can use Claude Code to uh create really quick mockups really
  131. 15:46in a really short matter of time.
  132. 15:48So I hope I'm going to see you there.
  133. 15:50Thank you so much.

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…