C

Comprehensive Github Module

Enterprise-grade skill for automate, github, workflows, assistance. Includes structured workflows, validation checks, and reusable patterns for development.

SkillClipticsdevelopmentv1.0.0MIT
0 views0 copies

GitHub Development Skill

A Claude Code skill for mastering GitHub workflows — covering repository management, pull request best practices, GitHub Actions, issue tracking, code review, branch protection, and team collaboration patterns.

When to Use This Skill

Choose this skill when:

  • Setting up repository configurations (branch protection, CODEOWNERS, templates)
  • Managing pull requests, issues, and project boards
  • Configuring GitHub Actions for CI/CD
  • Implementing code review workflows and standards
  • Using the GitHub CLI (gh) for automation
  • Managing GitHub releases and changelogs

Consider alternatives when:

  • You need GitLab or Bitbucket workflows (use platform-specific tools)
  • You need git operations only (use a git skill)
  • You need deployment automation (use a deployment skill)

Quick Start

# Install GitHub CLI brew install gh # Authenticate gh auth login # Common operations gh repo view # View repo details gh pr create --fill # Create PR with auto-filled title/body gh issue create --title "Bug" # Create an issue gh run list # List CI runs
# .github/CODEOWNERS # Require review from specific teams for specific paths *.ts @frontend-team /api/ @backend-team /infra/ @devops-team

Core Concepts

Repository Setup

ConfigurationPurposeFile/Setting
Branch protectionPrevent direct pushes to mainSettings → Branches
CODEOWNERSAuto-assign reviewers by path.github/CODEOWNERS
PR templateStandardize PR descriptions.github/pull_request_template.md
Issue templatesStructured bug/feature reports.github/ISSUE_TEMPLATE/
ActionsCI/CD automation.github/workflows/
DependabotAutomated dependency updates.github/dependabot.yml

PR Workflow with gh CLI

# Create a feature branch and PR git checkout -b feature/user-auth # ... make changes ... git add -A && git commit -m "feat: add user authentication" git push -u origin feature/user-auth gh pr create --title "Add user authentication" --body "Implements OAuth2 login flow" # Review a PR gh pr diff 42 # View diff gh pr review 42 --approve # Approve gh pr review 42 --request-changes --body "Fix the SQL injection in login.ts" # Merge and cleanup gh pr merge 42 --squash --delete-branch

Dependabot Configuration

# .github/dependabot.yml version: 2 updates: - package-ecosystem: "npm" directory: "/" schedule: interval: "weekly" open-pull-requests-limit: 10 reviewers: - "team-leads" labels: - "dependencies"

Configuration

ParameterTypeDefaultDescription
default_branchstring"main"Primary branch name
require_reviewsnumber1Required PR approvals before merge
require_cibooleantrueRequire CI passing before merge
auto_delete_branchesbooleantrueDelete branch after PR merge
squash_mergebooleantrueDefault to squash merge for PRs
dependabot_schedulestring"weekly"Dependency update frequency
codeowners_enforcebooleantrueRequire CODEOWNERS review

Best Practices

  1. Enable branch protection on main from day one — require PR reviews, CI passing, and up-to-date branches before merging; this prevents accidental pushes and broken builds on the primary branch.

  2. Use PR templates to standardize descriptions — a template with sections for "Changes," "Testing," and "Screenshots" ensures reviewers have the context they need without asking.

  3. Configure CODEOWNERS for automatic review routing — assign team-specific paths so the right reviewers are automatically requested, reducing review bottlenecks and missed reviews.

  4. Use squash merge for cleaner history — squash merging combines all PR commits into a single commit on main, keeping the history readable while preserving detailed commit history in the PR.

  5. Set up Dependabot with conservative limits — configure weekly updates with open-pull-requests-limit: 10 to avoid overwhelming the team; batch minor/patch updates and handle major upgrades individually.

Common Issues

PR reviews take too long and block progress — Set a team SLA (e.g., 24-hour review turnaround). Use CODEOWNERS to automatically assign the right reviewers and enable auto-merge for PRs that pass all checks.

Branch protection is too strict for urgent hotfixes — Create a documented bypass process: admin override with mandatory post-merge review. Don't weaken protection for all PRs to accommodate rare emergencies.

Dependabot creates too many PRs — Group related updates using Dependabot's groups configuration to create fewer, larger PRs. Set open-pull-requests-limit and schedule updates for quiet periods.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates