0PricingLogin
Claude Architect · Lesson

The @path Import Syntax

Modularize with @./standards/coding-style.md references.

Why Modularize CLAUDE.md

A single, ever-growing CLAUDE.md becomes hard to read and burns context tokens on every turn. The @path import syntax lets you split rules into focused files and pull them in by reference.

Instead of pasting 400 lines of coding standards directly, you write one line that imports them. The result: a lean top-level file that stays readable while the details live in dedicated, reusable modules.

The Basic Import

An import is just a line beginning with @ followed by a path. When Claude Code loads your CLAUDE.md, it inlines the referenced file's contents at that point.

Use a relative path from the file doing the importing. The example below pulls a shared coding-style module into the project memory.

# CLAUDE.md

## Project Standards

@./standards/coding-style.md
@./standards/testing.md

All lessons in this course

  1. User / Project / Directory Levels
  2. The @path Import Syntax
  3. .claude/rules/ with Frontmatter Paths
  4. Monolith vs Modular Rules
← Back to Claude Architect