speckit-git-remote

Detects the Git remote URL and parses GitHub repository owner and name.

Updated Jan 28, 2024
One-click install
npx skills add https://github.com/Thiago-Cruz-eng/KrockSide --skill speckit-git-remote-thiago-cruz-eng
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speckit-git-remote
Source: https://github.com/Thiago-Cruz-eng/KrockSide/tree/main/.claude/skills/speckit-git-remote
Command: npx skills add https://github.com/Thiago-Cruz-eng/KrockSide --skill speckit-git-remote-thiago-cruz-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When automating GitHub workflows such as issue creation, you need to know which repository the current project points to. Manually inspecting Git configuration is error-prone, and assuming a GitHub remote when none exists breaks downstream integrations. ## Core Features & Use Cases - Remote URL Detection: Runs git config --get remote.origin.url to retrieve the configured remote for the current repository. - URL Parsing: Extracts the repository owner and name from both HTTPS (https://github.com/<owner>/<repo>.git) and SSH (git@github.com:<owner>/<repo>.git) formats. - GitHub Verification: Confirms whether the remote actually points to github.com instead of assuming it does. - Graceful Degradation: Returns an empty result with a warning when Git is unavailable, the directory is not a repository, or no remote is configured, so other workflows continue uninterrupted. - Use Case: A spec-kit automation needs to create a GitHub issue for a new feature specification; it first uses this Skill to resolve the correct owner and repository from the local Git configuration. ## Quick Start Ask the assistant to detect the Git remote URL of the current repository and report the GitHub owner and repository name.

Frequently Asked Questions about speckit-git-remote

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

FAQPage Schema
How do I get the Git remote URL of a repository from the command line?▼

Run `git config --get remote.origin.url` inside the repository to print the configured remote URL. You can first verify you are inside a Git work tree with `git rev-parse --is-inside-work-tree`.

How to extract the GitHub owner and repo name from a remote URL?▼

Parse the URL according to its format: for HTTPS use `https://github.com/<owner>/<repo>.git`, and for SSH use `git@github.com:<owner>/<repo>.git`. Extract the owner and repo segments from the path portion of the URL.

Does this work with non-GitHub remotes like GitLab or Bitbucket?▼

No. The Skill only reports a GitHub repository when the remote URL actually points to github.com. Remotes hosted on other platforms are not treated as GitHub repositories.

What happens if Git is not installed or no remote is configured?▼

The Skill outputs a warning such as "Git repository not detected" and returns an empty result. It does not raise an error, so other workflows can continue without Git remote information.

Which Git remote URL formats are supported?▼

Two formats are supported: HTTPS URLs like `https://github.com/<owner>/<repo>.git` and SSH URLs like `git@github.com:<owner>/<repo>.git`. Both are parsed to extract the owner and repository name.