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

scripts/validate-workflows.sh

View on GitHub
#!/bin/bash
# Workflow Validation Script
# Validates GitHub Actions workflows for syntax errors
#
# Usage: ./scripts/validate-workflows.sh

set -e

# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'

print_header() {
    echo ""
    echo -e "${BLUE}===================================${NC}"
    echo -e "${BLUE}$1${NC}"
    echo -e "${BLUE}===================================${NC}"
    echo ""
}

print_success() {
    echo -e "${GREEN}✓${NC} $1"
}

print_warning() {
    echo -e "${YELLOW}⚠${NC} $1"
}

print_error() {
    echo -e "${RED}✗${NC} $1"
}

print_header "GitHub Workflows Validation"

# Check if .github/workflows exists
if [ ! -d ".github/workflows" ]; then
    print_error "No .github/workflows directory found"
    exit 1
fi

# Count workflow files
WORKFLOW_COUNT=$(find .github/workflows -name "*.yml" -o -name "*.yaml" | wc -l)

if [ "$WORKFLOW_COUNT" -eq 0 ]; then
    print_warning "No workflow files found in .github/workflows"
    exit 0
fi

echo "Found $WORKFLOW_COUNT workflow file(s)"
echo ""

# Check if yamllint is installed
HAS_YAMLLINT=false
if command -v yamllint &> /dev/null; then
    HAS_YAMLLINT=true
fi

# Check if yq is installed (alternative YAML parser)
HAS_YQ=false
if command -v yq &> /dev/null; then
    HAS_YQ=true
fi

ERRORS=0

# Validate each workflow
for workflow in .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null; do
    [ -f "$workflow" ] || continue

    filename=$(basename "$workflow")
    echo "Validating: $filename"

    # Basic checks
    ISSUES=()

    # Check for @latest usage (Error #3)
    if grep -q "@latest" "$workflow"; then
        ISSUES+=("Uses @latest for action versions (should use SHA)")
    fi

    # Check for ubuntu-latest (Error #4)
    if grep -q "runs-on:.*ubuntu-latest" "$workflow"; then
        ISSUES+=("Uses ubuntu-latest (should use ubuntu-24.04)")
    fi

    # Check for incorrect secrets syntax (Error #6)
    if grep -q '\$secrets\.' "$workflow"; then
        ISSUES+=("Incorrect secrets syntax (missing {{ }})")
    fi

    # Check for required fields
    if ! grep -q "^name:" "$workflow"; then
        ISSUES+=("Missing 'name:' field")
    fi

    if ! grep -q "^on:" "$workflow"; then
        ISSUES+=("Missing 'on:' trigger")
    fi

    # YAML syntax validation
    if [ "$HAS_YAMLLINT" = true ]; then
        if ! yamllint -d relaxed "$workflow" >/dev/null 2>&1; then
            ISSUES+=("YAML syntax errors (run yamllint for details)")
        fi
    elif [ "$HAS_YQ" = true ]; then
        if ! yq eval '.' "$workflow" >/dev/null 2>&1; then
            ISSUES+=("YAML syntax errors")
        fi
    else
        # Basic Python YAML check
        if command -v python3 &> /dev/null; then
            if ! python3 -c "import yaml; yaml.safe_load(open('$workflow'))" 2>/dev/null; then
                ISSUES+=("YAML syntax errors")
            fi
        fi
    fi

    # Report results
    if [ ${#ISSUES[@]} -eq 0 ]; then
        print_success "$filename"
    else
        print_error "$filename - ${#ISSUES[@]} issue(s) found:"
        for issue in "${ISSUES[@]}"; do
            echo "    - $issue"
        done
        ERRORS=$((ERRORS + 1))
    fi

    echo ""
done

# Validate dependabot.yml if it exists
if [ -f ".github/dependabot.yml" ]; then
    echo "Validating: dependabot.yml"

    ISSUES=()

    # Check for version field
    if ! grep -q "^version:" ".github/dependabot.yml"; then
        ISSUES+=("Missing 'version:' field")
    fi

    # Check for updates field
    if ! grep -q "updates:" ".github/dependabot.yml"; then
        ISSUES+=("Missing 'updates:' section")
    fi

    # YAML syntax validation
    if [ "$HAS_YAMLLINT" = true ]; then
        if ! yamllint -d relaxed ".github/dependabot.yml" >/dev/null 2>&1; then
            ISSUES+=("YAML syntax errors")
        fi
    elif [ "$HAS_YQ" = true ]; then
        if ! yq eval '.' ".github/dependabot.yml" >/dev/null 2>&1; then
            ISSUES+=("YAML syntax errors")
        fi
    fi

    if [ ${#ISSUES[@]} -eq 0 ]; then
        print_success "dependabot.yml"
    else
        print_error "dependabot.yml - ${#ISSUES[@]} issue(s) found:"
        for issue in "${ISSUES[@]}"; do
            echo "    - $issue"
        done
        ERRORS=$((ERRORS + 1))
    fi

    echo ""
fi

# Summary
print_header "Validation Summary"

if [ $ERRORS -eq 0 ]; then
    print_success "All workflows validated successfully!"
    echo ""
    echo "Next steps:"
    echo "  1. Commit your changes: git add .github/ && git commit -m \"Add workflows\""
    echo "  2. Push to GitHub: git push"
    echo "  3. Check Actions tab for workflow runs"
    exit 0
else
    print_error "$ERRORS file(s) with issues"
    echo ""
    echo "Fix the issues above before committing."
    echo ""
    echo "Recommended tools:"
    if [ "$HAS_YAMLLINT" = false ]; then
        echo "  - Install yamllint: pip install yamllint"
    fi
    echo "  - GitHub CLI: gh workflow list"
    echo "  - Online validator: https://www.yamllint.com/"
    exit 1
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: 468kUpdated 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: 468kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 468kUpdated 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