nrzz

Claude Relocate — Development skill for Claude Code

Development community

Move Claude Code's config folder to another drive or into the XDG folders, safely: settings, sessions, the plugin cache and .claude.json move together, CLAUDE_CONFIG_DIR is set to match, and undo puts.

How to install Claude Relocate

This entry records only its repository, not the path inside it, so there is no exact command to give. Open nrzz/claude-relocate and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Relocate does

Move Claude Code's config folder to another drive or into the XDG folders, safely: settings, sessions, the plugin cache and .claude.json move together, CLAUDE_CONFIG_DIR is set to match, and undo puts everything back. Zero tokens.

Alternatives in Development

  • Check 1: Cache Exists? — CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}" CACHE_EXISTS=$(ls -d "$CLAUDE_DIR/plugins/cache/claude-hud" 2 10.9k ★
  • Ccundo — Integrates seamlessly with Claude Code to provide granular undo functionality by reading directly from Claude 1.4k ★
  • Free My Tv — A fast, ad-free home screen for Google TV 770 ★

README

claude-relocate

[![test](https://github.com/nrzz/claude-relocate/actions/workflows/test.yml/badge.svg)](https://github.com/nrzz/claude-relocate/actions/workflows/test.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) ![node >= 18](https://img.shields.io/badge/node-%3E%3D18-339933.svg) ![dependencies: none](https://img.shields.io/badge/dependencies-none-brightgreen.svg) [![part of the Claude Code toolkit](https://img.shields.io/badge/Claude%20Code-toolkit-d97757.svg)](https://github.com/nrzz/claude-code-toolkit)

Claude Code keeps its settings, sessions, plugin cache and `.claude.json` in your home folder, and the folder grows. [anthropics/claude-code#1455](https://github.com/anthropics/claude-code/issues/1455) (Claude Code does not respect the XDG Base Directory specification, 460 reactions on 2026-10-16) and [#2350](https://github.com/anthropics/claude-code/issues/2350) ask for the XDG folders. [#57998](https://github.com/anthropics/claude-code/issues/57998) asks for a way to move the desktop app's own folder on Windows when the C: drive is full. [#30538](https://github.com/anthropics/claude-code/issues/30538) reports that the VS Code extension ignores `CLAUDE_CONFIG_DIR`. That variable exists, but moving by hand means copying a folder, setting the variable in every shell, and finding out afterwards what broke. claude-relocate does the move with a plan before it and an undo after it. It shows what is in the folder and how big each kind is, moves it to another drive or into the XDG folders, keeps file times, sets `CLAUDE_CONFIG_DIR` in your shell profiles and the Windows user environment, can leave a junction or link at the old place for programs that ignore the variable, refuses while Claude Code is running, checks the result, and puts everything back on request. It is a plain Node program that runs outside Claude, so it costs no tokens. It cannot move the desktop app's own `%APPDATA%\Claude` folder (#57998); [How it works](#how-