跳到正文
Skillpedia
部署与云(DevOps)10k · #12002

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-git-remote/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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:

  1. Repository owner: Extract from the URL (e.g., github from https://github.com/github/spec-kit.git)
  2. Repository name: Extract from the URL (e.g., spec-kit from https://github.com/github/spec-kit.git)
  3. 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 网址。

如果没有远程怎么办?

它返回空结果,不会报错。

它会更改任何内容吗?

不会。它只读取远程设置。

详情

作者的原始描述

Detect Git remote URL for GitHub integration

repo: unoplatform/uno

热度

GitHub 星标
10k
排名
#12002
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能