finops-plugin/skills/github-actions-finops/SKILL.md
GitHub Actions billing, workflow efficiency, and waste analysis at org or repo level. Use when investigating CI/CD costs, wasted runs, or optimizing triggers.
npx skillsauth add laurigates/claude-plugins github-actions-finopsInstall 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.
Analyze GitHub Actions usage, costs, and efficiency across organizations and repositories.
| Use this skill when... | Use X instead when... | |------------------------|----------------------| | Analyzing CI/CD costs and billing | Debugging a specific failed workflow -- use gh-workflow-monitoring | | Identifying wasted workflow runs | Setting up new workflows -- use github-actions-workflows | | Investigating workflow trigger patterns | Managing cache keys -- use github-actions-cache-optimization | | Comparing efficiency across repos | Monitoring a single run -- use gh-workflow-monitoring |
git remote -vfind . -path '*/.github/workflows/*' -maxdepth 3 -name '*.yml' -o -name '*.yaml'gh workflow list --json id,name,stateExecute this GitHub Actions FinOps analysis:
Read the Context values above. Parse $OWNER and $REPO from the current repo URL (e.g., https://github.com/OWNER/REPO.git). Run gh api repos/$OWNER/$REPO --jq '.owner.type' to determine if the owner is an "Organization" or "User". If Organization, set $GITHUB_ORG to the repo owner for org-level billing queries.
If no repo context is available, ask the user for the target organization or repository.
Run the deterministic data-gathering script. It fetches org-level Actions billing, groups workflow runs and aggregates per-workflow durations, counts the waste indicators (skipped / bot-triggered / high-frequency), compares them against the red-flag thresholds, and emits a static fix suggestion per flagged pattern:
bash "${CLAUDE_SKILL_DIR}/scripts/github-actions-finops.sh" --home-dir "$HOME" --project-dir "$(pwd)"
Pass --repo $OWNER/$REPO (and --org $GITHUB_ORG) when the script can't infer
the target from the current checkout. Parse STATUS= and ISSUES: from the
output — STATUS=WARN plus the SEVERITY=WARN TYPE=... rows are the flagged
waste patterns with their suggested fixes. BILLING_AVAILABLE=false means org
admin access was unavailable (not an error).
Read each workflow file from .github/workflows/ and check for:
concurrency: groupspaths: filters on push/PR triggersif: github.event.sender.type != 'Bot')Synthesize a summary from the script output (Step 2) and the workflow-file findings (Step 3):
BILLING_AVAILABLE=true): minutes used, paid minutesWORKFLOW_RUNS= / WORKFLOW_DURATION_SECONDS= linesSEVERITY=WARN TYPE=... rows (skipped ratio, bot triggers, high-frequency) plus the workflow-file gaps from Step 3 (missing concurrency / path filters / bot guards)| Endpoint | Purpose | Admin Required |
|----------|---------|----------------|
| /orgs/{org}/settings/billing/actions | Minutes usage | Yes |
| /orgs/{org}/settings/billing/packages | Package bandwidth | Yes |
| /orgs/{org}/settings/billing/shared-storage | Storage billing | Yes |
| /orgs/{org}/actions/cache/usage | Org cache stats | No |
| /repos/{owner}/{repo}/actions/runs | Workflow runs | No |
| /repos/{owner}/{repo}/actions/workflows | Workflow definitions | No |
| Context | Command |
|---------|---------|
| Org billing | gh api /orgs/$ORG/settings/billing/actions --jq '{included_minutes, total_minutes_used}' |
| List repos | gh repo list $ORG --json nameWithOwner --limit 100 |
| Workflow runs | gh api "/repos/$O/$R/actions/runs?per_page=100" --jq '.workflow_runs' --jq 'length' |
| Skipped count | gh api "..." --jq '[.workflow_runs[] | select(.conclusion == "skipped")] | length' |
| Bot triggers | gh api "..." --jq '[.workflow_runs[] | select(.triggering_actor.type == "Bot")] | length' |
development
Debug HTTP APIs: trace requests, inspect headers. Use when a request fails: check status first.
documentation
Render architecture diagrams from text sources. Use when documenting system topology.
tools
Inspect JSON payloads and extract nested fields. Use when parsing API responses.
tools
--- name: no-description allowed-tools: Read --- # No Description This skill has no description and must be dropped with a warning.