GitHub 仓库与工作流自动化
github-automation
通过 Rube MCP (Composio) 自动化 GitHub 仓库、议题(issue)、拉取请求(PR)、分支、CI/CD 和权限管理。以编程方式管理代码工作流、审查 PR、搜索代码并处理部署。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 3.4w
- Forks
- 4.0k
01 前言 Front Matter
- name
- github-automation
- metadata
- { "risk": "critical", "source": "community", "date_added": "2026-02-27" }
- description
- Automate GitHub repositories, issues, pull requests, branches, CI/CD, and permissions via Rube MCP (Composio). Manage code workflows, review PRs, search code, and handle deployments programmatically.
02 资源文件 3
03 SKILL.md 正文
GitHub Automation via Rube MCP
Automate GitHub repository management, issue tracking, pull request workflows, branch operations, and CI/CD through Composio's GitHub toolkit.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active GitHub connection via
RUBE_MANAGE_CONNECTIONSwith toolkitgithub - Always call
RUBE_SEARCH_TOOLSfirst to get current tool schemas
Setup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming
RUBE_SEARCH_TOOLSresponds - Call
RUBE_MANAGE_CONNECTIONSwith toolkitgithub - If connection is not ACTIVE, follow the returned auth link to complete GitHub OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Create and Manage Issues
When to use: User wants to create, list, or manage GitHub issues
Tool sequence:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER- Find target repo if unknown [Prerequisite]GITHUB_LIST_REPOSITORY_ISSUES- List existing issues (includes PRs) [Required]GITHUB_CREATE_AN_ISSUE- Create a new issue [Required]GITHUB_CREATE_AN_ISSUE_COMMENT- Add comments to an issue [Optional]GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS- Search across repos by keyword [Optional]
Key parameters:
owner: Repository owner (username or org), case-insensitiverepo: Repository name without .git extensiontitle: Issue title (required for creation)body: Issue description (supports Markdown)labels: Array of label namesassignees: Array of GitHub usernamesstate: 'open', 'closed', or 'all' for filtering
Pitfalls:
GITHUB_LIST_REPOSITORY_ISSUESreturns both issues AND pull requests; checkpull_requestfield to distinguish- Only users with push access can set assignees, labels, and milestones; they are silently dropped otherwise
- Pagination:
per_pagemax 100; iterate pages until empty
2. Manage Pull Requests
When to use: User wants to create, review, or merge pull requests
Tool sequence:
GITHUB_FIND_PULL_REQUESTS- Search and filter PRs [Required]GITHUB_GET_A_PULL_REQUEST- Get detailed PR info including mergeable status [Required]GITHUB_LIST_PULL_REQUESTS_FILES- Review changed files [Optional]GITHUB_CREATE_A_PULL_REQUEST- Create a new PR [Required]GITHUB_CREATE_AN_ISSUE_COMMENT- Post review comments [Optional]GITHUB_LIST_CHECK_RUNS_FOR_A_REF- Verify CI status before merge [Optional]GITHUB_MERGE_A_PULL_REQUEST- Merge after explicit user approval [Required]
Key parameters:
head: Source branch with changes (must exist; for cross-repo: 'username:branch')base: Target branch to merge into (e.g., 'main')title: PR title (required unlessissuenumber provided)merge_method: 'merge', 'squash', or 'rebase'state: 'open', 'closed', or 'all'
Pitfalls:
GITHUB_CREATE_A_PULL_REQUESTfails with 422 if base/head are invalid, identical, or already mergedGITHUB_MERGE_A_PULL_REQUESTcan be rejected if PR is draft, closed, or branch protection applies- Always verify mergeable status with
GITHUB_GET_A_PULL_REQUESTimmediately before merging - Require explicit user confirmation before calling MERGE
3. Manage Repositories and Branches
When to use: User wants to create repos, manage branches, or update repo settings
Tool sequence:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER- List user's repos [Required]GITHUB_GET_A_REPOSITORY- Get detailed repo info [Optional]GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER- Create personal repo [Required]GITHUB_CREATE_AN_ORGANIZATION_REPOSITORY- Create org repo [Alternative]GITHUB_LIST_BRANCHES- List branches [Required]GITHUB_CREATE_A_REFERENCE- Create new branch from SHA [Required]GITHUB_UPDATE_A_REPOSITORY- Update repo settings [Optional]
Key parameters:
name: Repository nameprivate: Boolean for visibilityref: Full reference path (e.g., 'refs/heads/new-branch')sha: Commit SHA to point the new reference todefault_branch: Default branch name
Pitfalls:
GITHUB_CREATE_A_REFERENCEonly creates NEW references; useGITHUB_UPDATE_A_REFERENCEfor existing onesrefmust start with 'refs/' and contain at least two slashesGITHUB_LIST_BRANCHESpaginates viapage/per_page; iterate until empty pageGITHUB_DELETE_A_REPOSITORYis permanent and irreversible; requires admin privileges
4. Search Code and Commits
When to use: User wants to find code, files, or commits across repositories
Tool sequence:
GITHUB_SEARCH_CODE- Search file contents and paths [Required]GITHUB_SEARCH_CODE_ALL_PAGES- Multi-page code search [Alternative]GITHUB_SEARCH_COMMITS_BY_AUTHOR- Search commits by author/date/org [Required]GITHUB_LIST_COMMITS- List commits for a specific repo [Alternative]GITHUB_GET_A_COMMIT- Get detailed commit info [Optional]GITHUB_GET_REPOSITORY_CONTENT- Get file content [Optional]
Key parameters:
q: Search query with qualifiers (language:python,repo:owner/repo,extension:js)owner/repo: For repo-specific commit listingauthor: Filter by commit authorsince/until: ISO 8601 date range for commits
Pitfalls:
- Code search only indexes files under 384KB on default branch
- Maximum 1000 results returned from code search
GITHUB_SEARCH_COMMITS_BY_AUTHORrequires keywords in addition to qualifiers; qualifier-only queries are not allowedGITHUB_LIST_COMMITSreturns 409 on empty repos
5. Manage CI/CD and Deployments
When to use: User wants to view workflows, check CI status, or manage deployments
Tool sequence:
GITHUB_LIST_REPOSITORY_WORKFLOWS- List GitHub Actions workflows [Required]GITHUB_GET_A_WORKFLOW- Get workflow details by ID or filename [Optional]GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT- Manually trigger a workflow [Required]GITHUB_LIST_CHECK_RUNS_FOR_A_REF- Check CI status for a commit/branch [Required]GITHUB_LIST_DEPLOYMENTS- List deployments [Optional]GITHUB_GET_A_DEPLOYMENT_STATUS- Get deployment status [Optional]
Key parameters:
workflow_id: Numeric ID or filename (e.g., 'ci.yml')ref: Git reference (branch/tag) for workflow dispatchinputs: JSON string of workflow inputs matchingon.workflow_dispatch.inputsenvironment: Filter deployments by environment name
Pitfalls:
GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENTrequires the workflow to haveworkflow_dispatchtrigger configured- Full path
.github/workflows/main.ymlis auto-stripped to justmain.yml - Inputs max 10 key-value pairs; must match workflow's
on.workflow_dispatch.inputsdefinitions
6. Manage Users and Permissions
When to use: User wants to check collaborators, permissions, or branch protection
Tool sequence:
GITHUB_LIST_REPOSITORY_COLLABORATORS- List repo collaborators [Required]GITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER- Check specific user's access [Optional]GITHUB_GET_BRANCH_PROTECTION- Inspect branch protection rules [Required]GITHUB_UPDATE_BRANCH_PROTECTION- Update protection settings [Optional]GITHUB_ADD_A_REPOSITORY_COLLABORATOR- Add/update collaborator [Optional]
Key parameters:
affiliation: 'outside', 'direct', or 'all' for collaborator filteringpermission: Filter by 'pull', 'triage', 'push', 'maintain', 'admin'branch: Branch name for protection rulesenforce_admins: Whether protection applies to admins
Pitfalls:
GITHUB_GET_BRANCH_PROTECTIONreturns 404 for unprotected branches; treat as no protection rules- Determine push ability from
permissions.pushorrole_name, not display labels GITHUB_LIST_REPOSITORY_COLLABORATORSpaginates; iterate all pagesGITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USERmay be inconclusive for non-collaborators
Common Patterns
ID Resolution
- Repo name -> owner/repo:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER - PR number -> PR details:
GITHUB_FIND_PULL_REQUESTSthenGITHUB_GET_A_PULL_REQUEST - Branch name -> SHA:
GITHUB_GET_A_BRANCH - Workflow name -> ID:
GITHUB_LIST_REPOSITORY_WORKFLOWS
Pagination
All list endpoints use page-based pagination:
page: Page number (starts at 1)per_page: Results per page (max 100)- Iterate until response returns fewer results than
per_page
Safety
- Always verify PR mergeable status before merge
- Require explicit user confirmation for destructive operations (merge, delete)
- Check CI status with
GITHUB_LIST_CHECK_RUNS_FOR_A_REFbefore merging
Known Pitfalls
- Issues vs PRs:
GITHUB_LIST_REPOSITORY_ISSUESreturns both; checkpull_requestfield - Pagination limits:
per_pagemax 100; always iterate pages until empty - Branch creation:
GITHUB_CREATE_A_REFERENCEfails with 422 if reference already exists - Merge guards: Merge can fail due to branch protection, failing checks, or draft status
- Code search limits: Only files <384KB on default branch; max 1000 results
- Commit search: Requires search text keywords alongside qualifiers
- Destructive actions: Repo deletion is irreversible; merge cannot be undone
- Silent permission drops: Labels, assignees, milestones silently dropped without push access
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| List repos | GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER |
type, sort, per_page |
| Get repo | GITHUB_GET_A_REPOSITORY |
owner, repo |
| Create issue | GITHUB_CREATE_AN_ISSUE |
owner, repo, title, body |
| List issues | GITHUB_LIST_REPOSITORY_ISSUES |
owner, repo, state |
| Find PRs | GITHUB_FIND_PULL_REQUESTS |
repo, state, author |
| Create PR | GITHUB_CREATE_A_PULL_REQUEST |
owner, repo, head, base, title |
| Merge PR | GITHUB_MERGE_A_PULL_REQUEST |
owner, repo, pull_number, merge_method |
| List branches | GITHUB_LIST_BRANCHES |
owner, repo |
| Create branch | GITHUB_CREATE_A_REFERENCE |
owner, repo, ref, sha |
| Search code | GITHUB_SEARCH_CODE |
q |
| List commits | GITHUB_LIST_COMMITS |
owner, repo, author, since |
| Search commits | GITHUB_SEARCH_COMMITS_BY_AUTHOR |
q |
| List workflows | GITHUB_LIST_REPOSITORY_WORKFLOWS |
owner, repo |
| Trigger workflow | GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT |
owner, repo, workflow_id, ref |
| Check CI | GITHUB_LIST_CHECK_RUNS_FOR_A_REF |
owner, repo, ref |
| List collaborators | GITHUB_LIST_REPOSITORY_COLLABORATORS |
owner, repo |
| Branch protection | GITHUB_GET_BRANCH_PROTECTION |
owner, repo, branch |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
04 同仓库更多 Skills
wealthville-pool-scoring
Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter/Hold/Exit/Reduce/Avoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.
technical-debt-auditor
Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO/FIXME/HACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like "where should I focus refactoring", "find code smells", "audit my codebase", "what technical debt do we have", "prioritize cleanup work", or asks about code quality metrics. Also trigger when the user mentions "code rot", "legacy cleanup", "refactoring priorities", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say "technical debt" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.
readonly-sql-guard
Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production/ERP/analytics database (a "query" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write/DDL/side-effect/transaction-escape risks. Checks what a statement CALLS, not just its shape.
Claude 网页 Artifact 构建
web-artifacts-builder
用于创建精细的、多组件的 claude.ai HTML artifact 的工具套件,采用现代前端 Web 技术(React、Tailwind CSS、shadcn/ui)。适用于需要状态管理、路由或 shadcn/ui 组件的复杂 artifact —— 不适用于简单的单文件 HTML/JSX artifact。
Playwright Web 应用测试
webapp-testing
使用 Playwright 与本地 Web 应用进行交互和测试的工具包。支持验证前端功能、调试 UI 行为、捕获浏览器截图以及查看浏览器日志。
回复事实核查追问
discernment-nudge
在你给出用户可能据以行动的实质性答案或草稿之后——建议或推荐、起草的工件(如目标、计划、推介、提案或电子邮件)、估计或预测、数据分析或解读、他们可能依赖的事实声明,或多步骤论证——在最终确定回复之前调用本技能,然后,如适用,附加 2-3 个简短的后续问题,每个问题都与你刚刚产出的具体内容相关,帮助用户核查关键事实、探究推理或假设,并注意到缺失的上下文。每次对话最多执行一次。当用户询问琐碎的操作方法或简单查找、想要纯教育性解释、仅要求根据提供的内容格式化/转换/组装文件、正在编写将要运行的代码、正在进行创意写作或休闲聊天,或已经要求你复核、引用或审查时跳过——技能文件解释了这些边界和确切的输出格式。