Agent skill
work-avoidance-in-github-actions
Skip unnecessary CI/CD operations before execution. Detect unchanged content, cached builds, and irrelevant paths to reduce workflow costs and execution time.
Install this agent skill to your Project
npx add-skill https://github.com/adaptive-enforcement-lab/claude-skills/tree/main/plugins/patterns/skills/work-avoidance-in-github-actions
SKILL.md
Work Avoidance in GitHub Actions
When to Use This Skill
Apply work avoidance patterns to skip unnecessary CI/CD operations.
Skip Before Execute
Detect unchanged content, cached builds, and irrelevant paths before running expensive operations.
When to Apply
Work avoidance is valuable in GitHub Actions when:
- Distribution workflows push files to many repositories
- Release automation bumps versions without content changes
- Scheduled jobs run regardless of whether work exists
- Monorepo builds trigger on any change but only need subset builds
Implementation
| Pattern | Operator Manual | Engineering Pattern |
|---|---|---|
| Skip version-only changes | Content Comparison | Volatile Field Exclusion |
| Skip unchanged paths | Path Filtering | N/A (native GitHub feature) |
| Skip cached builds | Cache-Based Skip | Cache-Based Skip |
Techniques
Implementation Patterns
| Pattern | Operator Manual | Engineering Pattern |
|---|---|---|
| Skip version-only changes | Content Comparison | Volatile Field Exclusion |
| Skip unchanged paths | Path Filtering | N/A (native GitHub feature) |
| Skip cached builds | Cache-Based Skip | Cache-Based Skip |
Anti-Patterns to Avoid
Apply work avoidance patterns to skip unnecessary CI/CD operations.
Skip Before Execute
Detect unchanged content, cached builds, and irrelevant paths before running expensive operations.
When to Apply
Work avoidance is valuable in GitHub Actions when:
- Distribution workflows push files to many repositories
- Release automation bumps versions without content changes
- Scheduled jobs run regardless of whether work exists
- Monorepo builds trigger on any change but only need subset builds
Implementation Patterns
| Pattern | Operator Manual | Engineering Pattern |
|---|---|---|
| Skip version-only changes | Content Comparison | Volatile Field Exclusion |
| Skip unchanged paths | Path Filtering | N/A (native GitHub feature) |
| Skip cached builds | Cache-Based Skip | Cache-Based Skip |
Quick Reference
Check for Meaningful Changes
See examples.md for detailed code examples.
Path-Based Filtering
on:
push:
paths:
- 'src/**'
- 'package.json'
paths-ignore:
- '**.md'
- 'docs/**'
Cache-Based Skip
See examples.md for detailed code examples.
Related
- Work Avoidance Pattern - Conceptual pattern and techniques
- File Distribution - Applies these patterns at scale
- Idempotency - Complementary pattern for safe reruns
When to Apply
Work avoidance is valuable in GitHub Actions when:
- Distribution workflows push files to many repositories
- Release automation bumps versions without content changes
- Scheduled jobs run regardless of whether work exists
- Monorepo builds trigger on any change but only need subset builds
Implementation Patterns
| Pattern | Operator Manual | Engineering Pattern |
|---|---|---|
| Skip version-only changes | Content Comparison | Volatile Field Exclusion |
| Skip unchanged paths | Path Filtering | N/A (native GitHub feature) |
| Skip cached builds | Cache-Based Skip | Cache-Based Skip |
Quick Reference
Check for Meaningful Changes
See examples.md for detailed code examples.
Path-Based Filtering
on:
push:
paths:
- 'src/**'
- 'package.json'
paths-ignore:
- '**.md'
- 'docs/**'
Cache-Based Skip
See examples.md for detailed code examples.
Related
- Work Avoidance Pattern - Conceptual pattern and techniques
- File Distribution - Applies these patterns at scale
- Idempotency - Complementary pattern for safe reruns
Examples
See examples.md for code examples.
Related Patterns
- Work Avoidance Pattern
- File Distribution
- Idempotency
References
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
github-token-permissions-overview
Understanding GITHUB_TOKEN scope, default permissions, and implementing least-privilege principle for GitHub Actions workflows.
secure
Find and fix security issues before they become incidents. Vulnerability scanning, SBOM generation, supply chain security, and secure authentication workflows.
complete-workflow-examples
Copy-paste hardened CI/CD workflows with SHA-pinned actions, minimal GITHUB_TOKEN permissions, OIDC authentication, and comprehensive security scanning for GitHub Actions.
ephemeral-runner-patterns
Disposable runner patterns for GitHub Actions. Container-based, VM-based, and ARC deployment strategies with complete state isolation between jobs.
action-pinning-overview
Why pinning GitHub Actions to SHA-256 commits matters for supply chain security. Attack vectors from unpinned actions and comparison of tag vs SHA pinning.
github-actions-security-patterns-hub
Complete security patterns for GitHub Actions covering action pinning, GITHUB_TOKEN permissions, third-party action risks, secret management, and runner security.
Didn't find tool you were looking for?