con un clic
tools-github-workflow
// Full GitHub workflow orchestration via CLI - branch management, commit quality, issue triage, PR lifecycle, and worktree operations on macOS and Windows.
// Full GitHub workflow orchestration via CLI - branch management, commit quality, issue triage, PR lifecycle, and worktree operations on macOS and Windows.
Unified GitHub search across code, commits, issues, PRs, and repos using the gh CLI. Find patterns, track bugs, evaluate dependencies, and monitor changes.
Advanced git operations including rebase, cherry-pick, bisect, reflog, stash, and history manipulation for complex workflows.
GitHub Actions workflow authoring for CI/CD pipelines, job configuration, matrix builds, secrets, and common automation patterns.
Orchestrates the integration of multiple Git worktrees or branches into a single ephemeral preview branch. Automated strategy for merging, conflict detection, and verification of parallel development streams. ONLY applicable for projects using Git/GitHub.
| name | tools-github-workflow |
| description | Full GitHub workflow orchestration via CLI - branch management, commit quality, issue triage, PR lifecycle, and worktree operations on macOS and Windows. |
Manage the complete GitHub development workflow from the terminal using gh and git. Covers branch hygiene, commit crafting, issue triage, PR lifecycle, and parallel worktree operations.
# Sync with upstream
gh repo sync --force
git fetch origin main && git rebase origin/main
# Create feature branch
git switch -c feature/payments-123 origin/main
# Checkout existing PR
gh pr checkout <number>
# Set default repo
gh repo set-default org/repo
feature/<area>-<ticket> # New features
bugfix/<ticket> # Bug fixes
hotfix/<ticket> # Production fixes
release/<version> # Release branches
# Rebase on main
git fetch origin main && git rebase origin/main
# Push with tracking
git push -u origin feature/payments-123
# If conflicts: abort, fix, rerun
git rebase --abort
# List remote branches
gh api repos/:owner/:repo/git/refs/heads --jq '.[].ref'
# Delete merged branches
git branch -d <branch>
git push origin --delete <branch>
# Stale branch alias
gh alias set stale-branches '!git branch -r --merged main | grep -v main'
.gitconfig alias: sync = !gh repo sync && git fetch -pgit config --global core.autocrlf false for team consistency# Signing
git config --global user.signingkey <GPG_KEY>
git config --global commit.gpgsign true
# Message template
git config commit.template ~/.gitmessage
# Selective staging
git add -p
# Commit with conventional message
git commit -m "feat(auth): add biometric fallback
Resolves #123. Adds TouchID/FaceID fallback for password-less login."
| Prefix | Meaning |
|---|---|
feat: | New feature |
fix: | Bug fix |
refactor: | Code refactoring |
perf: | Performance improvement |
docs: | Documentation |
test: | Tests |
chore: | Maintenance |
breaking: | Breaking change |
Fixes #123 or Refs #123 (auto-closes on merge)gh issue view <id> before referencinggit commit --amend # Edit last message
git commit --amend --no-edit # Add staged, keep message
git push --force-with-lease # Safe force push (only for unpushed)
git log --show-signature -1 # Check signature
gh pr status # Clean diff vs base
gh issue list --label bug --state open --limit 50
gh issue list --state open --search "updated:<-30d" # Stale issues
gh issue list --assignee @me --state open
gh issue create --title "Crash on resume" \
--body-file templates/bug.md \
--label bug \
--assignee @me \
--project "Product Roadmap"
# View details
gh issue view 123 --json title,body,labels,comments
# Update labels
gh issue edit 123 --add-label priority/high --remove-label triage
# Assign owner
gh issue edit 123 --assignee user1
# Cross-link to PR
gh issue comment 123 --body "Tracking in PR #456"
gh issue list --json number,title,state,assignees --jq \
'.[] | [.number,.title,.state,(.assignees[].login? // "")] | @csv'
gh alias set stale '!gh issue list --state open --search "updated:<-30d"'
gh alias set my-issues '!gh issue list --assignee @me --state open'
gh alias set triage '!gh issue list --label triage --state open --limit 20'
gh pr create --base main \
--title "feat: add biometric login" \
--body-file .github/pull_request_template.md \
--reviewer user1,user2 \
--label "area:core" \
--project "Roadmap"
# Preview diff
gh pr diff
# Watch CI checks
gh pr checks --watch
# Rerun failed jobs
gh run rerun <run-id>
# Add notes
gh pr comment --body "Updated screenshots for iOS"
# Checkout PR locally
gh pr checkout <number>
# Approve
gh pr review <number> --approve
# Request changes
gh pr review <number> --request-changes --body "See inline comments"
# Merge with rebase + delete branch
gh pr merge <number> --rebase --delete-branch
gh pr list --state open --label "needs-review"
gh pr list --state open --search "review:required"
gh alias set pim '!gh pr status && gh pr checks'
gh alias set my-prs '!gh pr list --author @me --state open'
# Clone once
gh repo clone org/repo ~/code/repo
cd ~/code/repo && gh repo set-default
# Create worktree directory
mkdir -p ~/code/worktrees
# From existing branch
git worktree add ../worktrees/feature-login feature/login-form
# Create new branch
git worktree add ../worktrees/bugfix-123 -b bugfix/123
# List all
git worktree list
# Fetch all
gh repo sync
git fetch --all --prune
# Remove merged worktree
git worktree remove ../worktrees/bugfix-123
git branch -d bugfix/123
# Prune stale
git worktree prune
# macOS/Linux
git worktree add ~/code/worktrees/feature feature/branch
# Windows PowerShell
git worktree add $env:USERPROFILE\code\worktrees\feature feature/branch
gh workflow run validates branch-specific testsgit rev-parse --abbrev-ref @{u}git status clean before switching branchesgit worktree list shows only active tasks