원클릭으로
chezmoi-undo
Restore files from a chezmoi backup
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Restore files from a chezmoi backup
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create timestamped backup of files that would be changed by chezmoi
Comprehensive chezmoi and dotfiles status overview
Analyze chezmoi changes and create safe integration plan
Safely review and process unmanaged chezmoi files
Log significant Claude Code actions to Obsidian vault. Invoke after completing features, bug fixes, refactors, deployments, cleanups, or any substantial task.
Use when unbiased analysis is needed without conversation context contamination. Launches an isolated read-only background agent with a self-contained prompt crafted from current context. Use for audits, reviews, reports, or any analysis where prior assumptions might bias results.
| name | chezmoi-undo |
| description | Restore files from a chezmoi backup |
!ls -la ~/.chezmoi-backups/ | grep -E '^d' | grep -v '\.$' | grep -v 'latest' | sort -r | head -10 | awk '{print $9 " - Created: " $6 " " $7 " " $8}'
!readlink ~/.chezmoi-backups/latest 2>/dev/null | xargs basename 2>/dev/null || echo "No backups available"
Show backup information:
Confirm restoration:
Restore files:
Post-restore advice:
chezmoi diff to see current state<restore_process> Based on user input (${ARGUMENTS} or latest):
Validate backup exists:
BACKUP="${ARGUMENTS:-latest}"
if [[ "$BACKUP" == "latest" ]]; then
BACKUP_DIR="$HOME/.chezmoi-backups/latest"
else
BACKUP_DIR="$HOME/.chezmoi-backups/$BACKUP"
fi
if [[ ! -d "$BACKUP_DIR" ]]; then
echo "Backup not found: $BACKUP"
exit 1
fi
Show backup information:
Confirm restoration:
This will restore [X] files from backup [timestamp]:
- .zshrc
- .gitconfig
- [etc...]
Current versions of these files will be overwritten!
Proceed with restoration? [y/N]:
Restore files:
# For each file in manifest
cp -p "$BACKUP_DIR/files/.example" "$HOME/.example"
Report results:
<output_format>
Backup ID: [timestamp] Created: [human-readable date] Files in backup: [count]
Successfully restored [X] files:
chezmoi diff to see current differences/chezmoi-status for overviewchezmoi apply
</output_format><error_handling> Handle these scenarios:
No backups exist:
No backups found in ~/.chezmoi-backups/
To create a backup, run: /chezmoi-backup
Backup not found:
Backup '[timestamp]' not found.
Available backups:
[list recent backups]
Permission errors:
File conflicts:
<interactive_mode> If user wants to select specific files:
Select files to restore:
[1] .zshrc
[2] .gitconfig
[3] .bashrc
[A] All files
[C] Cancel
Enter choices (e.g., 1,3 or A):
</interactive_mode>