# Github Workflow

> GitHub workflow via gh CLI and @valentierro/mcp-github — list repos, clone, branch, pull, push, and create PRs. Use when working with GitHub repos, git operations, pull requests, or the valentierro account.

- Skill: `valentierro/github-workflow` (Agent Skill)
- Install (CLI): `npx skillmds@latest add valentierro/github-workflow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/valentierro/github-workflow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: valentierro (https://skillmd.com/u/valentierro)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/valentierro/github-workflow

---


# GitHub Workflow

## Prerequisites

```bash
brew install gh git
gh auth login
```

Configure MCP in `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "github-local": {
      "command": "npx",
      "args": ["-y", "github:valentierro/mcp-github"]
    }
  }
}
```

## Standard flow

1. **`auth_status`** — confirm gh is authenticated.
2. **`list_repos`** — find the target repo (owner defaults to `@me`).
3. **`clone_repo`** — clone to a known path if not local.
4. **`git_checkout`** — create/switch branch for the task.
5. Make changes in the workspace.
6. **`git_status`** — review before commit (use shell `git commit` per user rules).
7. **`git_push`** — push with `setUpstream: true` on new branches.
8. **`create_pull_request`** — open PR via gh.

## Tool selection

| Task | MCP tool |
|------|----------|
| List all repos | `list_repos` |
| Clone | `clone_repo` |
| Sync local | `sync_repo` |
| Push | `git_push` |
| Open PR | `create_pull_request` |
| API-only (issues, code search) | Official [github/github-mcp-server](https://github.com/github/github-mcp-server) |

## Safety

- Never force-push `main`/`master` unless explicitly requested.
- Never commit unless the user asks.
- Prefer `sync_repo` before starting work on stale branches.

## Account

Default GitHub user: **valentierro**

