New advertisers: 50% off your first month with code FIRSTMONTHSee slots
laurigates avatar

github-actions-plugin

GitHub Actions toolkit that adds CI/CD skills, a pipeline agent, and cost, inspection, and triage guidance.

version
1.13.8
GitHub stars
60
View on GitHub

What it does

  • Adds actions-billing-usage, github-actions-inspection, and ai-review-max-turns skills plus a cicd-pipelines agent for pipeline work
  • Covers workflow design, OIDC and Bedrock or Vertex auth, MCP server configs, and failed-run log extraction
  • Enforces cost checks through the billing-usage API, separating net from gross minutes and flagging budgets that stop jobs silently
  • Designed for teams running Claude Code in GitHub Actions who need to debug red checks and control CI spend

GitHub Actions CI/CD - workflows, authentication, inspection, auto-fix

Add marketplace

/plugin marketplace add laurigates/claude-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install github-actions-plugin@laurigates-claude-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Before Optimizing CI Cost, Read the Billing-Usage API

Promoted from the always-loaded ci-cost-read-the-billing-api.md portfolio rule, whose stub keeps the gate line.

Any "make CI cheaper / faster" task starts with a guess about where the cost is, and across a portfolio that guess is reliably wrong. The intuition follows where the interesting work is (the private repos, the big builds); the actual minutes follow how often a workflow fires, which is dominated by automation nobody thinks of as expensive. GitHub will tell you exactly, per repo, per month, per SKU — ask it first, then optimize.

When to Use This Skill

Use this skill when...Skip when...
A runner-tier, concurrency, caching, or scheduling change is pitched as a cost or speed winThe target is a single known-slow workflow you are already measuring directly
About to remove a workflow "because it must be expensive"
A bill moved and the cause isn't obvious — the per-repo × per-month breakdown localizes it in one call
Adding automation, to decide whether it gets its own job
Every job in an org fails at once with no steps and no log — see Budgets

The endpoint (the obvious one is gone)

gh api "/users/<user>/settings/billing/usage"

/users/<user>/settings/billing/actions — the endpoint most examples and most recall still name — now returns HTTP 410 "This endpoint has been moved." That 410 is easy to misread as "no billing data available on this plan" and skip the measurement entirely.

Org equivalent of the working endpoint: /orgs/<org>/settings/billing/usage.

Aggregate before reading; the raw response is one row per repo × month × SKU:

gh api "/users/<u>/settings/billing/usage" --jq '[.usageItems[] | select(.product=="actions" and .unitType=="Minutes")] | group_by(.repositoryName) | map({repo:.[0].repositoryName, minutes:(map(.quantity)|add), net:(map(.netAmount)|add)}) | sort_by(-.minutes)'

Reading it correctly

  • The filter takes the bare repo name, not owner/repo. select(.repositoryName == "<owner>/<repo>") returns [], which is indistinguishable from "this repo bills nothing"; "<repo>" returns the rows. The owner-qualified filter has reported nothing for a repo billing thousands of minutes that month, and a cost argument was nearly built on that empty result. Control-test an empty billing filter against a repo you know is active before believing it.

  • netAmount, not grossAmount, is the spend. Public-repo minutes are free and unlimited, so their rows read grossAmount == discountAmount and netAmount == 0. A repo showing a large gross may be costing nothing — but it's still where a runner-tier change would pay off once charges begin, so read both: gross for exposure, net for current spend.

  • Group by SKU too (Actions Linux vs Actions Linux Slim vs Actions macOS 3-core) — it reveals which tiers are already in use and their pricePerUnit, so the cheaper-runner arithmetic needs no lookup.

  • Read the monthly trend, not just the total. A flat annual figure hides an exponential; the decision usually turns on the slope.

  • The default response is windowed — the obvious call will not give you the trend. A bare /orgs/<org>/settings/billing/usage returns only a slice (observed 2026-08: Jan–Feb only, for a repo with a full year of activity), and nothing in the payload says it was truncated. Build the trend from explicit per-month calls and let the months you asked for be the months you got:

    for m in $(seq 1 12); do gh api "/orgs/<org>/settings/billing/usage?year=2026&month=$m" --jq "[.usageItems[] | select(.product==\"actions\" and .unitType==\"Minutes\" and .repositoryName==\"<repo>\")] | map(.quantity) | add // 0" ; done
    
  • Read the outcome distribution, not just the minutes. Minutes tell you something is expensive; outcomes tell you whether you are buying anything. An E2E suite billing close to an hour per run while cancel-in-progress killed it about halfway through succeeded a few percent of the time. "Expensive" argues for a cheaper runner; "expensive and almost never succeeding" argues for deleting or fixing the workflow. Same bill, different decision. Pull conclusions alongside cost:

    gh run list -R <owner>/<repo> --workflow <name> -L 400 --json conclusion --jq 'group_by(.conclusion) | map({(.[0].conclusion // "null"): length}) | add'
    
  • /actions/workflows/<id>/timing is empty for public repos — billable ms is only populated where minutes are billed. Approximate per-workflow cost instead:

    gh run list -R <owner>/<repo> -L 400 --json workflowName,startedAt,updatedAt
    

    then group durations by workflowName. Good enough to rank; don't quote it as billing truth — run wall-clock includes queue and finalisation time that is not billed, so it over-counts (measured ~16% above the billing API for the same repo and period). Rank with wall-clock; quote the API.

Minutes are billed per job, rounded up

"GitHub rounds the minutes and partial minutes each job uses up to the nearest whole minute" — Actions runner pricing.

Per job, not per run: a workflow with three four-second jobs bills three minutes. Linux 2-core is $0.006/min, Linux Slim $0.002/min. The billing rows show the rounding directly — the quantity for Actions Linux and Actions Linux Slim is always a whole number.

Two consequences when adding automation rather than optimizing it:

  • Fold trivial work into a job that already runs. A seconds-long check (for example, renumbering a docs file) belongs in an existing docs job rather than a workflow of its own, which would bill a whole minute per trigger.
  • A job skipped by an if: bills nothing; a job that starts and exits early still bills its rounded minute. When the point is to not pay, put the condition on the job — or on the expensive step, which also skips the model spend of an LLM-backed check.

Budgets: the hard stop, and what it looks like

An Actions budget with prevent_further_usage: true stops every GitHub-hosted job in its scope once net spend reaches the amount, tests and release automation included. It reads as a code failure:

Where you lookWhat it shows
gh pr checks / run conclusionfailure on every job, across unrelated repos
gh api repos/<o>/<r>/actions/runs/<id>/jobssteps empty, runner_name empty
gh run view <id> --log-failedlog not found
gh api repos/<o>/<r>/check-runs/<job-id>/annotations --jq '.[].message'"The job was not started because an Actions budget is preventing further use."

Read the annotation before the log: the log does not exist. Confirm with the budget list. The response carries no spend, so compare budget_amount with the month's net from the usage endpoint (The endpoint):

gh api "/organizations/<org>/settings/billing/budgets" --jq '.budgets[] | select(.budget_product_sku=="actions") | {budget_scope, budget_entity_name, budget_amount, prevent_further_usage}'

The budgets API (REST: budgets) supports full create, read, update and delete for an organization. budget_scope is organization or repository (budget_entity_name: "<owner>/<repo>"), and budget_type is ProductPricing (all of Actions) or SkuPricing (one runner SKU). Two gaps to plan around:

  • What a repo-scoped hard stop blocks is undocumented. The docs say only that "if any budget with Stop usage enabled is exhausted, additional usage is blocked", not whether a repository budget blocks that repository or the whole org. Until that is settled, set repository budgets alert-only (prevent_further_usage: false). Keep the org budget as the single hard stop.
  • Terraform cannot manage them. integrations/github 6.13.0 has no budget resource. The open request (#3561) proposes enterprise budgets only. Declare budgets in a version-controlled file and diff it against the API on a schedule instead.

A monitor that shares the budget cannot act once the stop has fired, because it is blocked too. Anything that sheds load (disabling optional workflows) must act on a projection ahead of the limit. It must also fail red when it cannot read billing: the old /billing/actions endpoint returns 410 (see The endpoint), and a monitor that treated that as "no data" stayed green for months while spend quintupled.

Why it changes the answer

In a portfolio runner audit, the plan was to move cheap jobs to a 1-CPU runner, and the expected win sat in the private repos with real pipelines. The billing API said one repo — a public plugin collection with no build step worth mentioning — was the large majority of standard-Linux minutes, driven purely by scheduled audits and PR automation. Every private repo that would have been optimized first was ≈0 minutes. The month-over-month trend (roughly tripling over a quarter, with the first net charges arriving) was what justified acting at all. Without that one query the work would have landed almost entirely in the wrong repos.

Agentic Optimizations

ContextCommand
Minutes and net spend per repothe aggregate query under The endpoint
Which runner tiers billthat query with group_by(.sku) and sku:.[0].sku in place of the repo grouping
One month, one repo (bare name)gh api "/orgs/<org>/settings/billing/usage?year=2026&month=9" --jq '[.usageItems[] | select(.product=="actions" and .unitType=="Minutes" and .repositoryName=="<repo>")] | map(.quantity) | add // 0'
Outcomes per workflowgh run list -R <o>/<r> --workflow <name> -L 400 --json conclusion --jq 'group_by(.conclusion) | map({(.[0].conclusion // "null"): length}) | add'
Was a red job refused by a budget?gh api repos/<o>/<r>/check-runs/<job-id>/annotations --jq '.[].message'
Actions budgets and their stop settinggh api "/organizations/<org>/settings/billing/budgets" --jq '.budgets[] | select(.budget_product_sku=="actions")'

Related

  • finops-plugin:github-actions-finops — the org/repo waste sweep (skipped runs, bot triggers, missing concurrency) that reads this same endpoint; this skill owns reading the endpoint itself

  • offload-to-deterministic-substrate.md (in ~/.claude/rules/) — one API call beats re-deriving cost from run logs by hand, every time.

  • code-quality-plugin:debugging-methodology § Diagnose at the Failure Point — same law applied to runtime: measure the thing, don't reason about it. Here the "failure point" is the invoice.

  • github-actions-plugin:multirepo-ci-cd — the portfolio-sweep mechanics you'll use once the billing data has told you which repos to sweep.

Readme

GitHub Actions Plugin

Complete toolkit for GitHub Actions CI/CD workflows, automation, authentication, and inspection.

This plugin provides comprehensive support for designing, implementing, and managing GitHub Actions workflows and CI/CD pipelines.

What's Inside

Skills

All skills are located in the skills/ directory:

Workflow Skills
  • workflow-dev - Automated development loop with issue creation and TDD
    • Continuous development cycles with issue tracking
    • Test-driven development workflows
    • GitHub issue integration
    • Automated PR creation and CI monitoring
Core GitHub Actions Skills
  • claude-code-github-workflows - Workflow design and automation patterns

    • PR review automation
    • Issue triage workflows
    • CI failure auto-fix
    • Custom trigger configurations
    • Path-filtered reviews
    • External contributor handling
    • Action gotchas: branch-dispatch validation skip that reports success, denials reported only as a count, bot-actor refusal after a github.token push
  • github-actions-auth-security - Authentication and security

    • Anthropic Direct API configuration
    • AWS Bedrock with OIDC
    • Google Vertex AI setup
    • Secrets management and rotation
    • Permission scoping
    • Commit signing
    • Prompt injection prevention
  • github-actions-mcp-config - MCP server configuration

    • Single and multi-server setups
    • Tool permission patterns
    • Environment variable management
    • Language-specific tool configurations
    • Security best practices
  • github-actions-inspection - Workflow debugging and inspection

    • Workflow run status checking
    • Log analysis and error extraction
    • Flaky test identification
    • Performance timing analysis
    • Common failure pattern diagnosis
GitHub Integration Skills
  • github-issue-search - Search for solutions in GitHub issues

    • Error message-based searching
    • Symptom and version-specific queries
    • Workaround discovery
    • Repository identification from stack traces
    • Best practices for effective searching
  • github-workflow-auto-fix - Automated CI failure detection and fixing

    • Triggers on workflow failures via workflow_run events
    • Analyzes failure logs and determines root cause
    • Auto-fixes common issues (linting, config, formatting)
    • Opens GitHub issues for complex or external failures
    • Safety guards against infinite loops and bot triggers
    • --reusable / --caller generate a workflow_call template (customizable auto-fix criteria, fan-out across PRs, cross-repository usage) — see the skill's REFERENCE.md
  • github-social-preview - Generate repository social preview images

    • Open Graph image creation for repositories
    • 1280x640 optimized preview images
    • Integration with nano-banana-pro
    • Multiple design templates
    • Post-generation optimization
CI Diagnosis Skills
  • multirepo-ci-cd - Diagnosing and rolling out CI across many repos

    • Fetch-first before diagnosing a failure (a stale checkout hides the workflow CI is running)
    • Read through the API, not local clones — a portfolio-wide grep answers a question about what each clone last fetched
    • IaC feature flags as the source of truth for a repo class
    • Why a re-run replays the stale @main reusable workflow, and how to force a fresh event instead
  • ai-review-max-turns - Triaging a red Claude-powered review check

    • Five causes with opposite responses: budget exhaustion, turn-ceiling overrun, an unpublishable real finding, a completed run flagged is_error: true, and a bot-actor refusal before Claude starts
    • subtype and is_error together, then the finding count, as the discriminator once Claude ran — never the red X
    • Where a turn-ceiling overrun's turns went: the execution-file tool-call listing, and the base-branch config restore that hides a PR's .claude/ edits in .claude-pr/
    • The rotating-failure-set tell for budget exhaustion
    • Why a check skipped by its file-patterns filter reports pass and is not a control
    • A workflow with ≤1 historical run has no baseline, so rerunning the identical commit becomes the primary discriminator
    • The green runaway (REFERENCE.md): a synchronize-triggered review loop has no round counter; draft does not stop it; kill switches and their blast radius
  • actions-billing-usage - Measuring Actions cost before optimizing it

    • The billing-usage endpoint (the old /billing/actions returns 410), filtered by bare repo name
    • Net vs gross, per-SKU grouping, explicit per-month calls for the trend, outcome distribution alongside minutes
    • Per-job rounding: fold trivial work into an existing job; skip with a job-level if:
    • Budgets: a stop-usage budget fails every job with zero steps and no log; the cause is only in the check-run annotation. Org budgets API, repo budgets alert-only, no Terraform resource
  • release-artifact-verification - Confirming a release actually shipped

    • The publish job fails while the tag and GitHub release look perfect — check the artifact at its public address
    • Verify from a directory with no relationship to the source tree
    • Smoke-run an image before pushing it; docker run needs -i for a heredoc-fed check

Agent

Located in agents/:

  • cicd-pipelines - Pipeline Engineer agent
    • CI/CD pipeline architecture design
    • GitHub Actions workflow optimization
    • Deployment strategy implementation
    • Build and test automation
    • Pipeline security and compliance
    • Performance optimization

Use Cases

Workflow Development

  • Design and implement GitHub Actions workflows
  • Configure authentication and secrets management
  • Set up MCP servers with proper tool permissions
  • Create custom composite actions
  • Implement matrix builds for multi-platform testing

CI/CD Automation

  • Automated PR reviews with inline comments
  • Issue triage and labeling
  • CI failure auto-fix workflows
  • Deployment orchestration
  • Security scanning integration

Debugging and Monitoring

  • Inspect workflow run status and logs
  • Analyze test failures and identify flaky tests
  • Extract error messages and stack traces
  • Monitor workflow performance
  • Compare working vs failing runs

Issue Management

  • Search GitHub issues for error solutions
  • Find workarounds for known bugs
  • Identify relevant discussions and fixes
  • Track upstream issues

Repository Enhancement

  • Generate professional social preview images
  • Create Open Graph images for better sharing
  • Optimize images for social media platforms

Getting Started

Prerequisites

  • GitHub CLI (gh) installed and authenticated
  • Access to GitHub repositories
  • For workflows: ANTHROPIC_API_KEY secret configured

Basic Workflow Setup

  1. Create .github/workflows/claude.yml:
name: Claude Code

on:
  issue_comment:
    types: [created]
  pull_request:
    types: [opened, synchronize]

jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      issues: write
    steps:
      - uses: actions/checkout@v5
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
  1. Add repository secret: ANTHROPIC_API_KEY

  2. Test by creating an issue and commenting @claude

Inspecting Workflows

# List recent workflow runs
gh run list --workflow=ci.yml --limit 10

# View failed logs
gh run view <run-id> --log-failed

# Extract errors
gh run view <run-id> --log-failed | grep -i "error\|failed"

Searching for Solutions

When encountering an error:

  1. Extract key terms from error message
  2. Identify repository from stack trace or package.json
  3. Search GitHub issues:
    "error keywords repo:org/repo is:closed"
    
  4. Review high-priority results (recently updated, many comments)
  5. Extract and test workarounds

Development Automation

Use workflow commands for automated development:

# Standard development loop
/workflow:dev

# Limit to 3 cycles
/workflow:dev --max-cycles 3

# Focus on bugs only
/workflow:dev --focus bug

Examples

CI Failure Auto-Fix

name: Auto-Fix CI Failures

on:
  workflow_run:
    workflows: ["CI"]
    types: [completed]

jobs:
  auto-fix:
    if: github.event.workflow_run.conclusion == 'failure'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            Analyze the CI failure, identify root cause,
            implement fix, and create PR

Path-Filtered Reviews

name: Review Backend Changes

on:
  pull_request:
    paths:
      - 'backend/**'
      - 'api/**'

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            Review backend changes focusing on:
            - API design
            - Database optimization
            - Security vulnerabilities

Issue Search Integration

// In your debugging workflow
const { searchIssues } = require('@octokit/plugin-search-issues');

// Search for error in repository
const results = await searchIssues({
  query: "ENOENT no such file repo:nodejs/node is:closed",
  sort: "updated",
  order: "desc"
});

Configuration

Tool Permissions

Configure allowed tools in workflows:

claude_args: |
  --allowedTools 'Bash(npm *)' 'Bash(pytest *)' 'Bash(git *)'
  --disallowedTools 'Bash(rm -rf *)' 'Bash(curl *)'

MCP Server Setup

Configure MCP servers with secrets:

claude_args: |
  --mcp-config '{
    "mcpServers": {
      "github": {
        "command": "node",
        "args": ["./github-mcp/dist/index.js"],
        "env": {"GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}"}
      }
    }
  }'

Security Best Practices

  • Always use ${{ secrets.SECRET_NAME }} for credentials
  • Implement minimal required permissions
  • Validate external inputs
  • Enable commit signing (automatic with contents: write)
  • Use OIDC for cloud provider authentication

Troubleshooting

Workflow Not Triggering

  • Check trigger conditions in if: clause
  • Verify permissions (contents, pull-requests, issues)
  • Check GitHub App installation

Authentication Failures

# Verify secret exists
gh secret list

# Test API key
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01"

CI Failures

# Find failing runs
gh run list --status=failure --limit 5

# View detailed logs
gh run view <run-id> --log-failed

# Extract specific errors
gh run view <run-id> --log-failed | grep -E "FAIL|Error" -A 5

Tool Access Issues

  • Enable specific tools with --allowedTools
  • Check tool syntax: 'Bash(npm *)' not 'Bash(npm *)'
  • Verify permissions include actions: read for CI/CD tools

Integration

This plugin works well with:

  • git-plugin - For Git operations and repository management
  • testing-plugin - For test execution and analysis
  • code-quality-plugin - For linting and code quality checks
  • python-plugin / typescript-plugin - For language-specific workflows

Resources

Official Documentation

Skills Reference

Each skill has detailed documentation including:

  • Use cases and when to apply
  • Configuration examples
  • Best practices
  • Troubleshooting guides
  • Real-world scenarios

Refer to individual skill files in skills/ for comprehensive guides.

Contributing

When adding or modifying workflows:

  1. Follow GitHub Actions best practices
  2. Use proper security measures (secrets, permissions)
  3. Test locally when possible (with act)
  4. Validate workflow syntax with actionlint
  5. Document any new patterns or configurations

License

MIT License - See repository root for details.

Support

For issues or questions:

  1. Check skill documentation in skills/ directory
  2. Review workflow examples in this README
  3. Search GitHub issues for similar problems
  4. Use the cicd-pipelines agent for complex pipeline design

Part of the Claude Plugins collection - Modular, composable skills and agents for Claude Code.

Details

Marketplace
laurigates/claude-plugins
Source
github-actions-plugin
Author
Lauri Gates
Category
Ci Cd
License
MIT
Keywords
github-actions, ci-cd, workflows, automation, auto-fix, reusable-workflows
Listed since
Apr 7, 2026

More from laurigates/claude-plugins

All 52

Similar to github-actions-plugin

More DevOps & Cloud