📚 Encyclopedia

AI & Claude · updated 2026-10-26

Backing up and restoring Claude Code configuration and memory

claude-codebackupconfigmemoryskillsgit

Claude Code keeps its state in several places: global settings, the MCP config in the home directory, skills, plugins, plans, and per-project memory and session transcripts. Justin backs all of it up to a git repo with three scripts and a /cfg skill, so a machine rebuild or a bad edit can be undone.

What lives where

Backup repo path Live path
global/settings.json ~/.claude/settings.json
global/settings.local.json ~/.claude/settings.local.json
global/claude.json ~/.claude.json (MCP servers; in HOME, not ~/.claude/)
skills/ ~/.claude/skills/
plugins/*.json ~/.claude/plugins/
plans/*.md ~/.claude/plans/
projects/<name>/memory/ ~/.claude/projects/<name>/memory/
projects/<name>/sessions/*.jsonl ~/.claude/projects/<name>/*.jsonl (flat at the project root)

Project directory names are the absolute path with every non-alphanumeric character replaced by - (/home/justin/dev/tldr becomes -home-justin-dev-tldr; a directory named with an emoji becomes several dashes).

The tooling

Gotchas

Finding a past conversation

With no memory notes to go on, grep -i <words> ~/.claude/history.jsonl lists every prompt typed into Claude Code with its project (working directory) and sessionId; then look in that directory for files the session wrote. The full transcripts under ~/.claude/projects/<dir>/*.jsonl may already have been cleaned up (a July 2026 freight-brokerage session survived only as the files it left in ~/dev/dad), which is why every project should save its own memory at the end of a session.

See also

Sources: home memory config-backup.md