Create, evaluate, and optimize GitHub Actions workflows and custom actions. Use when building CI/CD pipelines, creating workflow files, developing custom actions, troubleshooting workflow failures, performing security analysis, optimizing performance, or reviewing GitHub Actions best practices. Covers Ruby/Rails, TypeScript/Node.js, Heroku and Fly.io deployments.
Creates and optimizes GitHub Actions workflows for CI/CD pipelines, custom actions, and deployments. Triggers when building workflows, troubleshooting failures, or reviewing security and performance.
/plugin marketplace add el-feo/ai-context/plugin install devops@jebs-dev-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/common-workflows.mdreferences/custom-actions.mdreferences/evaluation-guide.mdreferences/performance-optimization.mdreferences/security-checklist.mdreferences/troubleshooting.mdreferences/workflow-syntax.mdLatest Updates (2024-2025):
Action Types:
<quick_start> Create a basic workflow:
# .github/workflows/ci.yml
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: npm test
Ruby/Rails with RSpec:
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Setup database
env:
RAILS_ENV: test
run: bin/rails db:setup
- name: Run tests
run: bundle exec rspec
TypeScript/Node.js:
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
Deploy to Fly.io:
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
</quick_start>
<workflow> **Creating Workflows:**Evaluating Workflows:
Post-deployment monitoring:
<security_checklist> Critical Security Patterns:
GITHUB_TOKEN permissions: Always set to read-only by default
permissions:
contents: read
Pin actions to commit SHA (most secure):
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Use OIDC for cloud deployments (credential-less authentication):
permissions:
id-token: write
contents: read
Avoid pull_request_target with untrusted code:
Environment secrets with required reviewers:
jobs:
deploy:
environment: production
Never log secrets:
::add-mask:: for dynamic valuesecho or print statements with secret variablesAudit action sources:
See references/security-checklist.md for complete security guidelines. </security_checklist>
<common_patterns> Conditional execution:
- name: Deploy to production
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: ./deploy.sh
Matrix builds:
strategy:
matrix:
ruby-version: ['3.1', '3.2', '3.3']
os: [ubuntu-latest, macos-latest]
jobs:
test:
runs-on: ${{ matrix.os }}
Reusable workflows:
# .github/workflows/reusable.yml
on:
workflow_call:
inputs:
environment:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo "Deploying to ${{ inputs.environment }}"
# .github/workflows/main.yml
jobs:
call-reusable:
uses: ./.github/workflows/reusable.yml
with:
environment: production
Secrets in composite actions:
# Pass secrets explicitly - they're not inherited
- uses: ./.github/actions/my-action
with:
api-key: ${{ secrets.API_KEY }}
See references/common-workflows.md for Ruby/Rails, TypeScript, Heroku, and Fly.io patterns. </common_patterns>
<anti_patterns> Avoid these mistakes:
master branch references: Pin to tags or SHAsfetch-depth: 0 only when neededname: Rails CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Setup database
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
run: |
bin/rails db:create
bin/rails db:schema:load
- name: Run tests
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
run: bundle exec rspec
- name: Run RuboCop
run: bundle exec rubocop
deploy:
needs: test
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
See references/common-workflows.md for more complete examples. </examples>
<troubleshooting> **Common issues and solutions:**"Resource not accessible by integration"
contents: write or pull-requests: writeCache not restoring
Secrets not available
environment for environment secretsAction fails to find command
Timeout after 6 hours
timeout-minutes: 30 to jobs or stepsSee references/troubleshooting.md for detailed debugging strategies. </troubleshooting>
<performance_optimization> Key optimization strategies:
Dependency caching (can reduce build times by 80%):
ruby/setup-ruby with bundler-cache: trueactions/setup-node with cache: 'npm'actions/cache@v4 with hash keys from lock filesParallelization:
Selective triggers:
on:
push:
paths:
- 'src/**'
- 'package.json'
Concurrency control (cancel outdated runs):
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Self-hosted runners for heavy workloads:
See references/performance-optimization.md for advanced techniques. </performance_optimization>
<reference_guides> For detailed information on specific topics:
<success_criteria> For workflow creation:
For workflow evaluation:
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.