git-guardrails-claude-code
Enforces safe Git workflows and prevents destructive actions.
Install
mkdir -p .claude/skills/git-guardrails-claude-code && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13133" && unzip -o skill.zip -d .claude/skills/git-guardrails-claude-code && rm skill.zipInstalls to .claude/skills/git-guardrails-claude-code
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Aplica guardrails de Git para evitar operações destrutivas e garantir commits seguros, rastreáveis e mínimos durante execução por agentes.Key capabilities
- →Verify current Git status
- →Define explicit scope for commits
- →Prohibit destructive Git commands without authorization
- →Resolve merge/rebase conflicts safely
- →Enforce small, cohesive, and traceable commits
- →Confirm correct branch/remote before pushing
How it works
The skill executes Git operations by first checking the repository status, then locking the scope of changes, performing safety checks against destructive commands, and enforcing commit and push discipline.
Inputs & outputs
When to use git-guardrails-claude-code
- →Protecting Git flows
- →Ensuring safe commits
- →Avoiding hard resets
About this skill
Skill: Git Guardrails (Claude Code)
Mission
Executar operações Git com segurança operacional, minimizando risco de perda de trabalho e evitando alterações fora de escopo.
When to use
- Antes de
add/commit/pushem mudanças relevantes. - Ao resolver conflitos, rebase ou merge manual.
- Em repositórios com worktree suja ou alterações paralelas de outros agentes.
Inputs mínimos
- Escopo aprovado da mudança.
- Repositório e branch alvo.
- Lista de arquivos esperados para commit.
- Regras do time para convenção de commit e publicação.
Execution protocol
- Preflight status
- Verificar estado atual (
git status --short, branch ativa). - Detectar alterações fora do escopo solicitado.
- Scope lock
- Definir explicitamente quais arquivos entram no commit.
- Excluir arquivos incidentais ou temporários não aprovados.
- Safety checks
- Proibir comandos destrutivos sem autorização explícita:
git reset --hardgit checkout -- <file>- reescrita de histórico em branch compartilhada
- Se necessário, solicitar gate humano antes da ação.
- Conflict handling
- Em conflito de merge/rebase:
- preservar mudanças válidas locais
- resolver por menor dif correto
- revalidar arquivos resolvidos
- Não remover alterações do usuário sem autorização.
- Commit discipline
- Commit pequeno, coeso e rastreável.
- Mensagem no padrão do projeto (ex.:
feat:,fix:,docs:,chore:). - Incluir apenas arquivos do escopo travado.
- Push discipline
- Confirmar branch/remoto corretos antes do push.
- Evitar
--forcesem aprovação humana formal.
- Post-push verification
- Registrar hash e range publicado.
- Confirmar estado local limpo para o escopo tratado.
Davi governance gates
- Toda ação destrutiva exige aprovação humana explícita.
- Conflito entre mudanças de usuário e agente deve pausar para decisão humana.
- Se houver risco de escopo excedido, bloquear e revalidar com refinadores.
Output obrigatório
- Status:
ready|blocked|completed - Branch/remoto alvo
- Arquivos incluídos no commit
- Comandos Git executados
- Hash(es) gerados/publicados
- Riscos/pendências identificados
Quality rules
- Nunca usar atalho destrutivo por conveniência.
- Commits devem ser mínimos e semanticamente consistentes.
- Push deve preservar histórico seguro por padrão.
- Toda exceção de guardrail deve ser documentada.
When not to use it
- →When performing Git operations that are not relevant to add/commit/push
- →When the user explicitly authorizes destructive commands
- →When the repository does not require strict commit hygiene
Limitations
- →Destructive commands like `git reset --hard` are prohibited without explicit authorization.
- →Rewriting history on shared branches is prohibited.
- →The skill requires human approval for any destructive action or conflict between user and agent changes.
How it compares
This skill applies a structured protocol with explicit safety checks and governance gates to Git operations, preventing destructive actions and ensuring commit hygiene, unlike manual Git usage.
Compared to similar skills
git-guardrails-claude-code side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| git-guardrails-claude-code (this skill) | 0 | 2mo | No flags | Intermediate |
| proxychains | 0 | 8mo | Review | Intermediate |
| secrets-sync | 0 | 3mo | Review | Intermediate |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jadergreiner
View all by jadergreiner →You might also like
proxychains
2025Emma
Auto-detect network issues and force proxy usage with proxychains4. Use this skill when encountering connection timeouts, DNS failures, or blocked network access. Default proxy is http://127.0.0.1:9910
secrets-sync
SymbionicNigel
Use when the user adds, edits, lists, or applies chezmoi-managed secrets; syncs Bitwarden sessions; runs GPG encryption on project files; or works with the .secrets submodule. Also use when troubleshooting chezmoi config path issues in this repository.
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
openspec-onboard
studyzy
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
codex-cli-bridge
alirezarezvani
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
skill-sync
KyleKing
Syncs Claude Skills with other AI coding tools like Cursor, Copilot, and Codeium by creating cross-references and shared knowledge bases. Invoke when user wants to leverage skills across multiple tools or create unified AI context.