publish-to-new-github-repo

Commit working-tree changes, create a private GitHub repo, and push the current branch.

10|1|Updated Jul 7, 2026
One-click install
npx skills add https://github.com/catalystctl/catcode --skill publish-to-new-github-repo-catalystctl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: publish-to-new-github-repo
Source: https://github.com/catalystctl/catcode/tree/main/.catalyst-code/skills/publish-to-new-github-repo
Command: npx skills add https://github.com/catalystctl/catcode --skill publish-to-new-github-repo-catalystctl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Publishing a local project to GitHub for the first time involves several error-prone steps: committing pending changes, creating a remote repository with the right visibility, wiring up the remote, and pushing. This Skill automates that entire sequence with pre-flight checks so nothing is overwritten or pushed to the wrong place. ## Core Features & Use Cases - Commit-then-publish workflow: Stages and commits all working-tree changes, confirms a clean tree, then creates and pushes in one flow. - Safe repo creation: Verifies the target repo does not already exist and checks org membership/permissions before running gh repo create. - Verification and gotcha handling: Confirms remote configuration, pushed commits, and repo visibility, and documents fixes for common failures like missing workflow scope or a pre-existing origin remote. - Use Case: You have a local project with uncommitted work and want it on GitHub under your organization as a private repo. The Skill commits everything, creates org/name as private, adds origin, pushes, and verifies the result. ## Quick Start Commit all of my current git changes, then create a private repo under my org called my-project and push everything there.

Frequently Asked Questions about publish-to-new-github-repo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a private GitHub repo and push an existing local project?

Run gh repo create <org>/<name> --private --source=. --remote=origin --push after committing all local changes. This creates the repo, adds it as the origin remote, and pushes the current branch in one command.

How do I push a local repo to GitHub under an organization?

Prefix the repo name with the org, e.g. gh repo create my-org/my-repo --private --source=. --remote=origin --push. First verify you have repo-creation rights with gh api orgs/<org>/memberships/<user> to check your role is admin or member.

Why does pushing GitHub Actions workflow files fail with gh?

Pushing files under .github/workflows requires the workflow OAuth scope on your gh token. Without it, GitHub rejects the push; fix it by running gh auth refresh -h github.com -s workflow and retrying.

What happens if the GitHub repo already exists when I run gh repo create?

The command fails rather than overwriting anything. This Skill checks first with gh repo view <org>/<name> and stops to ask the user before pushing to an existing repository.

Does gh repo create --push push all local branches?

No, --push only pushes the current branch and sets up tracking for it. Other local branches must be pushed separately with git push origin <branch>.