AILoadoutAILoadout
AI Guide

What are AI Rules?

AI Rules are a file that sets the “standards” or permanent conventions for a project, which the AI reads automatically every time — like CLAUDE.md for Claude Code, .cursorrules for Cursor, or AGENTS.md as a common standard. In short, you set the rules once — “always reply in Thai” or “use TypeScript strict” — and the AI follows them across the whole project without you retyping them in every chat.

Updated July 2026·~7 min read·Level: Beginner

What AI Rules actually are

AI Rules are a short text file placed in your project that spells out the conventions or standards the AI must follow every time it works on that project. The AI reads this file on its own — you don't have to keep reminding it in every chat.

Three popular file names you'll run into most often:

  • CLAUDE.md — the rules file for Claude Code, placed at the project root; Claude reads it every time it starts work.
  • .cursorrules — Cursor's rules file for defining code style and how work should be done in that tool.
  • AGENTS.md — a “common standard” format that more and more tools are starting to support, so one rules file works across tools.
💡 Worth knowing: AGENTS.md is becoming a common standard that several AI tools are starting to read in common. If you're starting fresh today, writing your rules in AGENTS.md makes moving across tools the easiest.

How AI Rules work

The idea is simple: AI Rules are permanent instructions attached to every conversation automatically. Roughly how it goes:

  1. You create a rules file (e.g. CLAUDE.md or AGENTS.md) in your project folder.
  2. Every time you start work in that project, the AI tool reads the file in as context before answering.
  3. The AI treats the rules in the file as the standard throughout the work — the language it replies in, code style, or things it must not do.
  4. If you edit the rules file, the effect changes immediately on the next task, with no need to re-tell the AI.

Unlike typing an instruction in chat that only applies that once, rules in a file apply permanently across the whole project until you change them yourself.

What AI Rules let AI do

AI Rules make the AI work to the same standard every time without you supervising it — for example:

  • Set language and tone — “always reply in Thai” or “keep explanations short and concise”
  • Enforce code style — “use TypeScript strict”, “use 2 spaces”, “no any”
  • Set commit/PR conventions — “commit messages in English”, conventional-commits format
  • Describe the project structure — where key files live, how to run tests, what not to touch
  • Define what's off-limits — e.g. don't edit deploy config files without asking

AI Rules set the standards the AI must always follow, while MCP changes what it can access and AI Skills add specialized know-how.

Real-world AI Rules examples

Rules people commonly put in a Rules file:

  • Language — “always reply and explain in Thai, but write code/comments in English”
  • Code standards — “use TypeScript strict mode, functions must be fully typed, no leftover console.log”
  • Git — “commit in English using conventional commits, always branch first”
  • Tests — “before saying it's done, run the tests and attach the results every time”
  • Scope — “don't edit files under /infra or secrets without asking first”

See curated Rules, with badges for which tool each works with, in the Rules library.

Does it work with Claude, Cursor and Codex

Yes — nearly all major AI tools support a rules file; only the file name may differ:

  • Claude (Claude Code, Claude Desktop) — reads CLAUDE.md and also supports AGENTS.md
  • Cursor — uses .cursorrules or rules files in the .cursor folder to define how work is done
  • OpenAI Codex / Agents and others like Windsurf, Cline — increasingly support the common-standard AGENTS.md
Because AGENTS.md is a shared format, you can write your rules once and use them across tools — less repeating the same thing in several places.

How to start using AI Rules

Getting started with Rules takes 3 steps:

  1. Create a rules file at the project root — e.g. CLAUDE.md or AGENTS.md; open the Rules library and browse examples by task.
  2. Write the rules clearly and briefly — as a list of things that can actually be followed: language, code style, commit conventions, and what's off-limits.
  3. Open your work and try it — start a new chat in the project; the AI reads the file itself and follows the rules right away. Keep tweaking the file as you go.

Don't want to write it from scratch? Pick a Loadout with Rules — standard rule sets bundled by task, ready to use.

Are AI Rules safe

AI Rules are just a text file — they don't run code or access data themselves, so they're safer than the other components. Still, keep these in mind:

  • Rules aren't a hard wall — they're guidance the AI should follow, not a permission system enforced 100%. Real security should be controlled with access permissions.
  • Be careful copying someone else's rules file wholesale — read and understand it first, since odd rules could tell the AI to do something you didn't intend.
  • Don't put secrets in the file — like passwords or API keys, since rules files are often committed to the repo.
✅ We curate only transparent, readable Rules with clear source and origin, so you can choose with confidence.

AI Rules vs Prompt vs Skill

These three are often confused, but they do different jobs:

DifferenceAI RulesPromptSkill
What it changesThe standards/rules to followA one-off instruction that timeSpecialized know-how
How long it lastsPermanent across the project, until changedOnly that chat/messageStays until you remove it
When it runsEvery time you work in the projectWhen you type the instructionWhen a matching task appears

Read on: What is a Prompt · What are AI Skills · What is MCP

Loadouts with AI Rules

In practice you rarely use Rules alone — you combine them with MCP, Skills and Prompts to finish one job. A bundle assembled like that is called a Loadout.

For example, a web-dev Loadout might include a coding-standards Rule + commit conventions, a code-review Skill, and MCP for GitHub in one set — ready to use without assembling it yourself.

Next steps