create — Claude Code command: git stash checkpoint, how to install
create saves the current working tree as a git stash checkpoint and leaves every file where it is. Handy before a risky refactor.
MIT ★ 763 updated 2026-03-31
.claude/commands/create.mdWhat create does
/create snapshots your working state. Files stay in place, the index goes back to how it was, and the checkpoint lands in the stash list under a claude-checkpoint: message. Pass a description as an argument; without one the command stamps the current date and time as YYYY-MM-DD HH:MM:SS.
The steps are plain git. It stages everything with git add -A, runs git stash create, keeps the returned SHA through git stash store, then unstages with git reset. Only git stash, git add and git status are allowed, so nothing else in the repo gets touched.
Because of git add -A, every file in the working folder enters the checkpoint, untracked ones included. Build output or large binaries sitting around end up in the stash too. The command lives in .claude/commands/create.md.
What it helps with
- snapshot the working tree before a big refactor
- keep a restore point without committing anything
- label a checkpoint with a readable note
- leave the index clean after saving state
- save work mid-experiment and keep editing
Example prompts for the agent
- /create before the auth rewrite
- /create css fix before merge
- /create before migrating the schema
How to install create
Manually: put the files in place
.claude/commands/create.mdCall it with /create. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/create.mdCall it with /prompts:create. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/create.prompt.mdManually: put the files in place
.gemini/commands/create.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about create
How do I install create in Claude Code?
Drop the command file into .claude/commands/create.md. The /create slash command then works in that project.
What does create do?
It stores the current working tree as a git stash checkpoint while your files stay exactly as they are. A description is optional and becomes the stash message.
Does it change my working directory?
No. The stash object is built with git stash create and stored separately, so file contents and the index are left as they were.
Source text
create.md · MIT
--- description: Create a git stash checkpoint with optional description category: workflow allowed-tools: Bash(git stash:*), Bash(git add:*), Bash(git status:*) argument-hint: "[optional description]" --- ## Create a checkpoint Create a git stash checkpoint to save your current working state. ## Current status !`git status --short` ## Task Create a git stash checkpoint while keeping all current changes in the working directory. Steps: 1. If no description provided in $ARGUMENTS, use current timestamp as "YYYY-MM-DD HH:MM:SS" 2. Create a stash object without modifying the working directory: - First add all files temporarily: `git add -A` - Create the stash object: `git stash create "claude-checkpoint: $ARGUMENTS"` - This returns a commit SHA that we need to capture 3. Store the stash object in the stash list: - `git stash store -m "claude-checkpoint: $ARGUMENTS" <SHA>` 4. Reset the index to unstage files: `git reset` 5. Confirm the checkpoint was created and show what was saved Note: Using `git stash create` + `git stash store` creates a checkpoint without touching your working directory. Example: If user runs `/checkpoint before major refactor`, it creates a stash checkpoint while leaving all your files exactly as they are.
© carlrannaberg · MIT · carlrannaberg/claudekit