home / skills / openclaw / skills / github-deploy-skill
This skill automates committing and pushing code to GitHub, with optional repository creation and deployment hints to streamline project deployment.
npx playbooks add skill openclaw/skills --skill github-deploy-skillReview the files below or copy the command above to add this skill to your agents.
---
name: GitHub Deploy Skill
slug: github-deploy-skill
version: 1.0.0
description: Commit and push local project changes to GitHub, with optional repo creation and deployment hints.
author: cruciata
tags:
- latest
- github
- deploy
- powershell
---
# GitHub Deploy Skill
This skill provides a reusable PowerShell script for Windows to automate:
1. Git checks
2. Commit creation
3. Push to remote branch
4. Optional GitHub repository creation (via GitHub CLI)
5. Optional deployment hints (for Streamlit flow)
## Included file
- `github-deploy-skill.ps1`
## Parameters
- `-CommitMessage` (required): commit message text
- `-Repo` (optional): GitHub repository in `owner/repo` format
- `-Branch` (optional): target branch, default `main`
- `-CreateRepo` (optional switch): create repo with `gh` if missing
- `-SkipDeployHint` (optional switch): do not print deployment hint
## Usage
From any Git project folder:
```powershell
powershell -ExecutionPolicy Bypass -File .\github-deploy-skill.ps1 -CommitMessage "feat: update" -Repo "owner/repo" -Branch "main"
```
Create repository automatically:
```powershell
powershell -ExecutionPolicy Bypass -File .\github-deploy-skill.ps1 -CommitMessage "init" -Repo "owner/new-repo" -CreateRepo
```
## Expected output
- Success: commit and push completed
- Failure: explicit error with reason (missing command, auth, push/network, remote config)
## Requirements
- Git installed and available in PATH
- Network access to remote Git host
- If `-CreateRepo` is used: GitHub CLI (`gh`) installed and authenticated
## Notes
- Works with repositories that do not yet have a first commit.
- If `origin` does not exist, pass `-Repo` and the script will add it automatically.
This skill automates committing and pushing local project changes to GitHub from Windows using a reusable PowerShell script. It can create a remote repository via the GitHub CLI if needed and prints optional deployment hints for simple hosting flows like Streamlit. The result is a single command to handle git checks, commits, remote setup, and push operations reliably.
The script inspects the current folder for a git repository, stages changes, creates a commit with the provided message, and pushes to the specified branch. If a remote named origin is missing and an owner/repo is provided, it can call the GitHub CLI to create the repo and add the remote. It reports clear success or explicit error reasons (missing tools, auth issues, network or push failures).
What tools must be installed to use this skill?
Git must be in PATH. If using -CreateRepo, install and authenticate the GitHub CLI (gh).
Can it push a repository with no commits yet?
Yes. The script handles repositories that lack an initial commit and will add origin and push if you provide -Repo.