Claude Code HookDevelopment Tools100 installs

File Backup

Automatically backup files before editing. Creates timestamped backups in a .backups directory when files are modified.

Install with the Claude Code Templates CLI
$ npx claude-code-templates@latest --hook="development-tools/file-backup" --yes

Requires Claude Code. The command adds this hook to your project's .claudedirectory — nothing runs on ToolZip's servers.

What's inside this hook

Component source

{

"description": "Automatically backup files before editing. Creates timestamped backups in a .backups directory when files are modified.",

"hooks": {

"PreToolUse": [

{

"matcher": "Edit|MultiEdit",

"hooks": [

{

"type": "command",

"command": "if [[ -n \"$CLAUDE_TOOL_FILE_PATH\" && -f \"$CLAUDE_TOOL_FILE_PATH\" ]]; then mkdir -p .backups && cp \"$CLAUDE_TOOL_FILE_PATH\" \".backups/$(basename \"$CLAUDE_TOOL_FILE_PATH\").$(date +%Y%m%d_%H%M%S).bak\"; fi"

}

]

}

]

}

}

Type
Hook
Category
Development Tools
Installs
100
Source
GitHub ↗

Related Claude Code Hooks

HookDevelopment Tools

Smart Formatting

Smart code formatting based on file type. Automatically formats code using Prettier, Black, gofmt, rustfmt, and other language-specific formatters.

326 installsView →
HookDevelopment Tools

Lint On Save

Automatically run linting tools after file modifications. Supports ESLint for JavaScript/TypeScript, Pylint for Python, and RuboCop for Ruby.

324 installsView →
HookDevelopment Tools

Nextjs Code Quality Enforcer

Enforce Next.js best practices, proper file structure, component patterns, and TypeScript usage with automated code reviews and suggestions. Validates Next.js App Router conventions, Server/Client component patterns, proper imports, and TypeScript usage. Provides real-time feedback on code quality and adherence to Next.js best practices.

233 installsView →
HookDevelopment Tools

Change Tracker

Track file changes in a simple log. Records which files were modified and when for easy tracking of Claude Code activity.

163 installsView →
HookDevelopment Tools

Command Logger

Log all Claude Code commands to a file for audit and debugging purposes. Simple logging that records tool usage with timestamps.

95 installsView →
HookDevelopment Tools

Worktree Ghostty

Worktree Ghostty Layout. Opens a 3-panel Ghostty layout when creating worktrees: Claude Code (left) | lazygit (top-right) / yazi (bottom-right). Creates worktrees in a sibling directory (../worktrees/<repo>/<name>/) and cleans up on removal. macOS only. Requires: jq, Ghostty terminal, lazygit, yazi. Ghostty keybindings required: super+d = new_split:right, super+shift+d = new_split:down.

19 installsView →

Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.