ancoleman/ai-design-components/writing-github-actions
Claude Code and agent skill by ancoleman/ai-design-components
- community
Checking that the SKILL.md file is still in the repository.
Write GitHub Actions workflows with proper syntax, reusable workflows, composite actions, matrix builds, caching, and security best practices. Use when creating CI/CD workflows for GitHub-hosted projects or automating GitHub repository tasks.
Install
npx vskill@latest install ancoleman/ai-design-components/writing-github-actionsSKILL.md
Writing GitHub Actions
Create GitHub Actions workflows for CI/CD pipelines, automated testing, deployments, and repository automation using YAML-based configuration with native GitHub integration.
Purpose
GitHub Actions is the native CI/CD platform for GitHub repositories. This skill covers workflow syntax, triggers, job orchestration, reusable patterns, optimization techniques, and security practices specific to GitHub Actions.
Core Focus:
- Workflow YAML syntax and structure
- Reusable workflows and composite actions
- Matrix builds and parallel execution
- Caching and optimization strategies
- Secrets management and OIDC authentication
- Concurrency control and artifact management
Not Covered:
- CI/CD pipeline design strategy → See
building-ci-pipelines - GitOps deployment patterns → See
gitops-workflows - Infrastructure as code → See
infrastructure-as-code - Testing frameworks → See
testing-strategies
When to Use This Skill
Trigger this skill when:
- Creating CI/CD workflows for GitHub repositories
- Automating tests, builds, and deployments via GitHub Actions
- Setting up reusable workflows across multiple repositories
- Optimizing workflow performance with caching and parallelization
- Implementing security best practices for GitHub Actions
- Troubleshooting GitHub Actions YAML syntax or behavior
Workflow Fundamentals
Basic Workflow Structure
Key Components:
name: Workflow display nameon: Trigger events (push, pull_request, schedule, workflow_dispatch)jobs: Job definitions (run in parallel by default)runs-on: Runner type (ubuntu-latest, windows-latest, macos-latest)steps: Sequential operations (uses actions or run commands)
Common Triggers
For complete trigger reference, see references/triggers-events.md.
Decision Frameworks
Reusable Workflow vs Composite Action
Use Reusable Workflow when:
- Standardizing entire CI/CD jobs across repositories
- Need complete job replacement with inputs/outputs
- Want secrets to inherit by default
- Orchestrating multiple steps with job-level configuration
Use Composite Action when:
- Packaging 5-20 step sequences for reuse
- Need step-level abstraction within jobs
- Want to distribute via marketplace or private repos
- Require local file access without artifacts
| Feature | Reusable Workflow | Composite Action | |
|---|---|---|---|
| Scope | Complete job | Step sequence | |
| Trigger | workflow_call | uses: in step | |
| Secrets | Inherit by default | Must pass explicitly | |
| File Sharing | Requires artifacts | Same runner/workspace |
For detailed patterns, see references/reusable-workflows.md and references/composite-actions.md.
Caching Strategy
Use Built-in Setup Action Caching (Recommended):
Available for: Node.js, Python (pip), Java (maven/gradle), .NET, Go
Use Manual Caching when:
- Need custom cache keys
- Caching build outputs or non-standard paths
- Implementing multi-layer cache strategies
For optimization techniques, see references/caching-strategies.md.
Self-Hosted vs GitHub-Hosted Runners
Use GitHub-Hosted Runners when:
- Standard build environments sufficient
- No private network access required
- Within budget or free tier limits
Use Self-Hosted Runners when:
- Need specific hardware (GPU, ARM, high memory)
- Require private network/VPN access
- High usage volume (cost optimization)
- Custom software must be pre-installed
Common Patterns
Multi-Job Workflow with Dependencies
Key Elements:
needs:creates job dependencies (sequential execution)- Artifacts pass data between jobs
if:enables conditional executionenvironment:enables protection rules and environment secrets
Matrix Builds
Result: 9 jobs (3 OS × 3 Node versions)
For advanced matrix patterns, see examples/matrix-build.yml.
Concurrency Control
Reusable Workflows
Defining a Reusable Workflow
File: .github/workflows/reusable-build.yml
Calling a Reusable Workflow
For complete reusable workflow guide, see references/reusable-workflows.md.
Composite Actions
Defining a Composite Action
File: .github/actions/setup-project/action.yml
Key Requirements:
runs.using: "composite"marks action typeshell:required for allrunsteps- Access inputs via
${{ inputs.name }}
Using a Composite Action
For detailed composite action patterns, see references/composite-actions.md.
Security Best Practices
Secrets Management
OIDC Authentication (No Long-Lived Credentials)
Minimal Permissions
Action Pinning
Enable Dependabot:
File: .github/dependabot.yml
For comprehensive security guide, see references/security-practices.md.
Optimization Techniques
Use built-in caching in setup actions (cache: 'npm'), run independent jobs in parallel, add conditional execution with if:, and minimize checkout depth (fetch-depth: 1).
For detailed optimization strategies, see references/caching-strategies.md.
Context Variables
Common contexts: github.*, secrets.*, inputs.*, matrix.*, runner.*
For complete syntax reference, see references/workflow-syntax.md.
Progressive Disclosure
Detailed References
For comprehensive coverage of specific topics:
- references/workflow-syntax.md - Complete YAML syntax reference
- references/reusable-workflows.md - Advanced reusable workflow patterns
- references/composite-actions.md - Composite action deep dive
- references/caching-strategies.md - Optimization and caching techniques
- references/security-practices.md - Comprehensive security guide
- references/triggers-events.md - All trigger types and event filters
- references/marketplace-actions.md - Recommended actions catalog
Working Examples
Complete workflow templates ready to use:
- examples/basic-ci.yml - Simple CI workflow
- examples/matrix-build.yml - Matrix strategy examples
- examples/reusable-deploy.yml - Reusable deployment workflow
- examples/composite-setup/ - Composite action template
- examples/monorepo-workflow.yml - Monorepo with path filters
- examples/security-scan.yml - Security scanning workflow
Validation Scripts
- scripts/validate-workflow.sh - Validate YAML syntax
Related Skills
building-ci-pipelines- CI/CD pipeline design strategygitops-workflows- GitOps deployment patternsinfrastructure-as-code- Terraform/Pulumi integrationtesting-strategies- Test frameworks and coveragesecurity-hardening- SAST/DAST toolsgit-workflows- Understanding branches and PRs
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/writing-github-actions/SKILL.md
Popularity
- Repository stars
- 357
- Repository forks
- 54
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 9 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ancoleman/ai-design-components/writing-github-actions)