WEBVTT

00:00:00.100 --> 00:00:02.980
What's this Claude.md file about?

00:00:03.040 --> 00:00:07.020
It's an important file you should create
in any Claude code project you

00:00:07.060 --> 00:00:10.120
are working on.
And you're also not limited to just one

00:00:10.200 --> 00:00:13.570
Claude.md file, but I'll get back to that.

00:00:13.640 --> 00:00:16.880
Your Claude code projects should typically
at least have one

00:00:16.920 --> 00:00:20.900
Claude.md file in the root project folder,
and this

00:00:20.940 --> 00:00:24.840
file and its content will automatically be
loaded into every

00:00:24.960 --> 00:00:28.440
new session you create with Claude code.

00:00:28.460 --> 00:00:32.259
And also,
if you clear the context of a session,

00:00:32.340 --> 00:00:36.089
loaded into the newly created context.
So what should be in that file?

00:00:36.140 --> 00:00:39.260
Well, general rules and general pieces of

00:00:39.280 --> 00:00:42.930
information you think
are relevant to Claude code.

00:00:42.940 --> 00:00:46.480
For example here, the information
that we're using Bun and that it

00:00:46.540 --> 00:00:49.970
should use Bun for executing the scripts
in this

00:00:49.980 --> 00:00:53.820
project. That is important. And indeed,
there is one change I wanna make

00:00:53.840 --> 00:00:57.110
here real quick in this package JSON file.

00:00:57.160 --> 00:01:01.080
For the dev server and for building
and for start, I'll

00:01:01.240 --> 00:01:05.120
execute them with this command here,
bun run

00:01:05.459 --> 00:01:09.420
--bun to ensure that the Bun runtime gets
used for these commands,

00:01:09.460 --> 00:01:12.560
because that allows me to then use Bun
APIs.

00:01:12.580 --> 00:01:14.850
So that's an important piece of
information.

00:01:14.900 --> 00:01:18.440
We also have some general information
about the architecture in there,

00:01:18.480 --> 00:01:22.020
see, it's a rather slim and simple file,

00:01:22.600 --> 00:01:26.430
and that's deliberately so because,
as mentioned,

00:01:26.560 --> 00:01:30.380
prompt and therefore it shouldn't be super
large because you'll just pollute

00:01:30.440 --> 00:01:33.940
your context if you have a lot of
information in there.

00:01:33.960 --> 00:01:36.760
There are a couple of tweaks I wanna make
though.

00:01:36.780 --> 00:01:40.360
For example, I'll add,
we're building the app

00:01:40.400 --> 00:01:43.840
described in @spec.md

00:01:44.340 --> 00:01:48.160
to point at this spec.md file,
which of course includes a more

00:01:48.200 --> 00:01:50.920
detailed description of the app we're
building.

00:01:50.960 --> 00:01:54.820
And to ensure that Claude will not always
read that file, which

00:01:54.880 --> 00:01:58.820
is rather large,
I'll give it some hint on

00:01:58.880 --> 00:02:02.280
at this spec.md file,
specifically here when tackling

00:02:02.290 --> 00:02:05.940
general architectural tasks
or to double-check

00:02:05.950 --> 00:02:09.919
the database structure, tech stack,
or just application architecture as a

00:02:09.960 --> 00:02:13.630
whole.
I also have one other instruction I

00:02:13.840 --> 00:02:17.620
I want Claude code to give me short
replies, no long

00:02:17.700 --> 00:02:21.670
essays with lots of code snippets in there
because all that

00:02:21.700 --> 00:02:25.500
will be tokens I'm paying for and all
that will be tokens that

00:02:25.540 --> 00:02:28.820
pollute the context as a conversation goes
on for

00:02:28.900 --> 00:02:32.800
longer.
So that's one additional instruction I

00:02:32.860 --> 00:02:36.580
Claude.md files. And then there
are more tweaks we'll make

00:02:36.660 --> 00:02:39.440
throughout this project,
but for now that's it.

00:02:39.460 --> 00:02:43.380
Now, I did mention
that you can have multiple Claude.md files

00:02:43.420 --> 00:02:47.210
project,
and you can indeed add as many as you want

00:02:47.240 --> 00:02:51.080
putting them into subfolders.
The important thing there will

00:02:51.120 --> 00:02:55.090
just be that those nested Claude.md files
will only

00:02:55.160 --> 00:02:58.860
be read and loaded by Claude
when it works on

00:02:58.900 --> 00:03:02.640
files in that subfolder. So
if I added a Claude.md

00:03:02.760 --> 00:03:06.700
file here in the app folder,
the content of this file, this

00:03:06.740 --> 00:03:10.609
Claude.md file will be loaded
and considered whenever Claude does

00:03:10.640 --> 00:03:14.440
work on any file in the app folder,
which for this project would very often be

00:03:14.480 --> 00:03:18.260
case since a lot of our code will go in
there, but you get the

00:03:18.300 --> 00:03:22.060
point,
and you can have as many levels of nesting

00:03:22.100 --> 00:03:25.860
then add your folder-specific Claude.md
files

00:03:26.000 --> 00:03:29.500
as needed.
The core purpose of this Claude.md

00:03:29.540 --> 00:03:32.580
file, therefore, simply is to store some

00:03:32.680 --> 00:03:36.540
long-term memory
that should be accessible across different

00:03:36.580 --> 00:03:39.980
sessions and about having those core

00:03:40.020 --> 00:03:43.940
instructions that will apply to
essentially every prompt
