Critical safety guardrails for protected branches: never commit, push, or force-push directly to main, latest, or release branches; no destructive history rewrites without explicit user approval. Use before any git operation that touches protected branches, before force-push, reset --hard, history rewrite, or branch deletion, or whenever the user asks about merging, pushing, or release branches.
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
AI agents must NEVER commit to or push to protected branches under any circumstances.
main - Primary production branchlatest - Latest stable releaserelease/* - Release branches (e.g., release/v2.0.0)This is a non-negotiable rule that applies to all scenarios:
git commit while on a protected branchgit push origin <protected-branch> or git push while on a protected branchgit push --force or git push -f targeting protected branchesgit merge <branch> while on a protected branchgit rebase while on a protected branchgit reset while on a protected branchgit branch --show-currentBefore executing any push command, AI agents must:
main, latest, release/*)If accidentally on a protected branch with uncommitted changes:
git stashgit checkout -b <appropriate-branch-name>git stash pop6029714
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.