Use when setting up or organizing Claude Code project memory (CLAUDE.md, .claude/rules/) for better context awareness, consistent behavior, and project-specific instructions.
View on GitHubSelect agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/core/skills/project-memory/SKILL.md -a claude-code --skill project-memoryInstallation paths:
.claude/skills/project-memory/# Project Memory Skill
Set up and organize Claude Code's project memory system for consistent, context-aware assistance.
## Core Principle
**Project memory teaches Claude Code how to work with your specific codebase.** Well-organized project memory leads to more accurate, consistent, and helpful responses.
## Memory Hierarchy
Claude Code reads instructions in this order (higher = more precedence):
1. **Enterprise policy** (managed, highest)
2. **User memory** (`~/.claude/CLAUDE.md`)
3. **Project memory** (`CLAUDE.md` in project root)
4. **Modular rules** (`.claude/rules/*.md`)
5. **Local memory** (`CLAUDE.local.md`, gitignored)
Later sources override earlier ones for conflicting instructions.
## File Types
### CLAUDE.md (Project Root)
**Purpose:** Primary project instructions, conventions, and context
**Location:** Project root directory
**Visibility:** Checked into git, shared with team
**Contents:**
- Project overview and architecture
- Development commands (build, test, lint)
- Coding conventions and patterns
- Important constraints or requirements
- Links to key documentation
### .claude/rules/*.md
**Purpose:** Modular, path-specific rules
**Location:** `.claude/rules/` directory
**Visibility:** Checked into git
**Features:**
- Automatically loaded based on file path
- Supports subdirectories
- Can use YAML frontmatter with `globs` for path-specific targeting
### CLAUDE.local.md
**Purpose:** Personal, machine-specific instructions
**Location:** Project root directory
**Visibility:** Should be gitignored
**Use cases:**
- Personal preferences
- Local environment paths
- Machine-specific configurations
- Experimental instructions
## Setting Up Project Memory
### 1. Create CLAUDE.md
Start with essential project information:
```markdown
# Project Name
Brief description of what this project does.
## Development Commands
# Build
npm run build
# Test
npm test
# Lint
npm run lint
## Architecture
- `src/` - Sour