[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-46c1f2a2-4fe9-4cab-a0ef-4fe21e8db0cd":3,"$fo5pdqQPyuNdvjckaETMqcaNi31orxGnOZfsPzx7AX-k":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"46c1f2a2-4fe9-4cab-a0ef-4fe21e8db0cd","github-automation","自动化GitHub仓库、问题、拉取请求、分支、CI\u002FCD和权限通过Rube MCP（Composio）。管理代码工作流程、审查PR、搜索代码和程序化处理部署。","cat_coding_devops","mod_coding","sickn33,coding","---\nname: github-automation\ndescription: \"Automate GitHub repositories, issues, pull requests, branches, CI\u002FCD, and permissions via Rube MCP (Composio). Manage code workflows, review PRs, search code, and handle deployments programmatically.\"\nrisk: critical\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# GitHub Automation via Rube MCP\n\nAutomate GitHub repository management, issue tracking, pull request workflows, branch operations, and CI\u002FCD through Composio's GitHub toolkit.\n\n## Prerequisites\n\n- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)\n- Active GitHub connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `github`\n- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas\n\n## Setup\n\n**Get Rube MCP**: Add `https:\u002F\u002Frube.app\u002Fmcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.\n\n1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds\n2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `github`\n3. If connection is not ACTIVE, follow the returned auth link to complete GitHub OAuth\n4. Confirm connection status shows ACTIVE before running any workflows\n\n## Core Workflows\n\n### 1. Create and Manage Issues\n\n**When to use**: User wants to create, list, or manage GitHub issues\n\n**Tool sequence**:\n1. `GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER` - Find target repo if unknown [Prerequisite]\n2. `GITHUB_LIST_REPOSITORY_ISSUES` - List existing issues (includes PRs) [Required]\n3. `GITHUB_CREATE_AN_ISSUE` - Create a new issue [Required]\n4. `GITHUB_CREATE_AN_ISSUE_COMMENT` - Add comments to an issue [Optional]\n5. `GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS` - Search across repos by keyword [Optional]\n\n**Key parameters**:\n- `owner`: Repository owner (username or org), case-insensitive\n- `repo`: Repository name without .git extension\n- `title`: Issue title (required for creation)\n- `body`: Issue description (supports Markdown)\n- `labels`: Array of label names\n- `assignees`: Array of GitHub usernames\n- `state`: 'open', 'closed', or 'all' for filtering\n\n**Pitfalls**:\n- `GITHUB_LIST_REPOSITORY_ISSUES` returns both issues AND pull requests; check `pull_request` field to distinguish\n- Only users with push access can set assignees, labels, and milestones; they are silently dropped otherwise\n- Pagination: `per_page` max 100; iterate pages until empty\n\n### 2. Manage Pull Requests\n\n**When to use**: User wants to create, review, or merge pull requests\n\n**Tool sequence**:\n1. `GITHUB_FIND_PULL_REQUESTS` - Search and filter PRs [Required]\n2. `GITHUB_GET_A_PULL_REQUEST` - Get detailed PR info including mergeable status [Required]\n3. `GITHUB_LIST_PULL_REQUESTS_FILES` - Review changed files [Optional]\n4. `GITHUB_CREATE_A_PULL_REQUEST` - Create a new PR [Required]\n5. `GITHUB_CREATE_AN_ISSUE_COMMENT` - Post review comments [Optional]\n6. `GITHUB_LIST_CHECK_RUNS_FOR_A_REF` - Verify CI status before merge [Optional]\n7. `GITHUB_MERGE_A_PULL_REQUEST` - Merge after explicit user approval [Required]\n\n**Key parameters**:\n- `head`: Source branch with changes (must exist; for cross-repo: 'username:branch')\n- `base`: Target branch to merge into (e.g., 'main')\n- `title`: PR title (required unless `issue` number provided)\n- `merge_method`: 'merge', 'squash', or 'rebase'\n- `state`: 'open', 'closed', or 'all'\n\n**Pitfalls**:\n- `GITHUB_CREATE_A_PULL_REQUEST` fails with 422 if base\u002Fhead are invalid, identical, or already merged\n- `GITHUB_MERGE_A_PULL_REQUEST` can be rejected if PR is draft, closed, or branch protection applies\n- Always verify mergeable status with `GITHUB_GET_A_PULL_REQUEST` immediately before merging\n- Require explicit user confirmation before calling MERGE\n\n### 3. Manage Repositories and Branches\n\n**When to use**: User wants to create repos, manage branches, or update repo settings\n\n**Tool sequence**:\n1. `GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER` - List user's repos [Required]\n2. `GITHUB_GET_A_REPOSITORY` - Get detailed repo info [Optional]\n3. `GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER` - Create personal repo [Required]\n4. `GITHUB_CREATE_AN_ORGANIZATION_REPOSITORY` - Create org repo [Alternative]\n5. `GITHUB_LIST_BRANCHES` - List branches [Required]\n6. `GITHUB_CREATE_A_REFERENCE` - Create new branch from SHA [Required]\n7. `GITHUB_UPDATE_A_REPOSITORY` - Update repo settings [Optional]\n\n**Key parameters**:\n- `name`: Repository name\n- `private`: Boolean for visibility\n- `ref`: Full reference path (e.g., 'refs\u002Fheads\u002Fnew-branch')\n- `sha`: Commit SHA to point the new reference to\n- `default_branch`: Default branch name\n\n**Pitfalls**:\n- `GITHUB_CREATE_A_REFERENCE` only creates NEW references; use `GITHUB_UPDATE_A_REFERENCE` for existing ones\n- `ref` must start with 'refs\u002F' and contain at least two slashes\n- `GITHUB_LIST_BRANCHES` paginates via `page`\u002F`per_page`; iterate until empty page\n- `GITHUB_DELETE_A_REPOSITORY` is permanent and irreversible; requires admin privileges\n\n### 4. Search Code and Commits\n\n**When to use**: User wants to find code, files, or commits across repositories\n\n**Tool sequence**:\n1. `GITHUB_SEARCH_CODE` - Search file contents and paths [Required]\n2. `GITHUB_SEARCH_CODE_ALL_PAGES` - Multi-page code search [Alternative]\n3. `GITHUB_SEARCH_COMMITS_BY_AUTHOR` - Search commits by author\u002Fdate\u002Forg [Required]\n4. `GITHUB_LIST_COMMITS` - List commits for a specific repo [Alternative]\n5. `GITHUB_GET_A_COMMIT` - Get detailed commit info [Optional]\n6. `GITHUB_GET_REPOSITORY_CONTENT` - Get file content [Optional]\n\n**Key parameters**:\n- `q`: Search query with qualifiers (`language:python`, `repo:owner\u002Frepo`, `extension:js`)\n- `owner`\u002F`repo`: For repo-specific commit listing\n- `author`: Filter by commit author\n- `since`\u002F`until`: ISO 8601 date range for commits\n\n**Pitfalls**:\n- Code search only indexes files under 384KB on default branch\n- Maximum 1000 results returned from code search\n- `GITHUB_SEARCH_COMMITS_BY_AUTHOR` requires keywords in addition to qualifiers; qualifier-only queries are not allowed\n- `GITHUB_LIST_COMMITS` returns 409 on empty repos\n\n### 5. Manage CI\u002FCD and Deployments\n\n**When to use**: User wants to view workflows, check CI status, or manage deployments\n\n**Tool sequence**:\n1. `GITHUB_LIST_REPOSITORY_WORKFLOWS` - List GitHub Actions workflows [Required]\n2. `GITHUB_GET_A_WORKFLOW` - Get workflow details by ID or filename [Optional]\n3. `GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT` - Manually trigger a workflow [Required]\n4. `GITHUB_LIST_CHECK_RUNS_FOR_A_REF` - Check CI status for a commit\u002Fbranch [Required]\n5. `GITHUB_LIST_DEPLOYMENTS` - List deployments [Optional]\n6. `GITHUB_GET_A_DEPLOYMENT_STATUS` - Get deployment status [Optional]\n\n**Key parameters**:\n- `workflow_id`: Numeric ID or filename (e.g., 'ci.yml')\n- `ref`: Git reference (branch\u002Ftag) for workflow dispatch\n- `inputs`: JSON string of workflow inputs matching `on.workflow_dispatch.inputs`\n- `environment`: Filter deployments by environment name\n\n**Pitfalls**:\n- `GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT` requires the workflow to have `workflow_dispatch` trigger configured\n- Full path `.github\u002Fworkflows\u002Fmain.yml` is auto-stripped to just `main.yml`\n- Inputs max 10 key-value pairs; must match workflow's `on.workflow_dispatch.inputs` definitions\n\n### 6. Manage Users and Permissions\n\n**When to use**: User wants to check collaborators, permissions, or branch protection\n\n**Tool sequence**:\n1. `GITHUB_LIST_REPOSITORY_COLLABORATORS` - List repo collaborators [Required]\n2. `GITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER` - Check specific user's access [Optional]\n3. `GITHUB_GET_BRANCH_PROTECTION` - Inspect branch protection rules [Required]\n4. `GITHUB_UPDATE_BRANCH_PROTECTION` - Update protection settings [Optional]\n5. `GITHUB_ADD_A_REPOSITORY_COLLABORATOR` - Add\u002Fupdate collaborator [Optional]\n\n**Key parameters**:\n- `affiliation`: 'outside', 'direct', or 'all' for collaborator filtering\n- `permission`: Filter by 'pull', 'triage', 'push', 'maintain', 'admin'\n- `branch`: Branch name for protection rules\n- `enforce_admins`: Whether protection applies to admins\n\n**Pitfalls**:\n- `GITHUB_GET_BRANCH_PROTECTION` returns 404 for unprotected branches; treat as no protection rules\n- Determine push ability from `permissions.push` or `role_name`, not display labels\n- `GITHUB_LIST_REPOSITORY_COLLABORATORS` paginates; iterate all pages\n- `GITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER` may be inconclusive for non-collaborators\n\n## Common Patterns\n\n### ID Resolution\n- **Repo name -> owner\u002Frepo**: `GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER`\n- **PR number -> PR details**: `GITHUB_FIND_PULL_REQUESTS` then `GITHUB_GET_A_PULL_REQUEST`\n- **Branch name -> SHA**: `GITHUB_GET_A_BRANCH`\n- **Workflow name -> ID**: `GITHUB_LIST_REPOSITORY_WORKFLOWS`\n\n### Pagination\nAll list endpoints use page-based pagination:\n- `page`: Page number (starts at 1)\n- `per_page`: Results per page (max 100)\n- Iterate until response returns fewer results than `per_page`\n\n### Safety\n- Always verify PR mergeable status before merge\n- Require explicit user confirmation for destructive operations (merge, delete)\n- Check CI status with `GITHUB_LIST_CHECK_RUNS_FOR_A_REF` before merging\n\n## Known Pitfalls\n\n- **Issues vs PRs**: `GITHUB_LIST_REPOSITORY_ISSUES` returns both; check `pull_request` field\n- **Pagination limits**: `per_page` max 100; always iterate pages until empty\n- **Branch creation**: `GITHUB_CREATE_A_REFERENCE` fails with 422 if reference already exists\n- **Merge guards**: Merge can fail due to branch protection, failing checks, or draft status\n- **Code search limits**: Only files \u003C384KB on default branch; max 1000 results\n- **Commit search**: Requires search text keywords alongside qualifiers\n- **Destructive actions**: Repo deletion is irreversible; merge cannot be undone\n- **Silent permission drops**: Labels, assignees, milestones silently dropped without push access\n\n## Quick Reference\n\n| Task | Tool Slug | Key Params |\n|------|-----------|------------|\n| List repos | `GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER` | `type`, `sort`, `per_page` |\n| Get repo | `GITHUB_GET_A_REPOSITORY` | `owner`, `repo` |\n| Create issue | `GITHUB_CREATE_AN_ISSUE` | `owner`, `repo`, `title`, `body` |\n| List issues | `GITHUB_LIST_REPOSITORY_ISSUES` | `owner`, `repo`, `state` |\n| Find PRs | `GITHUB_FIND_PULL_REQUESTS` | `repo`, `state`, `author` |\n| Create PR | `GITHUB_CREATE_A_PULL_REQUEST` | `owner`, `repo`, `head`, `base`, `title` |\n| Merge PR | `GITHUB_MERGE_A_PULL_REQUEST` | `owner`, `repo`, `pull_number`, `merge_method` |\n| List branches | `GITHUB_LIST_BRANCHES` | `owner`, `repo` |\n| Create branch | `GITHUB_CREATE_A_REFERENCE` | `owner`, `repo`, `ref`, `sha` |\n| Search code | `GITHUB_SEARCH_CODE` | `q` |\n| List commits | `GITHUB_LIST_COMMITS` | `owner`, `repo`, `author`, `since` |\n| Search commits | `GITHUB_SEARCH_COMMITS_BY_AUTHOR` | `q` |\n| List workflows | `GITHUB_LIST_REPOSITORY_WORKFLOWS` | `owner`, `repo` |\n| Trigger workflow | `GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT` | `owner`, `repo`, `workflow_id`, `ref` |\n| Check CI | `GITHUB_LIST_CHECK_RUNS_FOR_A_REF` | `owner`, `repo`, ref |\n| List collaborators | `GITHUB_LIST_REPOSITORY_COLLABORATORS` | `owner`, `repo` |\n| Branch protection | `GITHUB_GET_BRANCH_PROTECTION` | `owner`, `repo`, `branch` |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,71,1126,"2026-05-16 13:20:31",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"DevOps","devops","mdi-cog-outline","CI\u002FCD、容器化、部署运维",3,162,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"9a3cb263-ad14-48bc-b938-89be680992e9","1.0.0","github-automation.zip",4241,"uploads\u002Fskills\u002F46c1f2a2-4fe9-4cab-a0ef-4fe21e8db0cd\u002Fgithub-automation.zip","37483f8acca13158e91664b798b8ef77226a6034c542f77bb611f873871ccde6","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":11687}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]