What problem does it solve?
Running git commands without first validating repository state leads to merge conflicts, lost uncommitted work, accidental pushes of broken code, and other costly errors that waste developer time. This skill provides mandatory pre-flight checks to catch these issues before they cause problems.
Core Features & Use Cases
- Mandatory pre-flight validation: Requires checking repository status before all common git operations including commit, push, pull, merge, rebase, and checkout.
- Command-specific checks: Includes tailored verification steps for each git command to catch operation-specific risks.
- Safe command patterns: Provides standardized, safe command templates that chain status checks with git operations to reduce errors.
- Built-in recovery guidance: Includes commands for common git error recovery such as reflog, merge --abort, and restore --staged.
- Use case: For example, before pushing code to a shared main branch, the pre-flight check will flag uncommitted changes, outdated local branches, or pending merge conflicts so you can resolve them before pushing broken code that disrupts the team.
Quick Start
Use the git-preflight skill to run mandatory pre-flight checks before executing your next git command to prevent errors and avoid losing work.