askill
commit-push

commit-pushSafety 95Repository

Create logical commits from current changes and push to remote - auto-detects GitHub/Gitea/GitLab and uses the appropriate CLI tool

0 stars
1.2k downloads
Updated 2/12/2026

Package Files

Loading files...
SKILL.md

Commit and Push

You are creating commits from the current changes and pushing them to the remote repository. This skill composes /create-commits with platform-aware pushing.

Workflow

1. Detect Platform

Run the platform detection script:

bash "$CLAUDE_PLUGIN_ROOT/scripts/detect-platform.sh"

This outputs key=value pairs. Parse them to understand:

  • platform — github, gitea, gitlab, or unknown
  • cli_tool — gh, tea, glab, or git
  • cli_available — whether the CLI tool is installed
  • has_remote — whether a remote is configured
  • has_upstream — whether the current branch tracks a remote

If no remote: Stop and tell the user. Suggest git remote add origin <url>.

If CLI tool not available: Warn but proceed with git push as fallback. Mention how to install:

  • GitHub: brew install gh then gh auth login
  • Gitea: brew install tea then tea login add
  • GitLab: brew install glab then glab auth login

2. Create Commits

Follow the /create-commits skill workflow (pass through --review flag if provided):

  1. Detect commit message style
  2. Analyze changes
  3. Plan commits
  4. If --review: show plan and wait for approval. Otherwise: execute directly.

3. Push to Remote

After commits are created:

If branch has no upstream tracking:

git push -u origin <current-branch>

If branch has upstream:

git push

If push fails due to diverged branches:

  • Report the divergence
  • Suggest git pull --rebase to sync
  • Do NOT force push unless the user explicitly requests it

4. Report

## Commit & Push Summary

Platform: GitHub (gh available)

### Commits
1. abc1234 feat: add JWT refresh (3 files)
2. def5678 docs: document JWT refresh (1 file)

### Push
Branch: feature/jwt-refresh → origin/feature/jwt-refresh
Status: pushed successfully

Arguments

ArgumentEffect
(none)Auto-detect everything, commit directly
--reviewShow commit plan and wait for approval before executing
--style conventionalForce commit style (passed to create-commits)
--no-splitSingle commit (passed to create-commits)

Edge Cases

  • No changes: Report "Nothing to commit or push"
  • No remote: Stop with helpful error
  • Diverged branches: Report and suggest rebase, never force push
  • Auth failure: Suggest re-authenticating with the platform CLI

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

83/100Analyzed 2/24/2026

Well-structured skill with clear workflow for commit-push operations. Provides platform detection, handles edge cases well, and includes safety measures like avoiding force pushes. Slightly held back by internal references ($CLAUDE_PLUGIN_ROOT, /create-commits skill) that limit reusability, but the core logic is solid and actionable.

95
90
70
85
85

Metadata

Licenseunknown
Version-
Updated2/12/2026
Publisherjason-hchsieh

Tags

githubgithub-actionssecurity