skills/github-automation/SKILL.md
自动化 GitHub 操作。当用户需要推送代码到 GitHub、管理仓库、创建 PR、处理 Issue、git push 失败时使用此技能。优先使用 mcporter call github.push_files 而不是 git push。
npx skillsauth add aaaaqwq/claude-code-skills github-automationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
此技能专门用于自动化 GitHub 平台的各种操作,包括:
当需要推送到 GitHub 时,优先使用 mcporter call github.push_files 而不是 git push!
方法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
查看所有可用工具:
mcporter list github --schema
常用工具:
github.push_files - 推送多个文件到仓库github.create_or_update_file - 创建或更新单个文件github.get_file_contents - 获取文件内容github.list_commits - 列出提交历史// 创建仓库
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"
});
// 创建新分支
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- 更新了文档"
});
// 创建 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"]
});
// 获取 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: 添加新功能"
});
// 搜索代码
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"
});
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
testing
通用自媒体文章自动发布工具。支持百家号、搜狐号、知乎、微信公众号、小红书、抖音号六个平台的自动化发布流程。使用Playwright自动化实现平台导航和发布,支持通过storageState管理Cookie实现账号切换。
development
# SKILL.md - Model Configuration Status (mcstatus) ## 触发条件 - `/mcstatus` 命令 - 用户询问模型配备、模型配置、model status、模型列表等 ## 功能 实时生成 Agent + Cron 的模型配置报告,展示当前所有 agent 的主模型/fallback链和所有 cron 任务的模型分配。 ## 执行步骤 ### Step 1: 收集 Agent 模型配置 读取各 agent 的 models.json 获取主模型和 fallback 链: ```bash for agent in main ops code quant data research content market finance pm law product sales batch; do config=$(cat ~/.openclaw/agents/$agent/agent/models.json 2>/dev/null) if [ -n "$config" ]; then echo "=== $agent
tools
MCP 服务器智能管理助手。自动检测 MCP 可用性、智能开关、功能问答,提供人性化的 MCP 管理体验。
tools
从GitHub搜索并自动安装配置MCP(Model Context Protocol)服务器工具到Claude配置文件。当用户需要安装MCP工具时触发此技能。工作流程:搜索GitHub上的MCP项目 -> 提取npx配置 -> 添加到~/.claude.json -> 处理API密钥(如有)。