← ClaudeAtlas

detect-repo-hostlisted

Detect repository hosting service (GitHub/GitLab/Forgejo) from git remote and extract owner/repo/project_path. Internal utility skill used by commands that need platform-aware routing.
sgaunet/claude-plugins · ★ 13 · AI & Automation · score 80
Install: claude install-skill sgaunet/claude-plugins
# Detect Repository Host Skill Detect the repository hosting service from git remote configuration and extract structured metadata for platform-aware command routing. ## Overview Many commands need to determine whether the current repository is hosted on GitHub, GitLab, or Forgejo to route CLI calls correctly. This skill centralizes that detection logic so commands can invoke it via the `Skill` tool instead of duplicating `git remote -v` parsing. ## When to Use - Before calling GitHub, GitLab, or Forgejo CLI tools that require `owner/repo` or `project_path` - When a command needs to branch logic based on hosting platform - Any workflow requiring platform-aware routing ## Workflow ### Step 1: Read Git Remotes ```bash git remote -v ``` Parse the output to find the `origin` remote (or the first available remote if `origin` is not set). ### Step 2: Parse Remote URL Support both SSH and HTTPS URL formats: **SSH formats (scp-style):** ``` git@github.com:owner/repo.git git@gitlab.com:group/subgroup/project.git git@gitlab.self-hosted.example.com:group/project.git git@git.sylvlab.fr:owner/repo.git ``` **SSH formats (`ssh://` scheme, may include a custom port):** ``` ssh://git@github.com/owner/repo.git ssh://git@git.sylvlab.fr:2222/sylvain/mountain-blog-test.git ``` **HTTPS formats:** ``` https://github.com/owner/repo.git https://gitlab.com/group/subgroup/project.git https://gitlab.self-hosted.example.com/group/project.git https://git.sylvlab.fr/owner/repo.git ``` **Pars