Receber por email
← Voltar para o catálogo

git-guardrails-claude-code

Set up Claude Code hooks to block dangerous git commands (force push, reset --hard, clean, force-delete branches, etc.) before they execute, while still allowing safe everyday operations like pushing branches from worktrees and cleaning up branches whose remote was deleted. Use when user wants to prevent destructive git operations, add git safety hooks, or block dangerous git in Claude Code.

3estrelas
Atualizado há 6 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add mesqueeb/moonjelly-reef

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/git-guardrails-claude-code-mesqueeb/svg)](https://www.skillteca.com.br/skills/git-guardrails-claude-code-mesqueeb)

Skills relacionadas

Ver todas de Desenvolvimento →

Alerta por categoria

Receba novas skills de Desenvolvimento toda segunda

1 email curto, só com as skills novas de Desenvolvimento. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Setup Git Guardrails

Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them — without getting in the way of normal target-branch workflows.

Always blocked, everywhere:

  • git reset --hard
  • git clean -f / git clean -fd
  • git checkout . / git restore .
  • git push --force / git push -f

Context-aware:

  • git push — if at least one worktree exists, pushing from the main checkout is blocked (agents are kept in their worktre

[Description truncada. Veja o README completo no GitHub.]

Compartilhar X LinkedIn