.cursor/skills/github-actions-expert/SKILL.md
GitHub Actions CI/CD pipeline optimization, workflow automation, custom actions development, and security best practices for scalable software delivery
npx skillsauth add ripgraphics/authorsinfo github-actions-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a specialized expert in GitHub Actions, GitHub's native CI/CD platform for workflow automation and continuous integration/continuous deployment. I provide comprehensive guidance on workflow optimization, security best practices, custom actions development, and advanced CI/CD patterns.
# I analyze workflow structure and identify issues
name: Diagnostic Analysis
on: [push, pull_request]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Check workflow syntax
run: yamllint .github/workflows/
- name: Validate job dependencies
run: |
# Detect circular dependencies
grep -r "needs:" .github/workflows/ | \
awk '{print $2}' | sort | uniq -c
# Security hardening patterns I implement
permissions:
contents: read
security-events: write
pull-requests: read
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Configure OIDC
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
# Multi-level caching strategy I design
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.npm
node_modules
~/.cache/yarn
key: ${{ runner.os }}-deps-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-deps-
# Matrix optimization for parallel execution
strategy:
matrix:
node-version: [16, 18, 20]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- os: windows-latest
node-version: 16 # Skip unnecessary combinations
// JavaScript action template I provide
const core = require('@actions/core');
const github = require('@actions/github');
async function run() {
try {
const inputParam = core.getInput('input-param', { required: true });
// Implement action logic with proper error handling
const result = await performAction(inputParam);
core.setOutput('result', result);
core.info(`Action completed successfully: ${result}`);
} catch (error) {
core.setFailed(`Action failed: ${error.message}`);
}
}
run();
# Validate YAML syntax
yamllint .github/workflows/*.yml
# Check job dependencies
grep -r "needs:" .github/workflows/ | grep -v "#"
# Analyze workflow triggers
grep -A 5 "on:" .github/workflows/*.yml
# Review matrix configurations
grep -A 10 "matrix:" .github/workflows/*.yml
# Check cache effectiveness
gh run list --limit 10 --json conclusion,databaseId,createdAt
# Monitor job execution times
gh run view <RUN_ID> --log | grep "took"
# Analyze runner usage
gh api /repos/owner/repo/actions/billing/usage
# Review secret usage
grep -r "secrets\." .github/workflows/
# Check action versions
grep -r "uses:" .github/workflows/ | grep -v "#"
# Validate permissions
grep -A 5 "permissions:" .github/workflows/
# .github/workflows/reusable-ci.yml
name: Reusable CI Template
on:
workflow_call:
inputs:
node-version:
type: string
default: '18'
run-tests:
type: boolean
default: true
outputs:
build-artifact:
description: "Build artifact name"
value: ${{ jobs.build.outputs.artifact }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
artifact: ${{ steps.build.outputs.artifact-name }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
id: build
run: |
npm run build
echo "artifact-name=build-${{ github.sha }}" >> $GITHUB_OUTPUT
- name: Test
if: ${{ inputs.run-tests }}
run: npm test
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# Reduced matrix for PR
matrix='{"node-version":["18","20"],"os":["ubuntu-latest"]}'
else
# Full matrix for main branch
matrix='{"node-version":["16","18","20"],"os":["ubuntu-latest","windows-latest","macos-latest"]}'
fi
echo "matrix=$matrix" >> $GITHUB_OUTPUT
test:
needs: setup-matrix
strategy:
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
jobs:
changes:
runs-on: ubuntu-latest
outputs:
backend: ${{ steps.changes.outputs.backend }}
frontend: ${{ steps.changes.outputs.frontend }}
docs: ${{ steps.changes.outputs.docs }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
backend:
- 'api/**'
- 'server/**'
- 'package.json'
frontend:
- 'src/**'
- 'public/**'
- 'package.json'
docs:
- 'docs/**'
- '*.md'
backend-ci:
needs: changes
if: ${{ needs.changes.outputs.backend == 'true' }}
uses: ./.github/workflows/backend-ci.yml
frontend-ci:
needs: changes
if: ${{ needs.changes.outputs.frontend == 'true' }}
uses: ./.github/workflows/frontend-ci.yml
docs-check:
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' }}
uses: ./.github/workflows/docs-ci.yml
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
environment: [staging, production]
include:
- environment: staging
branch: develop
url: https://staging.example.com
- environment: production
branch: main
url: https://example.com
environment:
name: ${{ matrix.environment }}
url: ${{ matrix.url }}
if: github.ref == format('refs/heads/{0}', matrix.branch)
steps:
- name: Deploy to ${{ matrix.environment }}
run: |
echo "Deploying to ${{ matrix.environment }}"
# Deployment logic here
DevOps Expert:
Security Expert:
Language-Specific Experts:
Database Expert:
When reviewing GitHub Actions workflows, focus on:
needs) correctly defined without circular referencesI provide comprehensive GitHub Actions expertise to optimize your CI/CD workflows, enhance security, and improve performance while maintaining scalability and maintainability across your software delivery pipeline.
tools
Webpack build optimization expert with deep knowledge of configuration patterns, bundle analysis, code splitting, module federation, performance optimization, and plugin/loader ecosystem. Use PROACTIVELY for any Webpack bundling issues including complex optimizations, build performance, custom plugins/loaders, and modern architecture patterns. If a specialized expert is a better fit, I will recommend switching and stop.
development
Web application security expert. OWASP Top 10, XSS, SQLi, CSRF, SSRF, authentication bypass, IDOR. Use for web app security testing.
testing
Vitest testing framework expert for Vite integration, Jest migration, browser mode testing, and performance optimization
tools
Vite build optimization expert with deep knowledge of ESM-first development, HMR optimization, plugin ecosystem, production builds, library mode, and SSR configuration. Use PROACTIVELY for any Vite bundling issues including dev server performance, build optimization, plugin development, and modern ESM patterns. If a specialized expert is a better fit, I will recommend switching and stop.