- Home
- Skills
- Code Quality & Review
- Git Agent Lock — Part 2: Pre-Commit Staging & Conflict Guard
More screenshots
Works with the AI Agents you already use
Git Agent Lock — Part 2: Pre-Commit Staging & Conflict Guard
Pre-commit staging audit intercepting merge conflict markers, credentials, .env files, and corrupted Git index states.
Free
Git Agent Lock — Part 2: Pre-Commit Staging & Conflict Guard
Example session with this skill installed
Audit staged files before committing and check for merge conflict markers and secrets.
- Read your context and instructions
- Compiled the git agent lock
================================================================
🛡️ GIT STAGING GUARD — Pre-Commit Audit (v1.0.0)
Staging Status: 🔴 FAILED
Staged Files Count: 3
🔴 [CRITICAL] src/payments/stripe.py: Unresolved Git merge conflict markers (<<<<<<<, =======, >>>>>>>) detected in staged file!
🔴 [CRITICAL] .env: Attempting to stage sensitive credential file (.env/ssh key/certificate) into Git!
⛔ Commit blocked. Resolve merge conflicts in 'src/payments/stripe.py' and unstage '.env' before proceeding.
Connects securely to your tools. The creator never sees your data.
About this skill
Git Agent Lock — Part 2: Pre-Commit Staging & Conflict Auditor
Autonomous coding agents (Claude Code, Cursor, Windsurf, Antigravity) are infamous for staging unmerged conflict markers (<<<<<<<, =======, >>>>>>>) or accidentally committing sensitive .env configuration files directly to remote repositories.
Git Agent Lock Part 2 acts as an automated, local pre-commit gate that audits your staged Git index before any commit can occur.
⚡ Key Capabilities:
- Conflict Marker Detection: Scans all staged text files for unresolved Git conflict markers, blocking accidental broken commits.
- Credential & Secret Protection: Intercepts
.env, SSH private keys (id_rsa,id_ed25519), certificates, and keyfiles from entering Git history. - 1-Click Pre-Commit Hook: Easily provisions
.git/hooks/pre-committo safeguard your workspace permanently. - JSON & CLI Modes: Ideal for CI pipelines, agent verification steps, and developer pair-programming.
📦 What's Included:
scripts/git_staging_guard.py— Staging auditor and hook managerscripts/test_git_staging_guard.py— Automated unit test suite (100% pass)references/git_staging_guard_guide.md— In-depth staging safety policies- Universal
SKILL.md— Lean Core architecture (< 40 lines)
🚀 Upgrade Path to Git Agent Lock Pro Suite:
Part 2 focuses on pre-commit staging security. For atomic file locks, dynamic worktrees, and causal forensics integration, check out the Git Agent Lock Pro Suite ($29) on Agensi.
🔒 100% Local-First & Zero Telemetry
Runs 100% locally on your machine via standard Git and Python. Zero network calls, zero tracking.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Requires local Python 3 installation. Does not scan git history, only current staged changes.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 16 days ago
- Free with an Agensi account
- Software
Git
Python 3
Permissions
Inspects local git staging index and provisions local pre-commit hook with zero cloud network calls.