Back to Blog
Tutorials

How to Generate a CLAUDE.md File for Your Project

Keeborg Team

CLAUDE.md is the context file that Claude Code reads automatically when you start a session. A well-written CLAUDE.md gives Claude Code everything it needs to write code that fits your project — tech stack, conventions, architecture, and constraints. Without it, Claude Code makes assumptions that may not match your project.

There are three ways to generate a CLAUDE.md file. This tutorial covers all three, from manual to fully automated.

Method 1: Write It Manually

The simplest approach is to create a CLAUDE.md file in your project root and write it yourself. This gives you complete control over the content but takes the most time.

A good CLAUDE.md should include these sections: Project Overview (2-3 sentences on what the project does), Tech Stack (frameworks, languages, databases with versions), Getting Started (commands to run the project locally), Architecture (how the system is structured), File Structure (where things live), Coding Conventions (patterns to follow and avoid), and Testing (framework, coverage requirements).

Keep it between 200-500 lines. Long enough to cover the essentials, concise enough to stay focused. Frame rules as instructions, not descriptions: say "Use server components by default" rather than "We use server components."

Method 2: Let Claude Code Generate It

If you already have an existing project, you can ask Claude Code to generate a CLAUDE.md file by reading your codebase. Open Claude Code in your project directory and prompt it:

"Read my project structure, package.json, and key files. Generate a CLAUDE.md file that captures my tech stack, architecture, and coding conventions."

Claude Code will explore your project and produce a CLAUDE.md based on what it finds. The advantage is that it reflects your actual codebase. The downside is that it only captures what already exists — it will not include aspirational conventions or planned architecture changes.

Pro tip: After Claude Code generates the file, review it and add any conventions that are not visible in the code itself — things like "never use any type" or "always use server components for data fetching" that represent team decisions rather than existing patterns.

Method 3: Generate with Keeborg (90 Seconds)

Keeborg generates CLAUDE.md as part of a complete 8-document specification suite. This is the fastest method and works best for new projects or when you want a comprehensive context file alongside full technical specs.

Step 1: Go to keeborg.com and describe your app idea in plain English. Step 2: Select your tech stack (framework, database, deployment platform). Step 3: Keeborg generates 8 documents including CLAUDE.md in under 90 seconds. Step 4: Export to GitHub — the CLAUDE.md file is placed in your project root automatically.

The generated CLAUDE.md is informed by your PRD, architecture document, and tech stack choices, so it contains project-specific context that a generic template could never provide. It also generates .cursorrules, .windsurfrules, and copilot-instructions.md alongside it.

Which Method Should You Use?

Use Method 1 (manual) if you have a mature project with well-established conventions that are not documented elsewhere. Use Method 2 (Claude Code) if you have an existing codebase and want a CLAUDE.md that reflects current reality. Use Method 3 (Keeborg) if you are starting a new project or want a comprehensive CLAUDE.md alongside complete technical specifications.

Regardless of which method you choose, the key is having a CLAUDE.md at all. Even a basic one dramatically improves Claude Code output quality compared to having no context file.

New from Keeborg

You know the theory.
Now install the system.

The Dev System is a complete AI development methodology you install in 30 seconds. 10 skills, a 95/100 quality gate, continuity protocol, security audits — personalised to your framework, deploy target, and preferences.

Install in 30 seconds One-time $49 — not a subscription Yours to keep and modify
See what's inside
New
your-dev-system/
CLAUDE.md              ← Your rules
skills/
  session-continuity/  ← Never lose context
  multi-agent-qa/      ← 95/100 quality gate
  security-audit/      ← Blocks bad deploys
  seo-aeo-pass/        ← Every public page
  research-and-plan/   ← Before any code
  nextjs-scaffold/     ← Your framework
  vercel-deploy/       ← Your deploy target
  resend-email/        ← Your email provider
  post-launch/         ← Monitoring + care
templates/
  project-CLAUDE.md    ← Per-project setup
  continuity/          ← decisions, changelog,
                          session-log
$49one-time
Personalised to your stack
Keeborg Team

The Keeborg team is building the AI Agent Development Kit - helping developers generate production-ready specifications for AI coding agents.

Ready to build your next project?

Generate 8 AI-agent-ready specification documents from a plain English description in under 90 seconds.

Get Started Free

Related Articles