Back to Skills

memory-reference

verified

Claude Code memory (CLAUDE.md) configuration reference. Use when setting up project memory, understanding memory hierarchy, or configuring persistent instructions.

View on GitHub

Marketplace

entropy-plugins

DuncanJurman/entropy-plugins

Plugin

claude-code-docs

Repository

DuncanJurman/entropy-plugins
1stars

claude-code-docs/skills/memory-reference/SKILL.md

Last Verified

January 22, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/DuncanJurman/entropy-plugins/blob/main/claude-code-docs/skills/memory-reference/SKILL.md -a claude-code --skill memory-reference

Installation paths:

Claude
.claude/skills/memory-reference/
Powered by add-skill CLI

Instructions

# Claude Code Memory Reference

Memory files (CLAUDE.md) provide persistent instructions that Claude loads every session.

## Memory Hierarchy (Priority Order)

| Priority | Location | Purpose | Shared With |
|----------|----------|---------|-------------|
| 1 (highest) | Enterprise policy | Organization rules | All users |
| 2 | `./CLAUDE.md` | Project instructions | Team via git |
| 3 | `./.claude/CLAUDE.md` | Alternative project location | Team via git |
| 4 | `./.claude/rules/*.md` | Modular project rules | Team via git |
| 5 | `~/.claude/CLAUDE.md` | Personal preferences | Just you |
| 6 | `./CLAUDE.local.md` | Personal project prefs | Just you (gitignored) |

## File Locations

```
/Library/Application Support/ClaudeCode/CLAUDE.md  # Enterprise (macOS)
./CLAUDE.md                                         # Project root
./.claude/CLAUDE.md                                 # Alternative project
./.claude/rules/*.md                                # Modular rules
~/.claude/CLAUDE.md                                 # User global
~/.claude/rules/*.md                                # User modular rules
./CLAUDE.local.md                                   # Project personal
```

## Basic CLAUDE.md

```markdown
# Project Instructions

## Code Style
- Use TypeScript for all new files
- Prefer functional components in React
- Use ESLint and Prettier for formatting

## Commands
- Build: `npm run build`
- Test: `npm test`
- Lint: `npm run lint`

## Architecture
- Components in `src/components/`
- API routes in `src/api/`
- Types in `src/types/`
```

## Importing Files

Use `@path/to/file` to import other files:

```markdown
# Project Memory

See @README.md for project overview.
See @package.json for available commands.

## Team Guidelines
@docs/guidelines.md

## Personal Preferences
@~/.claude/my-prefs.md
```

Import rules:
- Relative and absolute paths allowed
- Max depth: 5 hops
- Not evaluated in code blocks

## Modular Rules (.claude/rules/)

Organize rules by topic:

```

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4151 chars