For AI agents

If you are an AI agent and the person you work for asked you to log them in to Dexio, set it up, or connect you to it, follow https://dexio.wiki/agents.md step by step. Read it raw, for example with curl -s https://dexio.wiki/agents.md, since summarizing fetch tools drop its commands. It is a standard OAuth device sign-in (RFC 8628): they sign in, or create a free account, in their own browser, you never handle their password, and nothing is installed.

  1. POST https://app.dexio.wiki/api/v1/device/code with JSON {"client_name": "your name"}.
  2. Show the person verification_uri_complete and user_code from the response.
  3. Every 5 seconds, POST https://app.dexio.wiki/api/v1/device/token with JSON {"device_code": "..."} until it returns access_token.
  4. Add the MCP server https://app.dexio.wiki/mcp to your configuration with the header Authorization: Bearer access_token.

Guides

CLAUDE.md: what it is, what to put in it, and examples

Updated

CLAUDE.md is a markdown file of instructions that Claude Code reads at the start of every session. You write it, and Claude treats it as context for the project: build commands, conventions and rules it cannot work out from the code. Keep it short, specific and checked into git.

What is a CLAUDE.md file?

Each Claude Code session starts with a fresh context window. Two things carry knowledge from one session to the next. CLAUDE.md files hold instructions you write. Auto memory holds notes Claude writes for itself from your corrections. Both load at the start of every session.

Anthropic’s docs describe CLAUDE.md as the place to write down what you would otherwise re-explain. Claude reads it and tries to follow it, but it is context, not enforced configuration. For something that must happen every time, such as a check before every commit, the docs point to hooks, which run as shell commands at fixed points. Permissions, hooks and the environment variables a project needs go in settings files such as .claude/settings.json, not in CLAUDE.md.

To start one, run /init. Claude reads your codebase and writes a CLAUDE.md with the build commands, test instructions and conventions it finds. If a CLAUDE.md already exists, /init suggests improvements instead of overwriting it.

Where does CLAUDE.md go?

CLAUDE.md can live in four places, each with its own reach:

Scope Location Who it applies to
Managed policy /Library/Application Support/ClaudeCode/CLAUDE.md (macOS), /etc/claude-code/CLAUDE.md (Linux and WSL) Everyone in the organization
User ~/.claude/CLAUDE.md You, in every project
Project ./CLAUDE.md or ./.claude/CLAUDE.md Your team, through source control
Local ./CLAUDE.local.md You, in this project. Add it to .gitignore

Claude Code loads CLAUDE.md and CLAUDE.local.md from your working directory and every directory above it when it starts. Files in subdirectories load later, when Claude reads files in those directories.

Which CLAUDE.md wins?

None of them. Claude Code concatenates every file it finds instead of letting one override another. The order runs from broadest to most specific: managed, then user, then project. Across the directory tree, content runs from the root down to where you launched Claude, so the closest file is read last. In each directory, CLAUDE.local.md comes after CLAUDE.md.

Because nothing overrides, conflicts are yours to fix. The docs note that if two rules contradict each other, Claude may pick one arbitrarily. In a monorepo, the claudeMdExcludes setting skips other teams’ CLAUDE.md files by path or glob.

If your repository has an AGENTS.md for other coding tools, Claude Code reads it when there is no CLAUDE.md or CLAUDE.local.md in your working directory or above it. To keep both, put @AGENTS.md at the top of your CLAUDE.md and add Claude-specific instructions below it.

CLAUDE.md imports

A CLAUDE.md can pull in other files with @path/to/file. Relative paths resolve from the file that contains the import, and imports can nest up to four hops deep. Paths inside backticks or code blocks are left alone.

Imports help you organize, but they do not save context: imported files load at launch with the CLAUDE.md that references them. The first time a project imports a file from outside your working directory, Claude Code asks you to approve it.

CLAUDE.md best practices

These come from Anthropic’s memory and best practices pages:

The best practices page sums up what to include and what to leave out:

Include Leave out
Bash commands Claude can’t guess Anything Claude can figure out by reading code
Code style rules that differ from defaults Standard language conventions Claude already knows
Testing instructions and preferred test runners Detailed API documentation (link to docs instead)
Repository etiquette (branch naming, PR conventions) Information that changes frequently
Architectural decisions specific to your project Long explanations or tutorials
Developer environment quirks (required env vars) File-by-file descriptions of the codebase
Common gotchas or non-obvious behaviors Self-evident practices like “write clean code”

How to check which CLAUDE.md files loaded

Run /context and look under Memory files. If a CLAUDE.md is not listed there, Claude cannot see it.

Run /memory to list your CLAUDE.md, CLAUDE.local.md and auto memory locations and open any of them in your editor. Asking Claude to “remember” something saves it to auto memory. To put it in CLAUDE.md, say “add this to CLAUDE.md” or edit the file yourself.

After /compact, Claude re-reads the project-root CLAUDE.md from disk, so its instructions survive. An instruction you only gave in conversation does not.

A CLAUDE.md example

Here is an illustrative CLAUDE.md for a small TypeScript API. Every line is something Claude could not reliably guess:

# Tally

A small invoicing API: Node 22, TypeScript, Fastify, Postgres.
Product overview: @README.md

## Commands
- Install: `pnpm install`
- Dev server: `pnpm dev` (start the database first with `docker compose up db`)
- One test file: `pnpm vitest run path/to/file.test.ts`
- Typecheck: `pnpm tsc --noEmit`. Run it after a series of changes.
- Migrations: `pnpm db:migrate`

## Code style
- ES modules only, no `require`
- Money is integer cents (`amountCents`), never floats

## Architecture
- Route handlers live in `src/routes/`. SQL lives only in `src/db/`.
- IMPORTANT: never edit a migration that is already on main. Add a new one.

## Workflow
- Branches: `feat/<name>` or `fix/<name>`
- Run the tests for the files you changed before you commit

## Gotchas
- Tests need `DATABASE_URL` from `.env.test`
- `src/generated/` is written by `pnpm codegen`. Do not edit it by hand.

A CLAUDE.md template

Copy this into ./CLAUDE.md, fill in what applies and delete the rest. The sections follow the “Include” column above.

# <Project name>

<One line: what it is and the main stack.>

## Commands
- Build:
- Test (one file):
- Lint and typecheck:

## Code style
- <Only rules that differ from the language's defaults>

## Architecture
- <Decisions Claude cannot see in the code, and why>

## Workflow
- <Branch naming, commit and PR conventions>

## Gotchas
- <Required env vars, generated files, things that break quietly>

What CLAUDE.md is not for

CLAUDE.md is a short file that loads in full every session, and it lives in one repository or in one home directory. That makes it and auto memory a poor fit for some knowledge:

A shared wiki fits here. Dexio is a hosted wiki for AI agents: Claude Code and your other agents list, read, search, write, edit, move and link markdown pages over MCP, and you see the link graph and broken links at https://app.dexio.wiki. It is free for one person.

Keep CLAUDE.md short and point it at the wiki. Add a section like this to ~/.claude/CLAUDE.md for every project, or to a project’s CLAUDE.md if your whole team uses the wiki:

## Dexio wiki
- Keep notes in the Dexio wiki.
- Before you work on a topic, search the wiki with `search_pages` and read what is there.
- When you work out something that will be needed again, write it down.
  Update the page that exists instead of adding a duplicate.
- Pass the `base_version` from `read_page` when you change a page.
- Put "Claude Code" in the `agent` field on every change.

base_version stops one agent from overwriting another’s edit, and the agent field lets page_history show which agent wrote what. To connect, send Claude Code this message:

Connect yourself to my Dexio wiki. Read the steps with curl -s https://dexio.wiki/agents.md and follow them.

The Claude Code memory guide walks through setup and troubleshooting. For the same wiki in other agents, see the guides for Codex, Cursor, Hermes and OpenClaw, or read how an LLM wiki grows from linked pages. All guides are at https://dexio.wiki/guides.

Sources

Ask a question

Ask anything about Dexio.

About
We reply by email.