PulseAugur
EN
LIVE 15:44:09

Claude Code: Understanding @ import rules for CLAUDE.md files

This article explains four key rules governing how `@` imports function within CLAUDE.md files, particularly in the context of Claude Code. It details how relative paths are resolved from the importing file, not the working directory, and how import recursion is limited to four levels. The piece also highlights that backticks disable import parsing, and external imports require explicit user approval, which, if declined once, permanently disables them for that project. These rules are crucial for understanding why imported files might not load as expected, especially in complex setups like monorepos or when using git worktrees. AI

IMPACT Clarifies how to effectively use CLAUDE.md imports for better organization and context management in Claude Code.

RANK_REASON Article explains usage and behavior of a specific feature within a software product.

Read on dev.to — Claude Code tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Claude Code: Understanding @ import rules for CLAUDE.md files

COVERAGE [1]

  1. dev.to — Claude Code tag TIER_1 English(EN) · Rulestack ·

    CLAUDE.md @-imports: how paths resolve, how deep they go, and why yours silently did not load

    <p>You split a long <code>CLAUDE.md</code> into pieces and pulled them back in with <code>@</code> imports. Now half of it doesn't seem to reach Claude, and nothing tells you which half.</p> <p>Four rules in the import mechanism explain almost every case of this. None of them pro…