Podcasts पर वापस जाएंClaude
Claude Code 101
CLAUDE.md फ़ाइल
[Music starts]
[Music starts]
One of the most useful parts of Claude Code is the claude.md file.
Claude Code का सबसे उपयोगी हिस्सा CLAUDE.md फ़ाइल है।
It gives Claude Code persistent memory about your project.
यह Claude Code को आपके प्रोजेक्ट के बारे में स्थायी स्मृति देता है।
When you open up Claude Code without a claude.md file, it's like it has to start fresh every single time.
जब आप बिना claude.md फ़ाइल के Claude Code खोलते हैं, तो यह हर बार एकदम नए सिरे से शुरू होता है।
It has to re-explore your codebase, understand what dependencies are needed and the features that are already implemented.
इसे आपका codebase फिर से explore करना होता है, dependencies और पहले से implemented features को समझना होता है।
Sometimes it has to make assumptions which makes it harder for us to steer Claude in the right direction.
कभी-कभी इसे अनुमान लगाने होते हैं जिससे हमारे लिए Claude को सही दिशा में ले जाना मुश्किल हो जाता है।
But that's where claude.md comes in.
लेकिन यहीं CLAUDE.md काम आता है।
It's a markdown file that you add to the root of your project and Claude Code reads it automatically every time you start a session.
यह एक Markdown फ़ाइल है जिसे आप अपने प्रोजेक्ट के रूट में जोड़ते हैं और Claude Code हर बार इसे पढ़ता है।
It's like an onboarding script for your codebase.
यह आपके कोडबेस के लिए एक ऑनबोर्डिंग स्क्रिप्ट जैसा है।
Simply put, the contents of claude.md file are appended to your own prompt. You can run the /init command which will make Claude generate one based off of your codebase.
सीधे कहें तो claude.md का कंटेंट आपके प्रॉम्प्ट से जुड़ता है। /init चलाएँ, Claude कोडबेस से एक बना देगा।
So let's have a look at one.
तो आइए एक उदाहरण देखते हैं।
This is a Next.js 15 app using the app router, Tailwind, and Drizzle ORM.
यह App Router, Tailwind और Drizzle ORM का उपयोग करने वाला Next.js 15 ऐप है।
Commands: dev server, run tests, lint.
कमांड: डेव सर्वर, टेस्ट चलाएं, Lint।
Code style: use two space indentation, prefer named exports, all API routes go in app/api, use server actions instead of API routes where possible.
कोड स्टाइल: दो स्पेस इंडेंट, नामांकित exports, सभी API रूट app/api में; जहाँ संभव हो Server Actions चुनें।
And it's pretty straightforward.
और यह काफी सरल है।
Now, if I ask Claude Code to create a React component, it knows how to style it with Tailwind or any other CSS framework that I'm using.
अब, Claude Code से React component बनाने को कहूं, तो यह Tailwind या किसी CSS framework से style करना जानता है।
We can see that Claude does a better job at doing its job right off the bat versus having to understand where everything is at first.
हम देख सकते हैं कि Claude पहले की तुलना में शुरुआत से ही बेहतर काम करता है।
And before you ask, the answer is yes.
और पूछने से पहले ही बता दूं, जवाब हां है।
You share this in your version control for your team to use.
आप इसे अपनी टीम के उपयोग के लिए अपने वर्शन कंट्रोल में साझा करते हैं।
But there's actually a hierarchy of memory files depending on who it's for.
लेकिन वास्तव में स्मृति फ़ाइलों की एक पदानुक्रम है, यह इस पर निर्भर करता है कि यह किसके लिए है।
So first you have your project-level claude.md that lives in the root directory of your project.
पहले आपका प्रोजेक्ट-स्तरीय CLAUDE.md है जो रूट डायरेक्टरी में रहता है।
You have a user-level claude.md that lives in your configuration folder.
आपका एक यूजर-स्तरीय CLAUDE.md है जो आपके कॉन्फ़िगरेशन फोल्डर में रहता है।
This one is just for you and goes across all your projects.
यह केवल आपके लिए है और आपके सभी प्रोजेक्ट में लागू होता है।
So put your personal preferences here, like how you write code comments.
यहां अपनी व्यक्तिगत प्राथमिकताएं डालें, जैसे आप कोड कमेंट कैसे लिखते हैं।
First, if you have to correct Claude to do something, like always use server actions instead of API routes, then explicitly ask Claude to save this to memory so that when you come back to this project, it will know every single time.
पहली बात: Claude को सुधारें, जैसे API रूट के बजाय Server Actions, तो Claude से कहें मेमोरी में सेव करे ताकि हर बार याद रहे।
Second, if you have docs in your project that you want Claude to reference, just use the @ symbol with the file path.
दूसरा: प्रोजेक्ट के डॉक्स Claude को @ और फ़ाइल पथ से दिखाएँ।
And third is we recommend you start off a project without a claude.md file so you can see where you have to constantly course correct the model.
तीसरा, बिना claude.md के प्रोजेक्ट शुरू करें, ताकि देखें मॉडल को कहाँ बार-बार सुधारना पड़ता है।
This keeps your claude.md file compact and contains only the necessary information that Claude can work with.
यह आपकी CLAUDE.md फ़ाइल को कॉम्पैक्ट रखता है और केवल आवश्यक जानकारी शामिल करता है।
[Music transition]
[Music transition]
The difference between a frustrating Claude Code session and a productive one comes down to the context, and the claude.md file's how you provide that context.
निराशाजनक और उत्पादक Claude Code session का फ़र्क context से होता है, और claude.md file यही context देने का तरीका है।
Start with your stack, your preferences, and then commands, and just build from there as you go.
अपने स्टैक, अपनी प्राथमिकताओं, फिर कमांड से शुरू करें, और वहां से आगे बढ़ें।