skills/ci-cd/github-actions/validator/SKILL.md
Comprehensive toolkit for validating, linting, and testing GitHub Actions workflow files, custom local actions, and public actions. Use this skill when working with GitHub Actions YAML files (.github/workflows/*.yml), validating workflow syntax, testing workflow execution with act, or debugging workflow issues.
npx skillsauth add pantheon-org/tekhne github-actions-validatorInstall 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.
Validate and test GitHub Actions workflows, custom actions, and public actions using industry-standard tools (actionlint and act). This skill provides comprehensive validation including syntax checking, static analysis, local workflow execution testing, and action verification with version-aware documentation lookup.
Every validation MUST follow these steps. Skipping any step is non-compliant.
cd .claude/skills/github-actions-validator
bash scripts/validate_workflow.sh <workflow-file-or-directory>
When actionlint or act reports ANY error, you MUST:
For each error, provide:
For any public actions (uses: owner/action@version):
references/action_versions.md for known actions and versions"[action-name] [version] github action documentation"After all errors are addressed:
references/| Error Pattern / Output Category | Reference File | Section to Consult |
|----------------------------------|---------------|--------------------|
| runs-on:, runner, ubuntu, macos, windows | references/runners.md | Runner labels |
| cron, schedule / [SCHEDULE] | references/common_errors.md | Schedule Errors |
| ${{, expression, if: / [EXPRESSION] | references/common_errors.md | Expression Errors |
| needs:, job, dependency / [SYNTAX] | references/common_errors.md | Job Configuration Errors |
| uses:, action, input / [ACTION] | references/common_errors.md | Action Errors |
| untrusted, injection, security / [SECURITY] | references/common_errors.md | Script Injection section |
| syntax, yaml, unexpected | references/common_errors.md | Syntax Errors |
| docker, container / [DOCKER] | references/act_usage.md | Troubleshooting |
| [ACT-LIMIT], act fails but GitHub works | references/act_usage.md | Limitations |
| @v3, @v4, deprecated, outdated | references/action_versions.md | Version table |
| workflow_call, reusable, oidc | references/modern_features.md | Relevant section |
| glob, path, paths:, pattern | references/common_errors.md | Path Filter Errors |
| User asks about actionlint config | references/actionlint_usage.md | Provide examples |
| Runner questions/errors | references/runners.md | Labels and availability |
cd .claude/skills/github-actions-validator
bash scripts/install_tools.sh # Installs act and actionlint to scripts/.tools/
# Full validation (lint + test)
bash scripts/validate_workflow.sh .github/workflows/ci.yml
# Lint-only (fastest, no Docker required)
bash scripts/validate_workflow.sh --lint-only .github/workflows/ci.yml
# Test-only with act (requires Docker)
bash scripts/validate_workflow.sh --test-only .github/workflows/ci.yml
# Validate all workflows
bash scripts/validate_workflow.sh .github/workflows/
actionlint checks: YAML syntax, schema compliance, expression syntax, runner labels, action inputs/outputs, job dependencies, CRON syntax, glob patterns, shell scripts, security vulnerabilities.
Note: act has limitations — see references/act_usage.md.
# Single workflow
bash scripts/validate_workflow.sh .github/workflows/ci.yml
# All workflows
bash scripts/validate_workflow.sh .github/workflows/
Key validation points: triggers, job configurations, runner labels, environment variables, secrets, conditionals, matrix strategies.
Create a test workflow that uses the custom action, then validate:
bash scripts/validate_workflow.sh .github/workflows/test-custom-action.yml
When workflows use public actions (e.g., actions/checkout@v6):
Search format: "[action-name] [version] github action documentation"
| File | Content |
|------|---------|
| references/act_usage.md | Act tool usage, commands, options, limitations, troubleshooting |
| references/actionlint_usage.md | Actionlint validation categories, configuration, integration |
| references/common_errors.md | Common errors catalog with fixes |
| references/action_versions.md | Current action versions, deprecation timeline, SHA pinning |
| references/modern_features.md | Reusable workflows, SBOM, OIDC, environments, containers |
| references/runners.md | GitHub-hosted runners (ARM64, GPU, M2 Pro, deprecations) |
| Issue | Solution |
|-------|----------|
| "Tools not found" | Run bash scripts/install_tools.sh |
| "Docker daemon not running" | Start Docker or use --lint-only |
| "Permission denied" | Run chmod +x scripts/*.sh |
| act fails but GitHub works | See references/act_usage.md Limitations |
actionlint -verbose .github/workflows/ci.yml # Verbose actionlint
act -v # Verbose act
act -n # Dry-run (no execution)
.github/workflows/ directory; files outside (like assets/) can only be validated with actionlintcd .claude/skills/github-actions-validator
bash scripts/validate_workflow.sh .github/workflows/
git add .github/workflows/ && git commit -m "Update workflows"
bash scripts/validate_workflow.sh --lint-only .github/workflows/failing.yml
# Fix issues
bash scripts/validate_workflow.sh .github/workflows/failing.yml
name: Broken CI
on:
schedule:
- cron: '0 0 * * 8' # ERROR 1
jobs:
build:
runs-on: ubuntu-lastest # ERROR 2
steps:
- uses: actions/checkout@v3 # ERROR 3 (outdated)
- run: echo ${{ github.event.issue.title }} # ERROR 4 (security)
deploy:
needs: biuld # ERROR 5 (typo)
runs-on: ubuntu-latest
steps:
- run: echo "Deploying"
bash scripts/validate_workflow.sh --lint-only workflow.yml
Output:
[ERROR] invalid CRON format "0 0 * * 8"
[ERROR] label "ubuntu-lastest" is unknown
[WARN] "github.event.issue.title" is potentially untrusted
[ERROR] job "deploy" needs job "biuld" which does not exist
Using the Error-to-Reference Mapping table above, consult the relevant reference file for each error and quote the fix to the user:
| # | Error | Reference File | Fix |
|---|-------|---------------|-----|
| 1 | invalid CRON format "0 0 * * 8" | common_errors.md - Schedule Errors | Change 8 to 0 (weekday range is 0–6) |
| 2 | label "ubuntu-lastest" is unknown | common_errors.md + runners.md | Change to ubuntu-latest |
| 3 | checkout@v3 (outdated) | action_versions.md | Update to @v6 or SHA-pinned equivalent |
| 4 | Untrusted input in run: | common_errors.md - Script Injection | Pass through environment variable |
| 5 | needs: biuld (typo) | common_errors.md - Job Configuration | Change to needs: build |
name: Fixed CI
on:
schedule:
- cron: '0 0 * * 0' # Fixed: Sunday (valid range 0-6)
jobs:
build:
runs-on: ubuntu-latest # Fixed: typo corrected
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Process issue
env:
TITLE: ${{ github.event.issue.title }} # Fixed: sanitized via env var
run: echo "$TITLE"
deploy:
needs: build # Fixed: typo corrected
runs-on: ubuntu-latest
steps:
- run: echo "Deploying"
| Error | Type | Fix Applied |
|-------|------|-------------|
| CRON 0 0 * * 8 | Schedule | Changed to 0 0 * * 0 |
| ubuntu-lastest | Runner | Changed to ubuntu-latest |
| checkout@v3 | Outdated Action | Updated to @v6.0.0 (SHA-pinned) |
| Direct ${{ }} in run | Security | Wrapped in environment variable |
| needs: biuld | Job Dependency | Changed to needs: build |
Recommendations:
bash scripts/validate_workflow.sh --check-versions regularlyactionlint catches the majority of real errors without Docker.--lint-only mode which covers syntax, schema, and security checks without requiring a container runtime.github.event.* values interpolated directly into shell commands allow a pull request author to execute arbitrary code in your workflow.SC2086 or script injection warnings as low priority and merge anyway.env: PR_TITLE: ${{ github.event.pull_request.title }} — then reference "$PR_TITLE" in the run: step.workflow_call or matrix@v2 when @v4 is current) may receive no security patches. A known vulnerability in a deprecated version is an open door into your CI environment.actions/checkout@v2 in place after the validator warns it is outdated.references/action_versions.md.install_tools.shvalidate_workflow.sh on workflow files| Topic | Reference | When to Use |
| --- | --- | --- |
| actionlint error patterns with explanations and fixes | Common Errors | Diagnosing a specific actionlint error message |
| Runner labels, availability, and hardware specs | Runners | Choosing or validating a runs-on label |
| Current version table for popular actions with SHA pins | Action Versions | Updating a deprecated or unpinned action reference |
| Local workflow testing with act, limitations and workarounds | act Usage | Running workflows locally before pushing |
| actionlint configuration and custom rule examples | actionlint Usage | Configuring actionlint or adding custom ignore rules |
| Modern GHA features: job summaries, environments, containers | Modern Features | Validating workflows that use newer GitHub Actions APIs |
tools
Generates Jenkinsfiles with stages, agents, parallel builds, post-build actions, and security scanning for Declarative and Scripted pipeline syntaxes. Use when creating a Jenkins pipeline script, Groovy pipeline, or build configuration; implementing CI/CD workflows, continuous integration, or build automation; adding Docker/Kubernetes deployments, matrix builds, parameterized pipelines, or DevSecOps security scanning to a Jenkins setup.
tools
Comprehensive toolkit for validating, linting, testing, and analyzing Helm charts and their rendered Kubernetes resources. Use this skill when working with Helm charts, validating templates, debugging chart issues, working with Custom Resource Definitions (CRDs) that require documentation lookup, or checking Helm best practices.
tools
Comprehensive toolkit for generating best practice Helm charts and resources following current standards and conventions. Use this skill when creating new Helm charts, implementing Helm templates, scaffolding Chart.yaml and values.yaml, defining deployment templates, service definitions, ingress configurations, .tpl helpers, or building Helm projects from scratch. Trigger phrases include "create", "generate", "build", "scaffold" alongside terms like "kubernetes helm", "k8s charts", "helm package", "chart dependencies", "values.yaml", or "helm install".
development
Validates .gitlab-ci.yml syntax, detects security misconfigurations in job definitions, checks for deprecated keywords, ensures proper stage ordering, and audits pipeline configurations for best practices. Use when working with .gitlab-ci.yml files, validating GitLab CI/CD pipeline syntax, debugging configuration errors, checking for hardcoded secrets or credentials in pipeline jobs, optimizing pipeline performance with DAG or cache, or performing security audits on GitLab CI/CD configurations.