github
Operate GitHub repositories, workflows, and PRs efficiently. Use for Actions optimization, PR hygiene, repo maintenance, and team collaboration patterns.
What this skill does
# GitHub Operations
## Current Versions (Verify Before Use)
```bash
gh --version # GitHub CLI
act --version # Local Actions runner (optional)
```
Check [GitHub CLI releases](https://github.com/cli/cli/releases) and [GitHub Actions runner releases](https://github.com/actions/runner/releases).
## Core Principles
1. **PRs are the unit of review.** Every change goes through a PR. No direct pushes to main.
2. **Actions are code.** Workflows get the same review as application code.
3. **Branch protection is mandatory.** Main requires: PR, review, passing checks, up-to-date branch.
4. **gh CLI over web UI.** Scriptable, reproducible, faster.
## PR Hygiene Checklist
- [ ] PR title describes *what* and *why* (not just the ticket number)
- [ ] Description links to issue/ticket, summarizes changes, includes screenshots for UI
- [ ] Branch is up-to-date with main (rebased or merged)
- [ ] Checks are green before requesting review
- [ ] Reviewers assigned explicitly (not just "anyone")
- [ ] PR is small enough to review in < 20 minutes (~250 lines max)
## gh CLI Patterns
```bash
# Create PR from current branch
gh pr create --title "feat: add OAuth2 login" --body-file .github/PULL_REQUEST_TEMPLATE.md
# View checks
gh pr checks --watch --fail-fast
# Checkout a PR for local review
gh pr checkout 123
# View PR diff with comments
gh pr view 123 --comments
# Merge when green
gh pr merge --squash --delete-branch
# Review from CLI
gh pr review 123 --approve --body "LGTM"
```
## Actions Optimization
### Caching
```yaml
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
```
### Matrix Strategy
```yaml
strategy:
fail-fast: false
matrix:
node: [20, 22]
os: [ubuntu-latest]
```
### Reusable Workflows
```yaml
jobs:
ci:
uses: ./.github/workflows/reusable-ci.yml
with:
node-version: 22
secrets: inherit
```
## Common Anti-Patterns
| Anti-Pattern | Why It's Wrong | Fix |
|---|---|---|
| `actions/checkout@v2` | Deprecated, security risks | Use `actions/checkout@v4` |
| `set-output` command | Deprecated | Use `GITHUB_OUTPUT` env file |
| `save-state` / `set-env` | Security vulnerability | Use `GITHUB_STATE` / `GITHUB_ENV` |
| No timeout on jobs | Runaway jobs burn minutes | `timeout-minutes: 10` |
| `pull_request_target` without care | Can expose secrets to forks | Use `pull_request` for untrusted code |
| Hardcoded secrets in workflows | Leaked in logs, not rotatable | Use GitHub Secrets + environments |
| `permissions: write-all` | Overprivileged workflows | Explicit `permissions` block |
## Validation Checklist
- [ ] `.github/workflows/` files pass `actionlint` or `yamllint`
- [ ] All `uses:` references are pinned to major version or SHA
- [ ] `permissions:` is explicitly defined (not default write-all)
- [ ] No secrets in workflow files (use `${{ secrets.XXX }}`)
- [ ] Jobs have `timeout-minutes`
- [ ] Reusable workflows are used for duplicated logic
- [ ] Branch protection rules enforce required checks
## Official Resources
- [GitHub Actions docs](https://docs.github.com/en/actions)
- [GitHub CLI manual](https://cli.github.com/manual/)
- [Security hardening for Actions](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions)
- [Reusable workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows)
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.