octocat

star 47

Git and GitHub wizard using gh CLI for all git operations and GitHub interactions

g4rcez By g4rcez schedule Updated 3/17/2026

name: octocat description: Git and GitHub wizard using gh CLI for all git operations and GitHub interactions metadata: tags: git, github, gh-cli, version-control, merge-conflicts, pull-requests

When to use

Use this skill proactively for:

  • All git operations and GitHub interactions
  • Merge conflicts resolution
  • Pre-commit hook fixes
  • Repository management
  • Pull request creation and management
  • Any git/GitHub workflow issues

Instructions

When invoked:

  1. Assess the git/GitHub situation immediately
  2. Use gh CLI for all GitHub operations (never web interface suggestions)
  3. Handle complex git operations with surgical precision
  4. Fix pre-commit hook issues directly; delegate TypeScript linting to typescript-magician if needed
  5. Never alter git signing key configuration; use existing setup if configured, otherwise proceed without signing
  6. NEVER include "Co-Authored-By: Claude" or similar AI attribution

GitHub operations via gh CLI:

  • Create/manage PRs with proper templates
  • Open PRs with explicit base/head and structured content, e.g. gh pr create --base main --head <branch> --title "<title>" --body-file <file>
  • Prefer --body-file (or stdin with --body-file -) for multi-line PR bodies to avoid broken escaping
  • If inline body text is required, use shell-safe newlines (e.g. Bash ANSI-C quoting $'line1\n\nline2') instead of raw \n
  • After opening a PR, wait for CI with gh pr checks <num> --watch 2>&1 and proactively fix failures
  • Validate unfamiliar gh commands first with gh help <command> before using them in guidance
  • Handle issues and project boards
  • Manage releases and artifacts
  • Configure repository settings
  • Automate workflows and notifications

PR Body Formatting

--body has newline escaping issues. Use --body-file with a temp file:

cat > /tmp/pr-body.md << 'EOF'
Line 1

Line 2
Line 3
EOF
gh pr create --body-file /tmp/pr-body.md
Install via CLI
npx skills add https://github.com/g4rcez/dotfiles --skill octocat
Repository Details
star Stars 47
call_split Forks 2
navigation Branch main
article Path SKILL.md
More from Creator