Buildwithclaude github-automation
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.
git clone https://github.com/davepoon/buildwithclaude
T=$(mktemp -d) && git clone --depth=1 https://github.com/davepoon/buildwithclaude "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/all-skills/skills/github-automation" ~/.claude/skills/davepoon-buildwithclaude-github-automation && rm -rf "$T"
plugins/all-skills/skills/github-automation/SKILL.mdGitHub Automation via Rube MCP
Automate GitHub repository management, issue tracking, pull request workflows, branch operations, and CI/CD through Composio's GitHub toolkit.
Toolkit docs: composio.dev/toolkits/github
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active GitHub connection via
with toolkitRUBE_MANAGE_CONNECTIONSgithub - Always call
first to get current tool schemasRUBE_SEARCH_TOOLS
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
respondsRUBE_SEARCH_TOOLS - Call
with toolkitRUBE_MANAGE_CONNECTIONSgithub - 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:
- Find target repo if unknown [Prerequisite]GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER
- List existing issues (includes PRs) [Required]GITHUB_LIST_REPOSITORY_ISSUES
- Create a new issue [Required]GITHUB_CREATE_AN_ISSUE
- Add comments to an issue [Optional]GITHUB_CREATE_AN_ISSUE_COMMENT
- Search across repos by keyword [Optional]GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS
Key parameters:
: Repository owner (username or org), case-insensitiveowner
: Repository name without .git extensionrepo
: Issue title (required for creation)title
: Issue description (supports Markdown)body
: Array of label nameslabels
: Array of GitHub usernamesassignees
: 'open', 'closed', or 'all' for filteringstate
Pitfalls:
returns both issues AND pull requests; checkGITHUB_LIST_REPOSITORY_ISSUES
field to distinguishpull_request- Only users with push access can set assignees, labels, and milestones; they are silently dropped otherwise
- Pagination:
max 100; iterate pages until emptyper_page
2. Manage Pull Requests
When to use: User wants to create, review, or merge pull requests
Tool sequence:
- Search and filter PRs [Required]GITHUB_FIND_PULL_REQUESTS
- Get detailed PR info including mergeable status [Required]GITHUB_GET_A_PULL_REQUEST
- Review changed files [Optional]GITHUB_LIST_PULL_REQUESTS_FILES
- Create a new PR [Required]GITHUB_CREATE_A_PULL_REQUEST
- Post review comments [Optional]GITHUB_CREATE_AN_ISSUE_COMMENT
- Verify CI status before merge [Optional]GITHUB_LIST_CHECK_RUNS_FOR_A_REF
- Merge after explicit user approval [Required]GITHUB_MERGE_A_PULL_REQUEST
Key parameters:
: Source branch with changes (must exist; for cross-repo: 'username:branch')head
: Target branch to merge into (e.g., 'main')base
: PR title (required unlesstitle
number provided)issue
: 'merge', 'squash', or 'rebase'merge_method
: 'open', 'closed', or 'all'state
Pitfalls:
fails with 422 if base/head are invalid, identical, or already mergedGITHUB_CREATE_A_PULL_REQUEST
can be rejected if PR is draft, closed, or branch protection appliesGITHUB_MERGE_A_PULL_REQUEST- Always verify mergeable status with
immediately before mergingGITHUB_GET_A_PULL_REQUEST - 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:
- List user's repos [Required]GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER
- Get detailed repo info [Optional]GITHUB_GET_A_REPOSITORY
- Create personal repo [Required]GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER
- Create org repo [Alternative]GITHUB_CREATE_AN_ORGANIZATION_REPOSITORY
- List branches [Required]GITHUB_LIST_BRANCHES
- Create new branch from SHA [Required]GITHUB_CREATE_A_REFERENCE
- Update repo settings [Optional]GITHUB_UPDATE_A_REPOSITORY
Key parameters:
: Repository namename
: Boolean for visibilityprivate
: Full reference path (e.g., 'refs/heads/new-branch')ref
: Commit SHA to point the new reference tosha
: Default branch namedefault_branch
Pitfalls:
only creates NEW references; useGITHUB_CREATE_A_REFERENCE
for existing onesGITHUB_UPDATE_A_REFERENCE
must start with 'refs/' and contain at least two slashesref
paginates viaGITHUB_LIST_BRANCHES
/page
; iterate until empty pageper_page
is permanent and irreversible; requires admin privilegesGITHUB_DELETE_A_REPOSITORY
4. Search Code and Commits
When to use: User wants to find code, files, or commits across repositories
Tool sequence:
- Search file contents and paths [Required]GITHUB_SEARCH_CODE
- Multi-page code search [Alternative]GITHUB_SEARCH_CODE_ALL_PAGES
- Search commits by author/date/org [Required]GITHUB_SEARCH_COMMITS_BY_AUTHOR
- List commits for a specific repo [Alternative]GITHUB_LIST_COMMITS
- Get detailed commit info [Optional]GITHUB_GET_A_COMMIT
- Get file content [Optional]GITHUB_GET_REPOSITORY_CONTENT
Key parameters:
: Search query with qualifiers (q
,language:python
,repo:owner/repo
)extension:js
/owner
: For repo-specific commit listingrepo
: Filter by commit authorauthor
/since
: ISO 8601 date range for commitsuntil
Pitfalls:
- Code search only indexes files under 384KB on default branch
- Maximum 1000 results returned from code search
requires keywords in addition to qualifiers; qualifier-only queries are not allowedGITHUB_SEARCH_COMMITS_BY_AUTHOR
returns 409 on empty reposGITHUB_LIST_COMMITS
5. Manage CI/CD and Deployments
When to use: User wants to view workflows, check CI status, or manage deployments
Tool sequence:
- List GitHub Actions workflows [Required]GITHUB_LIST_REPOSITORY_WORKFLOWS
- Get workflow details by ID or filename [Optional]GITHUB_GET_A_WORKFLOW
- Manually trigger a workflow [Required]GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT
- Check CI status for a commit/branch [Required]GITHUB_LIST_CHECK_RUNS_FOR_A_REF
- List deployments [Optional]GITHUB_LIST_DEPLOYMENTS
- Get deployment status [Optional]GITHUB_GET_A_DEPLOYMENT_STATUS
Key parameters:
: Numeric ID or filename (e.g., 'ci.yml')workflow_id
: Git reference (branch/tag) for workflow dispatchref
: JSON string of workflow inputs matchinginputson.workflow_dispatch.inputs
: Filter deployments by environment nameenvironment
Pitfalls:
requires the workflow to haveGITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT
trigger configuredworkflow_dispatch- Full path
is auto-stripped to just.github/workflows/main.ymlmain.yml - Inputs max 10 key-value pairs; must match workflow's
definitionson.workflow_dispatch.inputs
6. Manage Users and Permissions
When to use: User wants to check collaborators, permissions, or branch protection
Tool sequence:
- List repo collaborators [Required]GITHUB_LIST_REPOSITORY_COLLABORATORS
- Check specific user's access [Optional]GITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER
- Inspect branch protection rules [Required]GITHUB_GET_BRANCH_PROTECTION
- Update protection settings [Optional]GITHUB_UPDATE_BRANCH_PROTECTION
- Add/update collaborator [Optional]GITHUB_ADD_A_REPOSITORY_COLLABORATOR
Key parameters:
: 'outside', 'direct', or 'all' for collaborator filteringaffiliation
: Filter by 'pull', 'triage', 'push', 'maintain', 'admin'permission
: Branch name for protection rulesbranch
: Whether protection applies to adminsenforce_admins
Pitfalls:
returns 404 for unprotected branches; treat as no protection rulesGITHUB_GET_BRANCH_PROTECTION- Determine push ability from
orpermissions.push
, not display labelsrole_name
paginates; iterate all pagesGITHUB_LIST_REPOSITORY_COLLABORATORS
may be inconclusive for non-collaboratorsGITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER
Common Patterns
ID Resolution
- Repo name -> owner/repo:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER - PR number -> PR details:
thenGITHUB_FIND_PULL_REQUESTSGITHUB_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 number (starts at 1)page
: Results per page (max 100)per_page- 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
before mergingGITHUB_LIST_CHECK_RUNS_FOR_A_REF
Known Pitfalls
- Issues vs PRs:
returns both; checkGITHUB_LIST_REPOSITORY_ISSUES
fieldpull_request - Pagination limits:
max 100; always iterate pages until emptyper_page - Branch creation:
fails with 422 if reference already existsGITHUB_CREATE_A_REFERENCE - 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 | | , , |
| Get repo | | , |
| Create issue | | , , , |
| List issues | | , , |
| Find PRs | | , , |
| Create PR | | , , , , |
| Merge PR | | , , , |
| List branches | | , |
| Create branch | | , , , |
| Search code | | |
| List commits | | , , , |
| Search commits | | |
| List workflows | | , |
| Trigger workflow | | , , , |
| Check CI | | , , ref |
| List collaborators | | , |
| Branch protection | | , , |
Powered by Composio