protosschiefbot-cpu

github-setup

0
0
# Install this skill:
npx skills add protosschiefbot-cpu/openair-workspace --skill "github-setup"

Install specific skill from multi-skill repository

# Description

Initialize and push a local workspace to a new GitHub repository without the 'gh' CLI. Use when you need to "create a repo" or "push my code" and the official CLI is missing or unauthenticated.

# SKILL.md


name: github-setup
description: Initialize and push a local workspace to a new GitHub repository without the 'gh' CLI. Use when you need to "create a repo" or "push my code" and the official CLI is missing or unauthenticated.


GitHub Setup (No CLI)

This skill automates the creation of a GitHub repository and the initial push using browser automation and Git plumbing commands.

Workflow

1. Initialize Local Git

If not already a git repo:

git init
git add .
git commit -m "Initial commit"

2. Create Repository (Browser)

Since gh CLI is absent, use the internal browser:
1. Open: browser.open("https://github.com/new")
2. Fill: Repository name (e.g., openair-workspace).
3. Create: Click "Create repository".
4. Capture URL: Copy the HTTPS URL from the success page.

3. Generate Token (Browser)

We need a Personal Access Token (Classic) for HTTPS authentication.
1. Open: browser.open("https://github.com/settings/tokens/new")
2. Configure:
- Note: "clawdbot-push"
- Scopes: Check repo (Full control of private repositories).
3. Generate: Click "Generate token".
4. Copy: Extract the token string (starts with ghp_).

4. Push (Terminal)

Construct the authenticated remote URL and push:

# Template
git remote add origin https://<USERNAME>:<TOKEN>@github.com/<USERNAME>/<REPO>.git
git branch -M master
git push -u origin master

Security Note: The token is visible in the process table/logs during execution. Ensure logs are private or token is short-lived.

# 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.