git-guard

Install per-machine git hooks and wip-based autosave to block trunk commits.

Updated Apr 28, 2026
One-click install
npx skills add https://github.com/ChazzCoin/claude-kit --skill git-guard-chazzcoin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-guard
Source: https://github.com/ChazzCoin/claude-kit/tree/main/kit/skills/git-guard
Command: npx skills add https://github.com/ChazzCoin/claude-kit --skill git-guard-chazzcoin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates safe git workflows by installing per-machine hooks and a wip-based autosave system that helps prevent lost work and unsafe trunk commits.

Core Features & Use Cases

  • Per-machine hooks: installs Claude Code and Git hooks to enforce safe operations across devices.
  • WIP autosave: automatically captures work-in-progress commits on session end or thresholds.
  • ** trunk protection & secret guard**: blocks direct pushes/commits to trunk and scans for secret-shaped files during autosave and commit.

Quick Start

Run a one-time setup to enable Git guard across your project by running bash .claude/skills/git-guard/git-guard.sh on.

Frequently Asked Questions about git-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent direct commits to the git trunk branch across multiple machines?

To prevent direct commits to the git trunk, you can install per-machine git hooks that block unsafe pushes and commits. This setup applies across multiple machines and repositories to enforce safe version control workflows.

How does WIP autosave work in automated git workflows?

WIP autosave in automated git workflows automatically captures work-in-progress commits at session end or when specific thresholds are met. This mechanism helps prevent lost work by creating recovery points without manual intervention.

Can I scan for secret-shaped files before committing changes in git?

You can scan for secret-shaped files before committing changes by using automated git hooks. During autosave and commit operations, the secret guard mechanism detects and prevents sensitive files from entering the version control system.

Do I need per-user configuration to enable automated git hooks?

Yes, enabling automated git hooks requires per-user configuration via settings.local.json. You must run a one-time setup script to install the standard git hooks and configure the Claude Code environment.

What is the best way to surface abandoned work at the start of a coding session?

The best way to surface abandoned work at session start is to use an automated git workflow system that checks repository status on launch. This process highlights uncommitted changes and WIP branches immediately upon initialization.

How do I manage the lifecycle of automated git safety hooks?

You manage the lifecycle of automated git safety hooks by using exposed on, off, and status commands. These commands allow you to activate the hooks, disable them temporarily, or check their current operational state.