关于 blink-github
blink-github 是用于通过 Blink 工作区 GitHub App 安装访问 GitHub 的技能,面向需要管理仓库或在自动化流程中使用 GitHub 的用户。它使用服务端即时签发的短期令牌,无需在磁盘保存个人访问令牌。
主要功能
- 01查看已连接的 GitHub 账户
- 02克隆 GitHub 仓库
- 03通过 REST API 操作仓库
- 04使用短期令牌进行身份验证
适用场景
- 01查看仓库并创建 issue
- 02克隆仓库以开展开发
- 03在 Blink Claw Agent 中推送代码或创建 PR
MCP 相关
可通过 `blink_connector_exec` MCP 工具向 GitHub 发起 API 请求,例如创建 issue。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ blink-new/ blink-plugin --skill blink-github安装后在 Claude Code 中输入/blink-github确认已加载。
详细介绍
Blink GitHub
基于工作区 GitHub App 安装提供完整的 GitHub 访问能力。令牌有效期很短(1 小时),由服务端按需即时签发——无需个人访问令牌,无需 gh auth login,磁盘上也不会存放机密信息。
CLI
# Show all connected GitHub accounts (workspaces can link multiple)
blink github status
# Clone a repo (token is used for auth, stripped from .git/config after)
blink github clone owner/repo
blink github clone https://github.com/owner/repo.git --branch feat/x
# Print a short-lived token for scripting
blink github token --json | jq -r .token
# Multi-account: pick a specific installation
blink github clone owner/repo --account blink-new
blink github token --account my-employer-org
REST API(connector exec)
# List repos
blink connector exec github /user/repos GET
# Get a specific repo
blink connector exec github /repos/owner/repo GET
# Create an issue
blink connector exec github /repos/owner/repo/issues POST \
'{"title":"Bug report","body":"Steps to reproduce..."}'
# List open PRs
blink connector exec github /repos/owner/repo/pulls GET '{"state":"open"}'
# CI status (last 5 runs)
blink connector exec github /repos/owner/repo/actions/runs GET '{"per_page":5}'
# Read a file (returns base64-encoded content)
blink connector exec github /repos/owner/repo/contents/README.md GET
MCP 工具
使用 blink_connector_exec 工具,并设置 provider: "github":
{
"tool": "blink_connector_exec",
"provider": "github",
"projectId": "proj_xxx",
"endpoint": "/repos/owner/repo/issues",
"httpMethod": "POST",
"params": { "title": "Bug", "body": "Details..." }
}
前置条件
请在 blink.new/settings?tab=connectors 中连接 GitHub 一次。
工作区关联的是 GitHub App 安装,而非个人 OAuth 令牌。 这意味着:
- 可在强制执行 SSO/SAML 的组织中使用(无需为每个令牌单独完成 SSO 流程)
- 令牌有效期很短,仅 1 小时——不会有长期有效的机密信息
- 卸载 App 即可撤销;无需手动轮换密钥
- 支持多个账号:可分别关联个人账号和工作组织
在 Blink Claw Agent 上
git clone、git push、gh pr create 均可开箱即用——Claw
镜像自带系统级 git 凭据助手,可自动签发令牌。无需 gh auth login,无需 PAT。
评论
支持 Markdown