Personal backup for my agentic coding setup.
This repo stores the config for:
- Claude Code (
~/.claude) - OpenCode (
~/.opencode)
Everything is versioned with Git so I can sync my setup across machines like dotfiles.
A clean AI coding setup works best when each layer has a distinct role: orchestration, context delivery, code execution, graph awareness, and quality control.
| Layer | Tooling | Primary Role |
|---|---|---|
| Session orchestration | gstack | Coordinates the coding environment and workflow scaffolding |
| Context compression | lean-ctx + Caveman plugin | Keeps prompts lean while preserving useful project state |
| Context retrieval | context7 | Supplies structured external or project context |
| Persistent memory | claude-mem | Stores and retrieves relevant observations across sessions |
| UI motion and polish | emilkowalski/skill | Improves animations, design, code quality, and UI performance |
| Frontend taste system | impeccable.style | Adds stronger frontend design judgment and higher-quality UI decisions |
| Reference-first anti-slop | tasteskill.dev | Forces reference-driven design choices before building UI |
| Semantic code search | ck | Local-first hybrid search to replace regular grep calls |
| Codebase mapping | Graphify | Builds relationship awareness across files and symbols |
| Quality gates | Posttool hooks + Ruff/ESLint | Enforces hygiene after generation or modification |
$HOME/dot-ai
├── .claude/ # mirror of ~/.claude
├── .opencode/ # mirror of ~/.opencode
├── scripts/
│ ├── backup.sh # one-shot backup script
│ └── restore.sh # one-shot restore script
The backup and restore scripts require:
- rsync — for syncing directories
- git — for version control
sudo pacman -S rsync gitsudo apt update && sudo apt install rsync gitsudo dnf install rsync git# rsync is pre-installed on macOS
brew install git # if not already installedsudo apt update && sudo apt install rsync git- Create the repo directory:
mkdir -p ~/dot-ai
cd ~/dot-ai
git init
git checkout -b main- Add the scripts (copy
backup.shandrestore.shinto~/dot-ai) and make them executable:
chmod +x ~/dot-ai/scripts/backup.sh
chmod +x ~/dot-ai/scripts/restore.sh- Run an initial backup:
~/dot-ai/scripts/backup.sh- Commit the initial state:
git add .
git commit -m "chore: initial Claude + OpenCode backup"-
Create a private repo called
dot-aion GitHub / GitLab. [web:34][web:38] -
Add it as a remote and push:
cd ~/dot-ai
git remote add origin git@github.com:<your-username>/dot-ai.git
git push -u origin mainNow this repo acts as your cloud backup and source of truth. [web:34][web:38]
Whenever you tweak Claude Code or OpenCode settings, skills, or agents:
~/dot-ai/scripts/backup.shThe script:
- Copies
~/.claudeinto~/dot-ai/.claude/ - Copies
~/.opencodeinto~/dot-ai/opencode/ - Commits any changes with a standard message
On a fresh machine:
git clone git@github.com:<your-username>/dot-ai.git ~/dot-ai
cd ~/dot-ai
./scripts/restore.shThe script:
- Pulls latest changes
- Restores
.claude/→~/.claude - Restores
.opencode/→~/.opencode
Then restart your editor / agents and you should have the same setup.
- Do not store API keys or secrets directly in these folders.
- Prefer
.envfiles, OS keychains, or a separate secrets manager.
- Prefer
- If you must store any config with tokens, add them to
.gitignorebefore committing. [web:38]
You can later add more agent configs:
- Add
cursor/,aider/, etc. directories - Update
backup.shandrestore.shto sync those folders too
This keeps all your agentic coding tools under one versioned umbrella.