speckit-git-remote
它能做什么
这个技能读取项目 Git 远程的网址,并检查它是否指向 GitHub。适合需要仓库网址的其他工具所在项目的开发者。
适用场景
- ✓另一个 Spec Kit 步骤需要项目的 GitHub 网址的时候。
- ✓你想确认项目的远程地址是否指向 GitHub 的时候。
- ✓项目没有 Git 远程,你需要这个技能干净地报告这一点的时候。
技能链接
https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-git-remote/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“这个项目的 Git 远程的 GitHub 网址是什么?”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能从 Git 读取远程设置,然后确定所有者和仓库名。只有当地址确实指向 github.com 时,它才会报告为 GitHub。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Detect Git Remote URL
Detect the Git remote URL for integration with GitHub services (e.g., issue creation).
Prerequisites
- Check if Git is available by running
git rev-parse --is-inside-work-tree 2>/dev/null - If Git is not available, output a warning and return empty:
[specify] Warning: Git repository not detected; cannot determine remote URL
Execution
Run the following command to get the remote URL:
git config --get remote.origin.url
Output
Parse the remote URL and determine:
- Repository owner: Extract from the URL (e.g.,
githubfromhttps://github.com/github/spec-kit.git) - Repository name: Extract from the URL (e.g.,
spec-kitfromhttps://github.com/github/spec-kit.git) - Is GitHub: Whether the remote points to a GitHub repository
Supported URL formats:
- HTTPS:
https://github.com/<owner>/<repo>.git - SSH:
git@github.com:<owner>/<repo>.git
[!CAUTION] ONLY report a GitHub repository if the remote URL actually points to github.com. Do NOT assume the remote is GitHub if the URL format doesn't match.
Graceful Degradation
If Git is not installed, the directory is not a Git repository, or no remote is configured:
- Return an empty result
- Do NOT error — other workflows should continue without Git remote information
常见问题
它能识别哪些网址格式?
它同时支持 HTTPS 和 SSH 风格的 GitHub 网址。
如果没有远程怎么办?
它返回空结果,不会报错。
它会更改任何内容吗?
不会。它只读取远程设置。
详情
热度
- GitHub 星标
- 10k
- 排名
- #12002
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …