Agent skill
commit-sentinel
Master of Ceremonies for Git. Architect of High-Integrity Repositories. Expert in Git 3.0, Forensic Bisecting, and Interactive Rebasing.
Install this agent skill to your Project
npx add-skill https://github.com/YuniorGlez/gemini-elite-core/tree/main/skills/commit-sentinel
SKILL.md
🛡️ Skill: Commit Sentinel (v2.1.0)
Executive Summary
The commit-sentinel is the guardian of repository health and historical clarity. In 2026, where AI agents generate thousands of lines of code daily, the role of the sentinel is critical to prevent "History Pollution" and "Type Decay." This skill enforces a rigorous 4-step validation protocol, promotes surgical history sculpting via rebasing, and leverages automated hooks to ensure that only elite-level code reaches the main branch.
📋 Table of Contents
- The 4-Step Validation Protocol
- The "Do Not" List (Anti-Patterns)
- Conventional Commits 2026
- History Sculpting (Interactive Rebase)
- Forensic Validation (Git Bisect)
- Git 3.0 Readiness (SHA-256)
- Automated Hook Orchestration
- Reference Library
🛡️ The 4-Step Validation Protocol
Before every commit, the Sentinel MUST execute:
- Surgical Diff Review:
git diff --cachedto verify every line.- Filter: Remove all
console.log,TODO(unless planned), and debug artifacts.
- Filter: Remove all
- Strict Type Audit:
bun x tsc --noEmit(Mandatory).- Standard: ZERO type errors allowed in the entire workspace.
- Linter Enforcement:
bun run lint.- Standard: Adherence to the project's formatting and security rules.
- Logical Atomicity: Ensure the commit does exactly ONE thing.
- Check: If the diff covers multiple features/fixes, use
git add -pto split.
- Check: If the diff covers multiple features/fixes, use
🚫 The "Do Not" List (Anti-Patterns)
| Anti-Pattern | Why it fails in 2026 | Modern Alternative |
|---|---|---|
--no-verify |
Bypasses safety hooks. | Fix the underlying issue. |
git commit -m "update" |
Useless for forensics/AI context. | Use Conventional Commits. |
| Pushed Rebases | Breaks the team's local history. | Only rebase local branches. |
| Massive "Cleanup" Commits | Makes git bisect impossible. |
Use Atomic, Incremental Changes. |
| SHA-1 Assumptions | Security risk in modern Git. | Prepare for SHA-256 (Git 3.0). |
📝 Conventional Commits 2026
We follow the strictly typed commit standard:
feat(scope):A new feature.fix(scope):A bug fix.refactor(scope):No feature or bug change.perf(scope):Performance improvements.chore(scope):Internal tools/config.docs(scope):Documentation only.
Structure:
type(scope)!: short description (max 50 chars)
Detailed body explaining WHY this change was made.
Wrapped at 72 chars.
BREAKING CHANGE: [details]
Resolves #123
🔨 History Sculpting (Interactive Rebase)
The Sentinel never pushes messy local history.
# Clean up the last 3 local commits before pushing
git rebase -i HEAD~3
Use squash to combine small "fix" commits into a single "feat" or "fix".
🔍 Forensic Validation (Git Bisect)
When a bug appears, find the source with binary search.
git bisect start
git bisect bad HEAD
git bisect good [last_known_good_tag]
# Automate with:
git bisect run bun test
🚀 Git 3.0 Readiness
- SHA-256: Transitioning away from SHA-1 for collision resistance.
- Rust Core: Native speed for monorepo operations.
- Push Protection: Automated secret detection in the commit loop.
📖 Reference Library
Detailed deep-dives into Git excellence:
- Git Forensics: Regressions and bisecting.
- Advanced Rebasing: interactive mode and autosquash.
- Git 3.0 Guide: SHA-256 and Rust integration.
- Hook Automation: Husky, Lefthook, and Pre-commit.
Updated: January 22, 2026 - 17:50
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
filesystem-context
Uso del sistema de archivos como extensión de la ventana de contexto, persistencia de planes, comunicación entre sub-agentes y carga dinámica de habilidades.
git-flow
Senior Workflow Architect. Master of Trunk-Based Development, Stacked Changes, and 2026 Branching Strategies.
track-master
Senior Progress Analyst & Conductor Strategist. Expert in Predictive Project Tracking and Agentic Milestone Management for 2026.
artifact-janitor
Senior Build Cleanup & System Optimization Specialist. Expert in reclaiming disk space and resolving build corruption in 2026 ecosystems.
openapi-pro
Senior API Architect & Integration Engineer for 2026. Specialized in Type-Safe API contracts using OpenAPI 3.1, Zod-First schema derivation, and automated TypeScript client generation. Expert in bridging the gap between Hono backends and Next.js 16 frontends using `openapi-fetch`, `orval`, and unified monorepo type-sharing.
seo-pro
Senior SEO Architect & Content Strategist. Expert in SGE Optimization, E-E-A-T Standards, and Semantic Entity SEO for 2026.
Didn't find tool you were looking for?