Skip to content
Agent Orchestration
Command

/push

Intelligently push commits to remote with safety checks and insights

From plugin
claudekit
76324 skills35 agents24 commands

Command definition

push.md
description: Intelligently push commits to remote with safety checks and insights
category: workflow
allowed-tools: Bash(git:*), Task

Push commits to remote repository with appropriate safety checks and branch management.

Git Expert Integration

For complex push scenarios (force push requirements, diverged branches, upstream conflicts, protected branch workflows), consider using the Task tool with `git-expert` subagent for specialized git expertise.

Efficiency Note:

Be concise. Use single bash calls where possible. Skip verbose explanations and intermediate status messages. Execute the push directly if safe, show only the result.

Instructions for Claude:

1. Run safety checks in a single bash call: !git status --porcelain=v1 && echo "---" && git branch -vv | grep "^\*" && echo "---" && git remote -v | head -2 && echo "---" && git log --oneline @{u}..HEAD 2>/dev/null

Parse output to check:

  • Any uncommitted changes (warn if present)
  • Current branch and tracking info
  • Remote repository URL
  • Commits to be pushed

2. If safe to push (no uncommitted changes), execute push immediately:

  • For tracked branch: `git push`
  • For new branch: `git push -u origin [branch-name]`
  • If behind remote: Stop and suggest `git pull --rebase`

3. Show only the final result:

  • If successful: Show the push output with ✅ emoji and success message
  • If failed: Show error and suggest fix
  • If unsafe: Show what needs to be done first

4. Special cases to handle:

  • Diverged branches: Suggest rebase or merge strategy
  • No upstream branch: Use -u flag
  • Force push needed: Warn strongly, require confirmation
  • Protected branch: Remind about PR workflow

Example concise output:

  • Skip: "Let me check if it's safe to push"
  • Skip: "I'll analyze your branch status"
  • Skip: "Ready to push X commits"
  • Skip: "Executing push..."
  • Just show the push result directly
Read more
@carlrannaberg
Ships withclaudekit

Smart guardrails and workflow automation for Claude Code - catch errors in real-time, save checkpoints, and enhance AI coding with expert subagents

Stars on GitHub

Momentum

stars in total
763
Star history of carlrannaberg/claudekit on GitHub, a chart by star-history.com

Other commands on claudekit.

cli

cli

Command

Capture CLI tool help documentation and add it to CLAUDE.md for AI assistant reference

More commands from other plugins.

COMMAND_COMPLIANCE_REPORT

COMMAND_COMPLIANCE_REP…

Command

Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools…

@ruvnet@ruvnetInstall Command
ask

ask

Command

This compatibility command keeps `/oh-my-claudecode:ask` available without loading the full `ask` skill description in every…

@yeachan-heo@yeachan-heoInstall Command