Reinstalling your Claude Code environment on a new machine A developer detailed how to rebuild a complete Claude Code environment on a new machine by leveraging files stored in the `~/.claude/` directory. The global `CLAUDE.md`, reference guides, custom commands, and statusline configurations all live in files that can be restored with a single prompt, provided the prompt was prepared in advance. The developer also shared a custom statusline script that displays real-time token consumption and context usage, which is available on GitHub. New machine. Install Claude Code. And then: Claude knows nothing. The development rules encoded in the global CLAUDE.md, the reference guides, the statusline displaying token consumption in real time, the plugins — all of it stayed on the old machine. The bad news: none of this syncs automatically. The good news: everything lives in files. A single prompt can rebuild the complete environment in minutes — provided you prepared that prompt in advance. The Claude Code global environment is concentrated in one folder: ~/.claude/ . What you'll find there: CLAUDE.md — global instructions: how to work, which rules apply across all projects settings.json — technical configuration: permissions, statusline, hooks hooks/ — scripts executed on Claude Code events commands/ — custom slash commands /audit-memory , etc. memory/ — global memories projects/