Repository Setup

Initializes a local Git repository and links it to a GitHub remote via CLI.

3|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/gmautner/marketplace --skill repository-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Repository Setup
Source: https://github.com/gmautner/marketplace/tree/main/plugins/cofounder/skills/repo-setup
Command: npx skills add https://github.com/gmautner/marketplace --skill repository-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Automates initializing a local git repository and linking a matching GitHub remote, eliminating manual setup steps.

Core Features & Use Cases

  • Local repository initialization and initial commit creation when needed.
  • GitHub remote creation or linking via the GH CLI with device-code authentication.
  • Safe handling of existing remotes and smooth push of the initial history to GitHub.

Quick Start

In your project directory, run the repo-init.sh script with a repository name and visibility to initialize the local repo, connect it to GitHub, and push the initial changes.

Frequently Asked Questions about Repository Setup

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

FAQPage Schema
How do I automate local git repository initialization and push it to a new GitHub remote?

To automate local git repository initialization and push to a new GitHub remote, you can use a script that initializes the local repo, creates the GitHub remote via GH CLI, and pushes the initial commit. This eliminates manual setup steps.

Do I need GitHub CLI authentication to create a remote repository from my local directory?

Yes, you need GitHub CLI authentication to create a remote repository from your local directory. The automation process uses device-code authentication through the GH CLI to securely link your local git repository to GitHub.

What happens if I already have an existing remote configured when linking to GitHub?

If an existing remote is already configured when linking to GitHub, the setup script safely detects it. It handles the existing remote configuration to ensure a smooth push of your initial history without overwriting your current settings.

Can I specify repository visibility when creating a GitHub remote for my local project?

Yes, you can specify repository visibility when creating a GitHub remote. You provide the repository name and visibility as arguments to the setup script, which configures the remote visibility accordingly during the GitHub creation process.

How do I create an initial commit automatically if my local repository is empty?

To create an initial commit automatically when your local repository is empty, the setup script initializes the local git repository and creates the initial commit if needed before pushing the history to GitHub.

What is the best way to connect an existing local project to GitHub without manual web setup?

The best way to connect an existing local project to GitHub without manual web setup is using command-line automation. A script can initialize the git repository, authenticate via GH CLI device-code flow, create the remote, and push initial changes.