Skip to content

secondsky/claude-skills / plugins/github-project-automation/skills/github-project-automation

github-project-automation

Verified

GitHub repository automation (CI/CD, issue templates, Dependabot, CodeQL). Use for project setup, Actions workflows, security scanning, or encountering YAML syntax, workflow configuration, template structure errors.

FileKindSize
SKILL.mdskill md15.6 KB
assets/example-template.txtmarkdown416 B
references/advanced-configurations.mdmarkdown9.4 KB
references/common-errors.mdmarkdown15.2 KB
references/configuration-examples.mdmarkdown11.6 KB
references/troubleshooting-guide.mdmarkdown10.8 KB
references/workflow-patterns.mdmarkdown10.9 KB
scripts/generate-codeowners.shexecutablescript4.1 KB
scripts/setup-github-project.shexecutablescript6.0 KB
scripts/sync-templates.shexecutablescript4.7 KB
scripts/validate-workflows.shexecutablescript4.9 KB
templates/issue-templates/bug_report.ymlconfig3.2 KB
templates/issue-templates/config.ymlconfig568 B
templates/issue-templates/documentation.ymlconfig2.5 KB
templates/issue-templates/feature_request.ymlconfig2.8 KB
templates/misc/CODEOWNERSother1.7 KB
templates/misc/FUNDING.ymlconfig803 B
templates/pr-templates/PULL_REQUEST_TEMPLATE.mdmarkdown1.9 KB
templates/pr-templates/bugfix.mdmarkdown1.4 KB
templates/pr-templates/feature.mdmarkdown1.7 KB
templates/security/SECURITY.mdmarkdown3.4 KB
templates/security/codeql-config.ymlconfig1.4 KB
templates/security/dependabot.ymlconfig1.7 KB
templates/workflows/cd-production.ymlconfig2.8 KB
templates/workflows/ci-basic.ymlconfig1.4 KB
templates/workflows/ci-cloudflare-workers.ymlconfig2.3 KB
templates/workflows/ci-matrix.ymlconfig1.8 KB
templates/workflows/ci-node.ymlconfig1.6 KB
templates/workflows/ci-python.ymlconfig1.8 KB
templates/workflows/ci-react.ymlconfig2.8 KB
templates/workflows/pr-checks.ymlconfig6.0 KB
templates/workflows/release.ymlconfig6.1 KB
templates/workflows/scheduled-maintenance.ymlconfig4.1 KB
templates/workflows/security-codeql.ymlconfig2.1 KB
templates/workflows/security-dependency-review.ymlconfig1.5 KB

templates/workflows/pr-checks.yml

View on GitHub
# Pull Request Checks Workflow
# Runs checks on all pull requests
#
# Triggers on: pull_request
# Checks: Size, labels, commit conventions, branch naming

name: PR Checks

on:
  pull_request:
    types: [opened, synchronize, reopened, labeled, unlabeled]

# Least privilege: only the labels check talks to the API, and it only
# needs read access; everything else just reads the repository.
permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
  pr-size:
    name: Check PR Size
    runs-on: ubuntu-24.04
    timeout-minutes: 10

    steps:
      - name: Checkout code
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1  # v7.0.1
        with:
          fetch-depth: 0
          persist-credentials: false

      - name: Check PR size
        # Event-derived values are passed via env, never interpolated
        # directly into the script (prevents template injection).
        env:
          BASE_SHA: ${{ github.event.pull_request.base.sha }}
          HEAD_SHA: ${{ github.event.pull_request.head.sha }}
        run: |
          # Get number of changed lines
          CHANGES=$(git diff --shortstat "$BASE_SHA..$HEAD_SHA")
          ADDED=$(echo "$CHANGES" | awk '{print $4}')
          DELETED=$(echo "$CHANGES" | awk '{print $6}')
          TOTAL=$((ADDED + DELETED))

          echo "Lines changed: $TOTAL"
          echo "Added: $ADDED"
          echo "Deleted: $DELETED"

          # Warn if PR is large (>800 lines)
          if [ "$TOTAL" -gt 800 ]; then
            echo "⚠️  Large PR detected ($TOTAL lines changed)"
            echo "Consider splitting into smaller PRs for easier review"
            exit 1
          elif [ "$TOTAL" -gt 400 ]; then
            echo "⚠️  Medium-sized PR ($TOTAL lines changed)"
            echo "This is acceptable but consider splitting if possible"
          else
            echo "✅ PR size looks good ($TOTAL lines changed)"
          fi

  commit-format:
    name: Check Commit Messages
    runs-on: ubuntu-24.04
    timeout-minutes: 10

    steps:
      - name: Checkout code
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1  # v7.0.1
        with:
          fetch-depth: 0
          persist-credentials: false

      - name: Check commit messages
        # Event-derived values are passed via env, never interpolated
        # directly into the script (prevents template injection).
        env:
          BASE_SHA: ${{ github.event.pull_request.base.sha }}
          HEAD_SHA: ${{ github.event.pull_request.head.sha }}
        run: |
          # Check if commits follow conventional commits format

          echo "Checking commit messages..."
          git log --format=%s "$BASE_SHA..$HEAD_SHA" | while read -r msg; do
            if ! echo "$msg" | grep -qE '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?: .+'; then
              echo "❌ Invalid commit message: $msg"
              echo "Must follow format: type(scope): description"
              echo "Example: feat(auth): add OAuth support"
              exit 1
            else
              echo "✅ Valid: $msg"
            fi
          done

  branch-naming:
    name: Check Branch Name
    runs-on: ubuntu-24.04
    timeout-minutes: 10

    steps:
      - name: Check branch name
        # SECURITY: github.head_ref is attacker-controlled on fork PRs.
        # It is passed via env (never interpolated into the script) and
        # always referenced quoted, so a branch name cannot inject shell
        # commands into this workflow.
        env:
          BRANCH: ${{ github.head_ref }}
        run: |
          echo "Branch name: $BRANCH"

          # Check if branch follows naming convention
          # Allowed: feature/, fix/, docs/, refactor/, test/, chore/
          if ! echo "$BRANCH" | grep -qE '^(feature|fix|docs|refactor|test|chore)/[a-z0-9-]+$'; then
            echo "❌ Invalid branch name: $BRANCH"
            echo "Must follow format: type/description-in-kebab-case"
            echo "Examples: feature/add-oauth, fix/login-bug"
            exit 1
          else
            echo "✅ Branch name follows conventions"
          fi

  required-labels:
    name: Check Required Labels
    runs-on: ubuntu-24.04
    timeout-minutes: 10
    # Read-only API access is enough to inspect PR labels.
    permissions:
      contents: read
      pull-requests: read

    steps:
      - name: Check for labels
        # Event-derived values are passed via env, never interpolated
        # directly into the script (prevents template injection).
        env:
          GH_TOKEN: ${{ github.token }}
          PR_NUMBER: ${{ github.event.pull_request.number }}
        run: |
          # Get PR labels
          LABELS=$(gh pr view "$PR_NUMBER" --json labels --jq '.labels[].name' | tr '\n' ',')
          echo "PR labels: $LABELS"

          # Check if PR has at least one type label
          if ! echo "$LABELS" | grep -qE 'bug|feature|enhancement|documentation|refactor'; then
            echo "⚠️  PR is missing a type label"
            echo "Add one of: bug, feature, enhancement, documentation, refactor"
            exit 1
          else
            echo "✅ PR has required labels"
          fi

  conflict-check:
    name: Check for Merge Conflicts
    runs-on: ubuntu-24.04
    timeout-minutes: 10

    steps:
      - name: Checkout code
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1  # v7.0.1
        with:
          persist-credentials: false

      - name: Check for conflicts
        # Event-derived values are passed via env, never interpolated
        # directly into the script (prevents template injection).
        env:
          MERGEABLE: ${{ github.event.pull_request.mergeable }}
        run: |
          if [ "$MERGEABLE" = "false" ]; then
            echo "❌ PR has merge conflicts"
            echo "Please resolve conflicts before merging"
            exit 1
          else
            echo "✅ No merge conflicts detected"
          fi
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall