A template for storing your PAI personal data in a separate, version-controlled repository.
PAI stores personal data in several directories within ~/.claude/. When PAI updates, these could be overwritten or cause merge conflicts. By storing your data in a separate repo and symlinking back, you get:
- Update safety - PAI updates never touch your data
- Version control - Full git history of your learnings and configurations
- Backup - Push to your private GitHub repo
- Portability - Clone to any machine, run setup, done
This template uses symlinks to keep your data in this repo while PAI sees it in its expected locations:
Your Repo (source of truth) PAI Directory (symlinks)
======================== ====================
~/my-pai-data/MEMORY/ <----- ~/.claude/MEMORY
~/my-pai-data/USER/ <----- ~/.claude/USER
~/my-pai-data/WORK/ <----- ~/.claude/WORK
~/my-pai-data/CORE_USER/ <----- ~/.claude/skills/CORE/USER
~/my-pai-data/skills/_FOO/ <----- ~/.claude/skills/_FOO
# 1. Clone this template
git clone https://github.com/ecielam/pai-personal-data.git ~/my-pai-data
cd ~/my-pai-data
# 2. Run setup (creates symlinks)
./setup.sh
# 3. Set your remote to your own PRIVATE repo
git remote set-url origin git@github.com:YOUR_USERNAME/YOUR_PRIVATE_REPO.git
git push -u origin mainyour-pai-data/
├── README.md # This file
├── setup.sh # One-command setup script
├── link_skills.sh # Helper to symlink personal skills
├── .gitignore.template # Template (copied to .gitignore on first run)
│
├── MEMORY/ # Learning, research, session history
│ └── .gitkeep
│
├── USER/ # Personal configuration overrides
│ └── .gitkeep
│
├── WORK/ # Active work sessions
│ └── .gitkeep
│
├── CORE_USER/ # CORE skill user overrides
│ └── .gitkeep
│
└── skills/ # Personal skills (_ALLCAPS naming)
└── .gitkeep
Everything PAI learns and remembers:
| Subdirectory | Contents |
|---|---|
LEARNINGS/ |
Patterns and insights from sessions |
PAISYSTEMUPDATES/ |
Session documentation and changelogs |
RESEARCH/ |
Archived research and investigations |
SIGNALS/ |
Rating and sentiment data |
Your customizations that override PAI system defaults:
| File | Purpose |
|---|---|
ASSETMANAGEMENT.md |
Your websites, domains, deployment methods |
CONTACTS.md |
Contact directory |
DAIDENTITY.md |
AI personality customization |
TECHSTACKPREFERENCES.md |
Preferred technologies and tools |
PAISECURITYSYSTEM/ |
Personal security patterns |
Scratch space for ongoing work. Contains scratch/ subdirectory for temporary files (git-ignored).
The CORE skill auto-loads at every session start. This directory contains your personal overrides:
| Subdirectory | Contents |
|---|---|
TELOS/ |
Your goals, projects, life direction documents |
RESPONSEFORMAT.md |
Custom response format preferences |
Other .md files |
Any CORE-level customizations |
Important: If you already have content in ~/.claude/skills/CORE/USER, you must move it here manually before running setup.
Personal skills use the _ALLCAPS naming convention (e.g., _BLOGGING, _MYWORKFLOW). These are private and never sync to the public PAI repo.
To add a personal skill:
- Create a directory:
skills/_MYSKILL/ - Add at minimum:
skills/_MYSKILL/SKILL.md - Run
./link_skills.shor./setup.sh
If you already have PAI data, follow these steps to migrate:
git clone https://github.com/ecielam/pai-personal-data.git ~/my-pai-data
cd ~/my-pai-data# Move main directories (setup.sh handles this automatically with backups)
# But for CORE_USER, you must do it manually:
# Check if you have existing CORE/USER data
ls ~/.claude/skills/CORE/USER
# If it exists and has content, move it:
mv ~/.claude/skills/CORE/USER/* ~/my-pai-data/CORE_USER/
rmdir ~/.claude/skills/CORE/USER
# For personal skills, move them too:
mv ~/.claude/skills/_MYSKILL ~/my-pai-data/skills/./setup.shThe setup script will:
- Create any missing directories
- Backup existing PAI directories (MEMORY, USER, WORK)
- Create symlinks pointing back to this repo
- Link CORE_USER if the PAI location is empty
- Link any personal skills in
skills/
# Check symlinks are correct
ls -la ~/.claude/ | grep -E "MEMORY|USER|WORK"
ls -la ~/.claude/skills/CORE/
# Check skills are linked
ls -la ~/.claude/skills/ | grep "^l"| Variable | Default | Description |
|---|---|---|
PAI_DIR |
~/.claude |
PAI installation directory |
This repository contains personal data. Keep it private.
- Make your GitHub repo private
- Review commits before pushing - check for accidental secrets
- The
.gitignoreexcludes common secret patterns - Never commit API keys, credentials, or tokens
- CORE_USER may contain personal goals and life information
The .gitignore.template excludes:
.envfiles and credentialsscratch/directories (temporary files)node_modules/in skills- Common secret file patterns
cd ~/my-pai-data
git add -A
git commit -m "Session update: $(date +%Y-%m-%d)"
git pushgit clone git@github.com:YOU/your-pai-data.git ~/my-pai-data
cd ~/my-pai-data
./setup.shcd ~/my-pai-data
mkdir -p skills/_NEWSKILL
cat > skills/_NEWSKILL/SKILL.md << 'EOF'
---
name: _NEWSKILL
description: Description of what this skill does
---
# _NEWSKILL
Your skill documentation here.
EOF
# Link it
./link_skills.sh# Verify symlinks exist
ls -la ~/.claude/ | grep -E "MEMORY|USER|WORK"
# Re-run setup
./setup.shIf setup.sh shows a warning about existing CORE_USER directory:
# Move your existing data first
mv ~/.claude/skills/CORE/USER/* ~/my-pai-data/CORE_USER/
rmdir ~/.claude/skills/CORE/USER
# Then re-run setup
./setup.sh# Check skills directory has actual skill folders
ls -la skills/
# Make sure link_skills.sh is executable
chmod +x link_skills.sh
# Run it directly
./link_skills.sh# Check PAI_DIR matches your installation
echo $PAI_DIR # Should be ~/.claude or your custom path
# Verify the symlinks resolve correctly
realpath ~/.claude/MEMORY
realpath ~/.claude/USER┌─────────────────────────────────────────────────────────────────────┐
│ Your Personal Data Repo │
│ ~/my-pai-data/ │
├─────────────────────────────────────────────────────────────────────┤
│ MEMORY/ USER/ WORK/ │
│ CORE_USER/ skills/_FOO/ skills/_BAR/ │
└────────┬─────────────┬──────────────┬──────────────────────────────┘
│ │ │
│ symlinks │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────────┐
│ PAI (~/.claude/) │
├─────────────────────────────────────────────────────────────────────┤
│ MEMORY → ../my-pai-data/MEMORY │
│ USER → ../my-pai-data/USER │
│ WORK → ../my-pai-data/WORK │
│ skills/ │
│ ├── CORE/ │
│ │ └── USER → ../../../my-pai-data/CORE_USER │
│ ├── _FOO → ../../my-pai-data/skills/_FOO │
│ └── _BAR → ../../my-pai-data/skills/_BAR │
└─────────────────────────────────────────────────────────────────────┘
Template for PAI (Personal AI Infrastructure)