Claude Git Reset — Git skill for Claude Code
Claude Code hook to block destructive git commands (reset --hard, force push, etc.
How to install Claude Git Reset
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open zcaceres/claude-git-reset and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Git Reset does
Claude Code hook to block destructive git commands (reset --hard, force push, etc.)
Alternatives in Git
- Ws Reset — Reset the current branch to main, fetch upstream, and update submodules 38.1k ★
- Worktree Deliver — Commit all work, push, and create a pull request from the current worktree 23.4k ★
- Yeet — Stage, commit, push code, and open a GitHub pull request via CLI 14.6k ★
README
claude-git-reset — archived
[!IMPORTANT] **Moved to the skills collection:** [`zcaceres/skills`](https://github.com/zcaceres/skills)
New home: [`skills/safety-git-reset-guard`](https://github.com/zcaceres/skills/tree/main/skills/safety-git-reset-guard)
**This repo is archived.** The hook has moved into [`zcaceres/skills`](https://github.com/zcaceres/skills) as the `safety-git-reset-guard` skill, with pre-built binaries (no `bun` runtime dependency on the host) and a self-wiring install script.
New home
- Skill: `zcaceres/skills/skills/safety-git-reset-guard`
- Install:
npx skills add zcaceres/skills -s safety-git-reset-guard -g ~/.claude/skills/safety-git-reset-guard/scripts/install.sh - The second step wires the PreToolUse:Bash hook into
~/.claude/settings.jsonwith a timestamped backup. Idempotent — re-running is a no-op.
Why the move
This repo shipped a TypeScript hook that required `bun` on every host and a manual settings.json patch. The skills-repo version:
- Ships pre-built binaries per OS/arch in
scripts/bin/, dispatched byscripts/run.sh— nobuninstall required for end users. - Bundles a
scripts/install.shthat handles the settings.json wiring idempotently with backups. - Lives next to the other safety hooks (
safety-rm-rf-guard,safety-dotenv-guard,safety-op-creds) for one consistent install path.
Same blocked / allowed pattern set as documented previously, same caveat: this is one layer of defense, not a sandbox.
Migrating from this repo
If you previously wired the hook from `/path/to/claude-git-reset/src/index.ts`:
- Remove that entry from
.claude/settings.json(it's a one-line PreToolUse command hook). Keep a backup first. - Run the two install commands above.
The skills-repo install drops a pointer into the same `PreToolUse:Bash` slot.
Related Skills
Aegis Approval Gate
PreToolUse hook that blocks destructive Bash ops (rm -rf, git push --force, DROP TABLE, etc.) until an active
Add Reasoning To PRs
Claude Code hook that writes a forward-only why-block (decisions, trade-offs, assumptions, limitations) into y
Setup Tag Rulesets
Walkthrough: Protect release tags from force-push attacks with GitHub rulesets
Push And Release
Git pull, resolve conflicts, push, fix hook errors, then release
Grant Push
Grant consent for Claude to run git push. Valid for 5 minutes. Required by the Git Commit Guard hook on protec
Esprit
Claude Code plugin: a conduct layer for autonomous agents. A PreToolUse hook refuses a spend, deletion or git
Related Agents
GitHub Keeper
Gestiona el repo de git/GitHub. Úsalo para commits, branches, resolver conflictos, limpiar historial, manejar
Merger
Reviews, validates, and merges arc-agents PRs. Sole authority for destructive git ops (rebase, push, merge, br
Fpm Sync
___pm(prj1) ↔ fpm(prj7, ~/_git/all/fpm) 동기화 에이전트. 기본은 _pm→fpm 단방향 복사·커밋. "fpm 동기화/반영/업데이트" 요청 시 forward, "fpm