speckit-git-remote

Detect the Git remote URL and parse GitHub repository owner and name.

Updated May 22, 2026
One-click install
npx skills add https://github.com/WU-MAO-CHIA/AI_tset_platfrom --skill speckit-git-remote-wu-mao-chia
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speckit-git-remote
Source: https://github.com/WU-MAO-CHIA/AI_tset_platfrom/tree/main/.opencode/skills/speckit-git-remote
Command: npx skills add https://github.com/WU-MAO-CHIA/AI_tset_platfrom --skill speckit-git-remote-wu-mao-chia

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. This Skill detects the Git remote URL and extracts the repository owner and name so downstream GitHub integrations can target the correct repository. ## Core Features & Use Cases - Remote URL Detection: Runs git config --get remote.origin.url to retrieve the configured remote. - URL Parsing: Extracts 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, avoiding false assumptions. - Graceful Degradation: Returns an empty result without errors when Git is unavailable, the directory is not a repository, or no remote is configured. - Use Case: Before creating a GitHub issue from a spec-kit workflow, use this Skill to determine the target repository owner and name automatically. ## Quick Start Detect the Git remote URL for this project and tell me the GitHub repository owner and 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?▼

Run `git config --get remote.origin.url` inside the repository to retrieve 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 repository owner and name from a Git remote URL?▼

Parse the URL based on its format: for HTTPS like `https://github.com/<owner>/<repo>.git`, split the path segments; for SSH like `git@github.com:<owner>/<repo>.git`, split after the colon. Strip the trailing `.git` suffix to get the repository name.

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

The detection runs for any remote URL, but the GitHub verification step only confirms repositories hosted on github.com. Remotes pointing to GitLab, Bitbucket, or other hosts are reported as non-GitHub.

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

The Skill returns an empty result and outputs a warning instead of failing. Other workflows continue normally without Git remote information, so it is safe to run in environments without Git.

Why does git remote detection fail in some directories?▼

Detection fails when the directory is not inside a Git work tree, Git is not installed, or no `origin` remote has been configured. Check with `git rev-parse --is-inside-work-tree` and `git remote -v` to diagnose.