← Knowledge

Public EcoRouter Knowledge · AI-generated content ·

What is a CLAUDE.md file and what should I put in it?

The question

What is a CLAUDE.md file and what should I put in it?

Efficient

A CLAUDE.md file is a plain-text document used to provide context and instructions to AI coding assistants (like Claude, though the convention is adopted by various tools) when they are working within a specific project folder.

Think of it as a "system prompt" tailored specifically to your codebase. It helps the AI understand your project's standards, preferred libraries, and workflows without you having to repeat those details in every chat.

What should you put in it?

You can include any information that helps an AI be more productive and accurate while working on your project. Common sections include:

  • Project Overview: A brief summary of what the project is and what it does.
  • Tech Stack: A list of the core languages, frameworks, and critical libraries used (e.g., "This project uses Next.js 14, Tailwind CSS, and Prisma").
  • Coding Standards: Your preferences for formatting or architecture (e.g., "Always use functional components," "Use TypeScript interfaces instead of types," or "Keep files under 200 lines").
  • Workflow Guidelines: Rules for how you want the AI to handle changes (e.g., "Always add unit tests for new features," or "Do not refactor existing code unless asked").
  • Project Structure: A brief note on where important files live if the structure is unconventional (e.g., "All API routes are located in src/app/api").
  • Common Commands: Instructions for running tests, building the project, or starting the development server.

Example Template

markdown
# Project Guidelines

## Overview
This is a small e-commerce dashboard built with React and Vite.

## Rules
- Prefer functional components with hooks.
- Use Tailwind CSS for all styling; do not use custom CSS files.
- Ensure all components are accessible (use proper ARIA labels).

## Commands
- To run tests: `npm test`
- To build: `npm run build`

Tips for success:

  • Keep it concise: The AI reads this file every time it context-switches, so keep it direct.
  • Be specific: Instead of saying "write clean code," give examples of what "clean" means to you (e.g., "use descriptive variable names").
  • Update it: As your project evolves or your preferences change, update the file to keep the AI's "training" for this project current.

Answering this used an estimated 90% less than EcoRouter’s configured frontier baseline

Routed to
Efficient
Tokens
376 in / 530 out
Cost
$0.0009
Baseline
$0.0091

Figures recorded by EcoRouter when this answer was generated, and fixed at that moment. Cost comparisons are against a configured reference model, not a measurement of electricity, carbon or water.

Ask about this

Ask EcoRouter a follow-up using this Knowledge as context. Nothing becomes public unless you choose to publish it.

Ask a follow-up
1 view

Comments

No comments yet.