
github-automation
自动化 GitHub 操作。当用户需要推送代码到 GitHub、管理仓库、创建 PR、处理 Issue、git push 失败时使用此技能。优先使用 mcporter call github.pushfiles 而不是 git push。
- Installs
- 84
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/aaaaqwq/agi-super-team --skill github-automation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads github-automation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
GitHub 自动化操作
功能说明
此技能专门用于自动化 GitHub 平台的各种操作,包括:
- 仓库管理和文件操作
- Pull Request 创建和审查
- Issue 管理和追踪
- 分支管理和合并
- CI/CD 工作流自动化
- 代码搜索和分析
使用场景
- "创建一个新的 GitHub 仓库"
- "提交代码并创建 Pull Request"
- "批量处理 GitHub Issues"
- "自动化代码审查流程"
- "搜索代码库中的特定代码"
- "管理 GitHub Actions 工作流"
⚠️ 重要提示:使用 GitHub MCP 推送代码
当需要推送到 GitHub 时,优先使用 mcporter call github.push_files 而不是 git push!
为什么使用 GitHub MCP?
- ✅ 不需要 Personal Access Token - 使用已认证的 GitHub Copilot token
- ✅ 避免认证问题 - SSH key 未配置或 HTTPS token 过期时仍可工作
- ✅ 批量提交 - 一次提交多个文件
- ✅ 更可靠 - 直接通过 GitHub API,不受本地 git 配置影响
推送代码示例
方法1:使用 mcporter(推荐)
# 单个文件
mcporter call github.push_files \
owner=aAAaqwq \
repo=my-repo \
branch=master \
message="feat: add new feature" \
files='[{"path":"README.md","content":"file content"}]'
# 多个文件(使用 Python)
python3 << 'EOF'
import json
import subprocess
payload = {
"owner": "aAAaqwq",
"repo": "my-repo",
"branch": "master",
"message": "feat: update multiple files",
"files": [
{"path": "README.md", "content": "..."},
{"path": "src/main.py", "content": "..."}
]
}
result = subprocess.run([
'mcporter', 'call', 'github.push_files',
f'owner={payload["owner"]}',
f'repo={payload["repo"]}',
f'branch={payload["branch"]}',
f'message={payload["message"]}',
f'files={json.dumps(payload["files"])}'
], capture_output=True, text=True)
print(result.stdout)
EOF
方法2:传统 git push(需要配置认证)
# 仅在 MCP 不可用时使用
git push origin master
MCP 工具列表
查看所有可用工具:
mcporter list github --schema
常用工具:
github.push_files- 推送多个文件到仓库github.create_or_update_file- 创建或更新单个文件github.get_file_contents- 获取文件内容github.list_commits- 列出提交历史
核心功能模块
1. 仓库管理
- 创建仓库:创建新的公开或私有仓库
- Fork 仓库:Fork 其他仓库到自己账户
- 搜索仓库:按关键词搜索仓库
- 文件操作:读取、创建、更新文件
- 批量提交:一次提交多个文件
2. Pull Request 管理
- 创建 PR:从分支创建 Pull Request
- 审查 PR:添加评论和审查意见
- 合并 PR:合并 Pull Request
- 查看变更:获取 PR 的文件变更
- 状态检查:查看 CI/CD 状态
3. Issue 管理
- 创建 Issue:创建新的问题或任务
- 更新 Issue:修改状态、标签、负责人
- 搜索 Issue:按条件筛选 Issue
- 添加评论:在 Issue 中添加讨论
- 批量操作:批量处理多个 Issue
4. 分支管理
- 创建分支:从指定分支创建新分支
- 查看提交:列出分支的提交历史
- 分支保护:配置分支保护规则
- 合并策略:选择合并方式(merge、squash、rebase)
5. 代码搜索
- 搜索代码:在仓库中搜索代码片段
- 搜索 Issue:搜索问题和 PR
- 搜索用户:查找 GitHub 用户
- 高级查询:使用 GitHub 搜索语法
工作流程
标准开发流程
- 创建分支:从 main 创建功能分支
- 开发代码:编写和测试代码
- 提交变更:提交文件到分支
- 创建 PR:创建 Pull Request
- 代码审查:团队审查代码
- 合并代码:合并到主分支
自动化发布流程
- 监听事件:监听 push 或 tag 事件
- 运行测试:执行自动化测试
- 构建项目:编译和打包
- 创建 Release:发布新版本
- 部署应用:自动部署到生产环境
Issue 管理流程
- 创建 Issue:报告问题或需求
- 分配任务:指定负责人
- 添加标签:分类和优先级
- 跟踪进度:更新状态
- 关闭 Issue:完成后关闭
最佳实践
提交规范
- 使用清晰的提交信息
- 遵循 Conventional Commits 规范
- 一次提交解决一个问题
- 包含必要的测试和文档
PR 规范
- 提供详细的 PR 描述
- 关联相关的 Issue
- 确保 CI 检查通过
- 及时响应审查意见
- 保持 PR 大小适中
分支策略
- 使用 Git Flow 或 GitHub Flow
- 保护主分支
- 定期同步上游分支
- 及时删除已合并的分支
安全实践
- 不提交敏感信息
- 使用 GitHub Secrets 管理密钥
- 启用双因素认证
- 定期审查权限设置
常用代码示例
1. 创建仓库并提交文件
// 创建仓库
const repo = await createRepository({
name: "my-project",
description: "项目描述",
private: false,
autoInit: true
});
// 批量提交文件
await pushFiles({
owner: "username",
repo: "my-project",
branch: "main",
files: [
{
path: "README.md",
content: "# My Project\n\n项目说明"
},
{
path: "src/index.js",
content: "console.log('Hello World');"
}
],
message: "Initial commit"
});
2. 创建分支和 Pull Request
// 创建新分支
await createBranch({
owner: "username",
repo: "my-project",
branch: "feature/new-feature",
from_branch: "main"
});
// 提交代码到新分支
await createOrUpdateFile({
owner: "username",
repo: "my-project",
path: "src/feature.js",
content: "// 新功能代码",
message: "Add new feature",
branch: "feature/new-feature"
});
// 创建 Pull Request
await createPullRequest({
owner: "username",
repo: "my-project",
title: "添加新功能",
head: "feature/new-feature",
base: "main",
body: "## 变更说明\n- 添加了新功能\n- 更新了文档"
});
3. Issue 管理
// 创建 Issue
const issue = await createIssue({
owner: "username",
repo: "my-project",
title: "修复登录问题",
body: "## 问题描述\n用户无法登录\n\n## 复现步骤\n1. 打开登录页面\n2. 输入凭证\n3. 点击登录",
labels: ["bug", "high-priority"],
assignees: ["developer1"]
});
// 添加评论
await addIssueComment({
owner: "username",
repo: "my-project",
issue_number: issue.number,
body: "正在调查此问题"
});
// 更新 Issue
await updateIssue({
owner: "username",
repo: "my-project",
issue_number: issue.number,
state: "closed",
labels: ["bug", "fixed"]
});
4. 代码审查
// 获取 PR 详情
const pr = await getPullRequest({
owner: "username",
repo: "my-project",
pull_number: 123
});
// 获取 PR 文件变更
const files = await getPullRequestFiles({
owner: "username",
repo: "my-project",
pull_number: 123
});
// 创建审查
await createPullRequestReview({
owner: "username",
repo: "my-project",
pull_number: 123,
body: "代码看起来不错,有几点建议",
event: "COMMENT",
comments: [
{
path: "src/index.js",
line: 10,
body: "建议添加错误处理"
}
]
});
// 合并 PR
await mergePullRequest({
owner: "username",
repo: "my-project",
pull_number: 123,
merge_method: "squash",
commit_title: "feat: 添加新功能"
});
5. 搜索和查询
// 搜索代码
const codeResults = await searchCode({
q: "function login repo:username/my-project"
});
// 搜索 Issue
const issueResults = await searchIssues({
q: "is:open label:bug repo:username/my-project",
sort: "created",
order: "desc"
});
// 搜索仓库
const repoResults = await searchRepositories({
query: "react stars:>1000 language:javascript"
});
GitHub Actions 集成
自动化测试
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
run: npm test
自动化部署
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Deploy
run: ./deploy.sh
集成场景
1. 自动化代码审查
- 监听 PR 创建事件
- 运行代码质量检查
- 自动添加审查评论
- 标记需要改进的地方
2. Issue 自动分类
- 监听 Issue 创建
- 分析 Issue 内容
- 自动添加标签
- 分配给合适的人员
3. 发布管理
- 监听版本标签
- 生成变更日志
- 创建 GitHub Release
- 通知团队成员
4. 依赖更新
- 定期检查依赖更新
- 创建更新 PR
- 运行测试验证
- 自动合并安全更新
注意事项
- 遵守 GitHub API 速率限制
- 使用 Personal Access Token 认证
- 正确处理 API 错误和重试
- 保护敏感信息和密钥
- 遵循开源项目贡献指南
FAQ
What does the github-automation skill do?
自动化 GitHub 操作。当用户需要推送代码到 GitHub、管理仓库、创建 PR、处理 Issue、git push 失败时使用此技能。优先使用 mcporter call github.pushfiles 而不是 git push。
How do I install github-automation?
Run npx skills add https://github.com/aaaaqwq/agi-super-team --skill github-automation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/github-automation/ (personal) or .claude/skills/github-automation/ (project).
Which AI agents can use github-automation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is github-automation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains github-automation?
It is published by aaaaqwq in aaaaqwq/agi-super-team. It has 84 recorded installs.
More from aaaaqwq/agi-super-team
multi-search-engine
aaaaqwq/agi-super-team
Multi search engine integration with 17 engines (8 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and WolframAlpha knowledge queries. No API keys required.
web-scraping-automation
aaaaqwq/agi-super-team
自动化爬取网站数据和 API 接口。当用户需要抓取网页内容、调用 API、解析数据或创建爬虫脚本时使用此技能。
wechat-channel
aaaaqwq/agi-super-team
微信 (WeChat) 与 OpenClaw 的双向集成通道。基于 Wechaty + PadLocal 实现微信消息的接收和发送,支持私聊、群聊、@提及检测、图片/文件传输。当需要通过微信与 AI 助手交互、接收微信消息触发 AI 响应、或从 OpenClaw 发送消息到微信时使用此技能。
project-management
aaaaqwq/agi-super-team
Open the skill to read its SKILL.md instructions.
wecom-automation
aaaaqwq/agi-super-team
企业微信个人账号直连自动化。基于 Wechaty 框架实现企业微信消息接收、自动同意好友、知识库问答、人工介入提醒。适用于企业微信个人机器人和自动化助手场景。
feishu-automation
aaaaqwq/agi-super-team
飞书(Lark)全通道自动化。使用 lark-mcp 工具操作飞书多维表格(Bitable)、发送消息、管理文档、创建群组、自动化工作流等。当用户需要操作飞书平台、同步数据到飞书表格、发送飞书通知、管理飞书文档或自动化飞书业务流程时使用此技能。
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。