Apply critical git safety protocols before any git operations, especially in collaborative environments. Use when performing git commands, managing files, or making destructive changes.
/plugin marketplace add yzlin/supaviber/plugin install supaviber@supaviber-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Apply rigorous git safety protocols to prevent data loss and conflicts in collaborative development environments, particularly when multiple agents or developers work concurrently.
Deleting Files:
File Modifications:
git log <file> to see who last editedCritical: Environment Files
.env or any environment variable files.env, .env.local, .env.production, etc.Git Configuration:
.gitconfig or repository git settingsšØ ABSOLUTELY NEVER run these operations unless the user gives explicit, written instruction:
git reset --hard - Destroys uncommitted work permanentlygit checkout <old-commit> - Can lose current workgit restore --source=<old-commit> - Reverts to old state, losing changesrm -rf - Irreversible file deletiongit push --force - Overwrites remote historygit rebase without safeguards - Can lose commitsgit clean -fd - Deletes untracked files permanentlyBefore running these commands, STOP and ask the user explicitly:
Pre-commit Checklist:
git status to verify exactly what's being committedgit add . or git add -A blindlygit diff --stagedExample - Safe Commit:
# Good: Explicit, verified, atomic
git status
git add src/components/Button.tsx src/components/Button.test.tsx
git diff --staged
git commit -m "feat: add disabled state to Button component"
Example - Unsafe Commit:
# Bad: No verification, adds everything
git add .
git commit -m "fixes"
Quote Special Characters:
# Good
git add "src/utils/parse(data).ts"
git add "src/components/[id].tsx"
# Bad - shell may misinterpret
git add src/utils/parse(data).ts
git add src/components/[id].tsx
When rebasing is necessary:
# Suppress editor prompts
GIT_SEQUENCE_EDITOR=true git rebase <branch>
# Or set environment variable
export GIT_SEQUENCE_EDITOR=true
git rebase main
Communication First:
git log --since="1 day ago" --onelineProactive Coordination:
git pull --rebaseAre you about to run a destructive git command?
āā YES ā Is there explicit written user approval?
ā āā YES ā Proceed carefully, verify twice
ā āā NO ā STOP. Ask user for permission first.
āā NO ā Proceed with normal safety checks
Wrong Approach:
# ā Delete file to fix error
rm src/components/BrokenComponent.tsx
Right Approach:
# ā
Stop and ask user
# "I see a type error in BrokenComponent.tsx.
# Should I fix the error or is this file obsolete?"
Wrong Approach:
# ā Hard reset without asking
git reset --hard HEAD
Right Approach:
# ā
Ask first, then use safer methods
git stash # Preserves work
# OR
git checkout -b backup-branch # Creates backup
Wrong Approach:
# ā Force push over teammate's work
git push --force
Right Approach:
# ā
Coordinate first
# "I need to force push to fix history.
# Is anyone else working on this branch?"
Before Destructive Operations:
# Check what will be affected
git status
git log --oneline -n 10
git diff HEAD
# See who's been working recently
git log --since="1 day ago" --all --oneline
# Check remote status
git fetch
git status
Files to NEVER modify:
.env.env.local.env.development.env.production.env.test.env.*If environment changes are needed:
Invoke this skill when:
Default stance: Cautious and communicative. Preserve work, ask questions, coordinate changes.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.