自动化配置 pi 在 GitHub/git 的行动(纯 Git Bash 驱动):环境探测 → 传输通道决策(https/GCM 或 SSH)→ 浏览器 OAuth → 带口令 SSH 密钥 + agent → 建仓推送 → post-commit 自动推送 + 计划任务兜底。内置敏感信息传递 SOP(令牌/口令/密钥/cookie 零明文)。当用户说"配置 github / 自动推送 / 建仓库 / 推送仓库 / 配置 git"时使用。
Integrations
GitHub Personal Repo Publisher
Try itCreate a repository under your own GitHub account, wire a local project repo to it, and push committed history safely. 为你自己的 GitHub 账户创建仓库,把本地项目仓库接过去,并安全推送已提...
What it does
Create a repository under your own GitHub account, wire a local project repo to it, and push committed history safely. 为你自己的 GitHub 账户创建仓库,把本地项目仓库接过去,并安全推送已提...
The skill document
GitHub Personal Repo Publisher
Use this skill when a local Git project should be published to a new repository under your own GitHub account and the account access is managed through SSH plus a 1Password-stored PAT. 当本地 Git 项目需要发布到你自己 GitHub 账户下的新仓库,且账户访问通过 SSH 和 1Password 中保存的 PAT 管理时,使用这个 skill。
Read First | 先读这些
{baseDir}/README.md{baseDir}/WORKFLOW.md{baseDir}/FAQ.md{baseDir}/CHANGELOG.md
Primary Rule | 核心原则
Treat Git history as the publish boundary: only committed local history should be described as pushed. 把 Git 提交历史当作发布边界:只有已提交的本地历史,才能算已经推送。
Workflow | 执行流程
- inspect the local repository state 检查本地仓库状态
- verify SSH auth to the personal GitHub account 验证到个人 GitHub 账户的 SSH 认证
- check whether the target repository already exists 检查目标仓库是否已存在
- create the GitHub repository through the API if missing 如果缺失,则通过 API 创建 GitHub 仓库
- add or update the local
origin添加或更新本地origin - push the current branch and set upstream 推送当前分支并建立 upstream
- verify remote wiring and pushed commit 校验远端绑定和已推送提交
- state clearly what remains local-only 明确说明哪些内容仍只存在于本地
Strong Heuristics | 强判断规则
- if
originalready points to the correct repo, do not recreate the repository - if SSH auth fails, do not continue to remote rewiring or push
- if the GitHub repo does not exist and
ghis unavailable, use the REST API with a 1Password-managed PAT - default new personal project repositories to
privateunless the user clearly wants public exposure - if the worktree is dirty, say explicitly that uncommitted files were not pushed
- if
originexists but points elsewhere, update it intentionally rather than assuming it is disposable
中文解释:
- 如果
origin已经指向正确仓库,就不要重复建仓库。 - SSH 认证失败时,不要继续改 remote 或 push。
- GitHub 仓库不存在且
gh不可用时,用 1Password 管理的 PAT 调 REST API。 - 新的个人项目仓库默认建成
private,除非用户明确要求公开。 - 工作区有脏改动时,要明确说明未提交文件并没有被推送。
origin已存在但指向别处时,要有意识地更新,不要假设它可以随便覆盖。
Safe Commands | 安全命令
git -C /path/to/project status --short
git -C /path/to/project remote -v
git -C /path/to/project log --oneline -3
ssh -T git@github-grey0758
git ls-remote git@github-grey0758:grey0758/your-repo.git HEAD
TOKEN="$(op read 'op://OpenClaw/GitHub Fine-Grained PAT - Repo Admin - grey0758/credential')"
curl -fsSL -X POST -H 'Accept: application/vnd.github+json' -H "Authorization: Bearer $TOKEN" https://api.github.com/user/repos -d '{"name":"your-repo","private":true}'
git -C /path/to/project remote add origin git@github-grey0758:grey0758/your-repo.git
git -C /path/to/project push -u origin main
Response Format | 输出格式
Always return: 始终返回:
- current local repo status
- GitHub repo existence or creation status
- remote wiring status
- push status
- local-only work that still remains
Constraints | 约束
- do not reveal PAT values or copy secret material into files
- do not say a project is fully published when uncommitted changes still exist
- do not assume
ghis installed - keep the owner, SSH alias, and target repo name explicit
Related skills
把「已有的」静态网页文件(单个 HTML 或整个网站目录)安全发布到 GitHub Pages,生成可公开访问、能分享的网址链接。当用户已有现成网页,想「发到网上」「部署上线」「发布网页」「生成分享链接」时使用;本技能只做「发布已有文件」,不负责从零生成网站。提供可执行的 deploy.py 脚本(整站增量上传 / 单文件上传 / 仅启用 Pages 三种模式),纯标准库无额外依赖,逐文件增量上传、绝不覆盖远程已有内容,并已回写真实踩坑(token 写权限、连接器只读、force 覆盖风险)。仅适用于纯静态内容;涉及后端、数据库、登录或敏感数据时不要用。
把本地 Agent / Skill / 工具包标准化发布到 GitHub 公开仓库。当用户要把本地文件转成开源 skill 上传时触发。 完整工作流:脱敏检查 → 文件结构对齐 github-project-radar 标准 → 建空仓 → 逐文件推送 → 补 topics / description / release。封装了今天踩过的所有坑(auto_init README 覆盖、URL 转码、 私改公开、topic 清理)。一次成功不再返工。
Publish HTML frontend projects to the PushWebly publishing platform, list published projects, obtain shareable project URLs, change a published app's public/...
Use when the user wants a fast, low-friction onboarding guide for an unfamiliar GitHub repository. Trigger when a GitHub repo URL is provided, or when the us...
将当前项目中的 Skill 发布到 GitHub 并同步到 ClawHub。新项目自动走完流程,已有仓库的项目会总结变更、确认提交信息和建议版本号。