Backup Before Edit

Claude Code Hook · pre-tool

backup-before-edit एक Claude Code hook है जो किसी भी फ़ाइल को edit करने से पहले उसका timestamped backup बनाता है, जिससे आप गलती पर आसानी से पुरानी version वापस पा सकते हैं। यह developers और students के लिए सुरक्षा प्रदान करता है।

Create automatic backup of files before any Edit operation for safety. This hook creates a timestamped backup copy (filename.backup.timestamp) of any existing file before Claude modifies it. Provides a safety net to recover previous versions if needed. Only backs up existing files, includes error suppression to handle edge cases gracefully.

Install

npx claude-code-templates@latest --hook pre-tool/backup-before-edit

View on GitHub