michelbr84

Pre Commit — Git skill for Claude Code

Git community

Run pre-commit validation before pushing GarraRUST changes.

How to install Pre Commit

Installs to ~/.claude/skills/michelbr84-garrarust-pre-commit/SKILL.md

Terminal
mkdir -p ~/.claude/skills/michelbr84-garrarust-pre-commit && curl -fsSL https://raw.githubusercontent.com/michelbr84/GarraRUST/HEAD/skills/pre-commit.md -o ~/.claude/skills/michelbr84-garrarust-pre-commit/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Pre Commit does

Run pre-commit validation before pushing GarraRUST changes.

Steps:

  1. git diff --cached --name-only — lista arquivos staged
  2. Segredos — busca por padrões perigosos nos arquivos staged:
    • GARRAIA_JWT_SECRET, ANTHROPIC_API_KEY, OPENAI_API_KEY, .env commitado
    • Se encontrar: BLOQUEIO — desstagie antes de continuar
  3. Debug artifacts — busca por dbg!, println!, console.log, print( em código Rust/Dart staged
  4. Arquivos grandes — avisa se algum arquivo staged >

Alternatives in Git

  • Gen Commit Msg — Generate intelligent commit messages based on staged changes 5.7k ★
  • Linting — Run rm -rf .mypy_cache && pre-commit run --all-files and fix the issues 3.1k ★
  • Prepare Commit — Comment out inappropriate logging before commit 1.6k ★

Full documentation available on GitHub

View Source Repository