Claude Code
Claude Code is Anthropic’s coding agent and
Marginal’s default. Its context lives in CLAUDE.md files and a .claude
folder, in the project and in your home directory. A project without a
CLAUDE.md gets its AGENTS.md read instead.
Select it in Settings ▸ AI ▸ Coding agent.
What Marginal lists
Section titled “What Marginal lists”| Section | In the workspace | In your home folder |
|---|---|---|
| CLAUDE.md | CLAUDE.md in the root and in any subfolder; CLAUDE.local.md beside it, badged local; .claude/CLAUDE.md. Where there is no CLAUDE.md: AGENTS.md and .claude/AGENTS.md instead, see below |
~/.claude/CLAUDE.md |
| RULES | .claude/rules/**/*.md |
~/.claude/rules/**/*.md |
| SKILLS | .claude/skills/*/SKILL.md |
~/.claude/skills/*/SKILL.md |
| AGENTS | .claude/agents/*.md |
~/.claude/agents/*.md |
| COMMANDS | .claude/commands/**/*.md |
~/.claude/commands/**/*.md |
CLAUDE_CONFIG_DIR, when set in the environment Marginal was launched from,
replaces ~/.claude as the home-folder location.
Skills and sub-agents are named by the name: in their front matter, and
show its description: as their second line. Rules keep their file name;
commands appear as /name, with a subfolder in front as /folder/name.
AGENTS.md where there is no CLAUDE.md
Section titled “AGENTS.md where there is no CLAUDE.md”Claude Code 2.1.277 and later read AGENTS.md, the file Codex, Cursor, and
other agents use, in a project that has no CLAUDE.md. Marginal lists the
files it would read, with Read in place of CLAUDE.md as their second line:
AGENTS.mdand.claude/AGENTS.mdat the root, when neither the root nor any folder above it has aCLAUDE.md,.claude/CLAUDE.md, orCLAUDE.local.md. Your~/.claude/CLAUDE.mddoes not count, and is listed alongside.AGENTS.mdin a subfolder that has none of those three files of its own. A subfolder with its ownCLAUDE.mdshows that one instead.
One of those files at the root, or in a folder above the workspace, turns
the fallback off everywhere, as it does in Claude Code. That includes a
CLAUDE.local.md added for your own notes. AGENTS.local.md,
AGENTS.override.md, and .agents/ are never read.
Claude Code’s Project instructions setting (/config) changes the rule.
Marginal follows it when it is set in ~/.claude/settings.json:
| Project instructions | What Marginal lists |
|---|---|
claude-md-or-agents-md, the default |
As above |
claude-md-and-agents-md |
Every AGENTS.md beside the CLAUDE.md files, with Read along with CLAUDE.md |
claude-md, managed-only |
No AGENTS.md |
managed-only also leaves the project’s CLAUDE.md files out, which
Marginal still lists. A value set in managed settings or with --settings
is not visible to Marginal, and neither is the built-in agents-md plugin
being turned off in /plugin. Marginal reads the setting whenever it scans
the workspace, so after changing it, open the folder again.
How Claude Code uses these files
Section titled “How Claude Code uses these files”- CLAUDE.md is loaded at the start of a session in this order: the
managed file,
~/.claude/CLAUDE.md, then the project’s files from the outermost parent down, each followed by itsCLAUDE.local.md. ACLAUDE.mdin a subfolder is loaded on demand, when Claude reads a file there.@pathlines import other files, up to four hops deep. - AGENTS.md, when it is read, loads the same way: the root’s and every
parent’s at the start, a subfolder’s when Claude reads a file there.
@pathimports work in it too. ACLAUDE.mdthat imports@AGENTS.mdstill works, and never loads the file twice. - Rules in
.claude/rulesare markdown with an optionalpaths:list of globs in the front matter. A rule withoutpaths:is loaded at the start; one withpaths:is loaded when a matching file is read. Subfolders and symlinks are followed. - Skills are folders holding a
SKILL.mdplus any supporting files. The front matter gives thename,description, and whether the skill can be invoked by you (/name), by Claude, or both. Custom commands in.claude/commandsare the older form of the same thing: still read, one/nameper file, but new work belongs in skills. - Sub-agents in
.claude/agentsare markdown with a front mattername,description, and options such astools,model, andmemory; the body is the sub-agent’s system prompt.
The project-level files take precedence over the ones in your home folder when a name clashes.
Not listed
Section titled “Not listed”.claude/settings.json, settings.local.json, and ~/.claude/settings.json
(including the hooks defined there), .mcp.json, output styles, workflows,
worktrees, plugins, the auto-memory folder under ~/.claude/projects, and
the managed paths under /Library/Application Support/ClaudeCode,
/etc/claude-code, or C:\Program Files\ClaudeCode.
Checked against the Claude Code documentation on 24 September 2026.