Agent skill
push-changes
Push git changes to remote with full workflow including status check, staging, committing, and pushing. Use when the user asks to push changes, push up code, or sync with remote. Includes safety check to prevent pushing directly to main branch.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/push-changes
SKILL.md
Push Changes
Push local changes to the remote repository with safety checks.
Workflow
-
Check current branch
bashgit branch --show-currentSTOP if on
mainormaster: Warn the user they forgot to create a branch. ALWAYS use the AskQuestion tool:- Title: "Branch Required"
- Question: "You're currently on the main branch. What branch name would you like to use?"
- Options:
- id: "custom", label: "Let me specify a branch name"
- id: "abort", label: "Abort, I'll create it myself"
If the user selects "custom", ask them conversationally for the branch name, then create and switch to it:
bashgit checkout -b <branch-name> -
Check status
bashgit statusReview untracked files and modifications.
-
Stage changes
bashgit add -AOr selectively add specific files if the user prefers.
-
Review staged changes
bashgit diff --staged --stat -
Commit with descriptive message Analyze the changes and create a commit message following conventional commits format:
bashgit commit -m "$(cat <<'EOF' <type>(<scope>): <description> <optional body> EOF )"Types:
feat,fix,docs,style,refactor,test,chore -
Push to remote
bashgit push -u origin HEAD -
Verify push succeeded
bashgit statusConfirm the branch is up to date with remote.
Safety Rules
- Never push to
mainormaster- always create a feature branch first - Never force push unless explicitly requested by the user
- Review changes before committing to avoid committing secrets or unwanted files
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?