Github workflow

From Mindrally/skills · View interactive version

Github workflow is an AI agent skill from the GitHub repository Mindrally/skills. GitHub best practices for pull requests, code reviews, issues, Actions workflows, and repository management

How to use this skill

Skill file

GitHub Workflow Best Practices

You are an expert in GitHub workflows, including pull requests, code reviews, GitHub Actions, issue management, and repository best practices.

Core Principles

Pull Request Best Practices

Creating Effective Pull Requests

  1. Keep PRs small and focused
  1. Write descriptive PR titles
  1. PR Description Template

```markdown

## Summary

Brief description of changes and motivation.

## Changes

## Testing

## Related Issues

Closes #123

## Screenshots (if applicable)

```

  1. Link related issues

Stacked Pull Requests

For complex features, use stacked PRs:

  1. Create a base feature branch
  2. Create subsequent PRs that build on each other
  3. Merge in order from base to top
  4. Keep each PR small and reviewable

Code Review Guidelines

As a Reviewer

  1. Review promptly - Respond within 24 hours when possible
  2. Be constructive - Focus on improvement, not criticism
  3. Ask questions - Seek to understand before suggesting changes
  4. Prioritize feedback:

Comment Conventions

Use prefixes to indicate comment severity:

Example Review Comments

blocking: This SQL query is vulnerable to injection.
Please use parameterized queries.

suggestion: Consider extracting this logic into a separate
function for better testability.

nit: Prefer `const` over `let` here since this value
is never reassigned.

Approval Criteria

GitHub Actions

Workflow Best Practices

  1. Use workflow templates

```yaml

name: CI

on:

push:

branches: [main]

pull_request:

branches: [main]

jobs:

build:

runs-on: ubuntu-latest

steps:

uses: actions/setup-node@v4

with:

node-version: '20'

cache: 'npm'

```

  1. Cache dependencies

```yaml

with:

path: ~/.npm

key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

```

  1. Use reusable workflows

```yaml

jobs:

call-workflow:

uses: ./.github/workflows/reusable.yml

with:

environment: production

secrets: inherit

```

  1. Set appropriate timeouts

```yaml

jobs:

build:

timeout-minutes: 10

```

Security in Actions

permissions:
  contents: read
  pull-requests: write

Issue Management

Issue Templates

Create .github/ISSUE_TEMPLATE/ with templates:

Bug Report:

---
name: Bug Report
about: Report a bug
labels: bug
---

## Description
Clear description of the bug.

## Steps to Reproduce
1. Step one
2. Step two

## Expected Behavior
What should happen.

## Actual Behavior
What actually happens.

## Environment
- OS:
- Browser:
- Version:

Feature Request:

---
name: Feature Request
about: Suggest a new feature
labels: enhancement
---

## Problem
Describe the problem this feature would solve.

## Proposed Solution
Describe your proposed solution.

## Alternatives Considered
Other approaches you've considered.

Labels

Use consistent labels:

Repository Management

Branch Protection Rules

Configure for main branch:

CODEOWNERS File

# .github/CODEOWNERS
* @default-team
/docs/ @docs-team
/src/api/ @backend-team
*.js @frontend-team

Security Best Practices

  1. Enable security features
  1. Manage secrets properly
  1. Access control

Automation Recommendations

Auto-merge for Dependabot

name: Dependabot auto-merge
on: pull_request

permissions:
  contents: write
  pull-requests: write

jobs:
  dependabot:
    runs-on: ubuntu-latest
    if: github.actor == 'dependabot[bot]'
    steps:
      - name: Auto-merge minor updates
        run: gh pr merge --auto --squash "$PR_URL"
        env:
          PR_URL: ${{ github.event.pull_request.html_url }}
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Release Automation

Use semantic-release or release-please for automated releases based on conventional commits.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.