redis/git-safety
>- 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.
npx skills add https://github.com/redis/RedisInsight --skill git-safety
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 popTake redis/git-safety from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.