Watch on YouTubePlayPlays from YouTube. Google's privacy policy (opens in a new tab) applies.
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
- CLAUDE.md works best short (roughly 150–300 lines); documenting every design-system pattern there makes Claude forget or make things up.
- 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. - A
pathssetting in a rule's frontmatter makes Claude load it only when it reads or edits files in that folder. - Everything in
.claude/is shared with the team unless you exclude it from git on purpose. - A private, git-excluded
.local/folder can hold the business context, user context and synthetic personas for exploratory conversations. - Anonymise sensitive material, such as investor decks, before sharing it with Claude.
- An analytics connector (PostHog, for example) lets Claude answer questions about how people really use a feature.
- One folder per larger project keeps its to-dos, research reports, briefs and meeting transcripts in one place for Claude.
Chapters
- 00:00Design rules and CLAUDE.md's limits
- 03:31The rules folder
- 05:55Rules that load per folder
- 07:47A private .local folder
- 09:51Business and user context
- 11:48Analytics data and synthetic personas
- 13:47A folder for each project
- 00:00Hello and welcome back.
- 00:02In the previous modules, we talked a lot about um using Claude Code to, well, write code.
- 00:07It's sort of in the name.
- 00:09But there are many other ways we can go beyond code in using Claude Code in the daily product design workflow.
- 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.
- 00:25So it's going to be a little bit more theoretical.
- 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
- 00:36and some of my other colleagues which I talked to here at Tonik.
- 00:40Um and in this video specifically, we are going to talk about working with your product design context.
- 00:45And there are two things that I would like to uh cover in this video.
- 00:51The first one are rules or documenting your UI UX patterns or design system patterns.
- 00:58So um previously, we have briefly skimmed over uh files such as CLAUDE.md or log your local CLAUDE.md file.
- 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,
- 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
- 01:32a little bit of information about who you are in general.
- 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
- 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
- 01:54the UI that rips apart, so that it's the UX that doesn't drift apart as well.
- 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
- 02:11something that has way more than I don't know, 1,000 2,000 lines.
- 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
- 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.
- 02:39We really want to be mindful of the context.
- 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.
- 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
- 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
- 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
- 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.
- 03:32So a better place to document these types of rules is using rules folder.
- 03:38And we haven't talked about it yet, so let's unpack it.
- 03:41So you might remember from other lessons that dot Claude folder, and this is where we would keep our skills, for example, right?
- 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
- 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
- 04:08going to be shared with everyone else.
- 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
- 04:18the course of the last two modules, actually comes with one rule already in here.
- 04:23And it's a rule about bookings.
- 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.
- 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
- 04:46this rule into its into its context.
- 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
- 05:00with this in this raw format markdown file, right?
- 05:05They come with this front matter section, and we've already talked about the front matter section.
- 05:10You might remember it from our lesson about skills when we were creating this skill.
- 05:15We talked about the front matter section in here.
- 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
- 05:26optionally we can also define a couple of other things.
- 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
- 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.
- 05:51Optionally you can just ask Claude to walk you through it.
- 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
- 06:06or modify anything within this particular folder, it will be forced to load this particular rule into its context and read through it.
- 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
- 06:25related to this, this will never be a thing they need to worry about or their AI agents need to worry about.
- 06:32So let's see. We have the SRC features booking, so that would be this folder, features, and then we have bookings.
- 06:39So whenever Claude is reading any of these files, only then this rule is going to be loaded up into its context memory.
- 06:46And we can really go crazy with this.
- 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
- 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
- 07:11know as well. This is a good place to document it.
- 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
- 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
- 07:35context, working context. So yeah, that are these are rules, a great place for you to document your design system patterns.
- 07:46So this is the first way of working with the context.
- 07:49And then there is the second way which I wanted to talk about.
- 07:51And the the second way is more local.
- 07:55And for this second way, let me actually go back to this old goody.
- 08:00So the double diamond from the design thinking process.
- 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,
- 08:16but mostly the develop part.
- 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.
- 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
- 08:40of the context that you have.
- 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
- 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
- 09:01keeping, you know, my like context files or just really rough notes about things that I'm doing.
- 09:10I'm going to walk you through some of the things that I sometimes put into this folder.
- 09:14There are two things you need to know.
- 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
- 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
- 09:34basically something that I just asked Claude to come up with on the spot because this entire product is really non-existent.
- 09:41But I really wanted to like make the get the point across.
- 09:45So this is why I'm having these files so that we can have something to look at.
- 09:49Let me actually zoom in over here so that it's a little bit easier for us to see.
- 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.
- 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
- 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.
- 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
- 10:34anonymize before sharing with Anthropic of course.
- 10:37That is a very good habit to have.
- 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.
- 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
- 10:55this and like review it every now and then as your business is evolving.
- 10:59Things such as you know, if it's a startup, then what kind of stage startup it is?
- 11:03Are we looking for a new series?
- 11:05What kind of rounds have we completed yet?
- 11:08What is the main goal for this quarter?
- 11:10What are we focusing on?
- 11:11What are the key customers?
- 11:13Do we have any design partners that we need to be focusing on?
- 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
- 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
- 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.
- 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
- 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
- 12:09look out for connectors.
- 12:11One example is PostHog, a really popular analytics tool that comes with a really nice connector to Claude code.
- 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
- 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?
- 12:41Really need a way to have your exploratory conversation much more grounded in real world data.
- 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
- 13:00know, fake user personas or sometimes these are called actually, you know, synthetic user personas.
- 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
- 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
- 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.
- 13:39So yeah, just another way of including more of the like more users into your process.
- 13:46And then finally, there is this projects folder and this is the the one that is the least organized of them all.
- 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,
- 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
- 14:13this folder as a place to store anything that is relevant to this work.
- 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,
- 14:27what have I, uh, like what's still ahead of me and what things that I have done already.
- 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
- 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
- 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
- 15:03to help me create better plans or help me validate my own ideas, um, with, you know, the things that I already know.
- 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.
- 15:24So yeah, that is it for this video.
- 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,
- 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
- 15:46in a really short matter of time.
- 15:48So I hope I'm going to see you there.
- 15:50Thank you so much.