Skip to content

Configuration Files

In the previous lesson, you learned about system prompts: the hidden instructions that shape how an AI behaves. Configuration files take this idea one step further. Instead of typing your system prompt into a text field every time, you save it in a file that the AI reads automatically at the start of every conversation.

Think of a configuration file like a job description pinned to the wall of an office. Every morning when the employee arrives, they read the job description to remind themselves of their responsibilities, their boundaries, and their goals. The employee does not need someone to repeat the instructions every day. The file is always there.

Configuration files are one of the most important concepts in this course because they enable persistent behavior. Without them, your AI agent would start every conversation as a blank slate with no memory of what you have taught it. With them, the agent remembers its role, its rules, and even the mistakes it has learned from in past sessions.

Every AI platform has its own version of a configuration file, but the pattern is the same everywhere:

  1. You create a text file with instructions.
  2. You place it in a location the AI knows to look for.
  3. The AI reads the file at the start of every conversation.
  4. The instructions in the file shape the AI’s behavior throughout the session.

Let’s look at how this works on each platform.

What it is: A Markdown file named CLAUDE.md that contains instructions for Claude Code (the command-line version of Claude) or for Claude in project settings.

Where it goes: Place it in the root of your project folder. Claude Code will automatically find and read it when you start a session in that folder.

What to put in it: Your system prompt, project-specific rules, preferred behaviors, lessons learned, and any context the AI needs.

Example CLAUDE.md:

# Project Instructions
You are an assistant helping to build a personal blog website.
## Role
- Act as a friendly web design advisor.
- Explain concepts in simple, non-technical language.
## Rules
- Always suggest mobile-friendly designs.
- Never use dark color schemes. The user prefers light themes.
- When suggesting fonts, stick to Google Fonts that support Spanish characters.
## Output Format
- Use bullet points for lists of suggestions.
- When showing text examples, use blockquotes.
## Lessons Learned
- The user prefers a minimalist style (learned 2025-01-15).
- Do not suggest WordPress. The user wants a static site (learned 2025-01-20).

You can also have a global CLAUDE.md in your home directory (~/.claude/CLAUDE.md) that applies to all projects, and a project-specific one that adds extra rules for a particular project.

No matter which platform you use, the underlying pattern is identical:

  1. Write your instructions in a structured format (role, rules, format, lessons).
  2. Save them in the place your platform expects (a file, a settings field, a Modelfile).
  3. The AI reads them automatically at the start of every session.
  4. Your agent behaves consistently because it always has the same foundation.

This is what separates a one-off chatbot conversation from a true AI agent. An agent has persistent instructions that carry over from session to session. Configuration files make that possible.

  • Configuration files store your system prompt in a file that the AI reads at the start of every conversation.
  • Each platform has its own format: CLAUDE.md for Claude, AGENTS.md for ChatGPT/Codex, GEMINI.md for Gemini, Modelfile for Ollama, and system prompt presets for LM Studio.
  • The pattern is universal: write instructions, save them, and the AI reads them automatically.
  • Configuration files enable persistent agent behavior across sessions. Your agent does not forget its role or rules.
  • Start with a simple file and add to it over time as you learn what your agent needs.