alistaircroll

push-to-remote

0
0
# Install this skill:
npx skills add alistaircroll/verbose-deployment --skill "push-to-remote"

Install specific skill from multi-skill repository

# Description

Push to the Git remote that triggers deployment — detect push target, handle no-op when no new commits exist, and collect push metrics. Use as Phase 7 of the deployment pipeline.

# SKILL.md


name: push-to-remote
description: "Push to the Git remote that triggers deployment — detect push target, handle no-op when no new commits exist, and collect push metrics. Use as Phase 7 of the deployment pipeline."


Push to Remote

Push to the Git remote that triggers deployment.

Detect

Determine the push target from git remotes, CLAUDE.md, or project config:

  • Direct push: git push origin main
  • Subtree push: git subtree push --prefix=path/to/project remote branch
  • Deploy branch: git push origin main:deploy
  • Other: Some projects use specific remotes for deployment

Check git remote -v and project documentation for the correct push target.

Handle No-Op

If no new commits exist (code hasn't changed since last push), skip this phase — mark as "Already deployed" and proceed to the verify-deployment skill to confirm the existing deployment is still READY.

Don't push an empty changeset.

# Check if there are commits to push
git log origin/main..HEAD --oneline

Collect

  • Push command used
  • Commit SHA
  • Push output (objects transferred, any warnings)
  • Any rejection errors
  • Or: "No new commits — already deployed"

Stop Conditions

STOP if: Push rejected. Diagnose the cause:
- Need to pull first? (git pull --rebase)
- Merge conflict?
- Force push required? (ask the user — never force push without confirmation)

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.