fixing-github-actions-builds

A troubleshooting guide for failed GitHub Actions builds. GitHub Actions runs automated checks, such as tests, when code changes are submitted.

In plain words
What is it for?
Use it to inspect recent workflow runs with the GitHub CLI, isolate failed-step logs, reproduce errors locally, and check the result.
Why use it?
It provides a defined path from finding a failed run and reading its logs to reproducing and verifying the fix.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/technickai/ai-coding-config/fixing-github-actions-builds
Clone the repo
git clone --depth 1 https://github.com/TechNickAI/ai-coding-config

Made for: Cursor.

Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00007 $0.00574
Opus 5 $0.00003 $0.00287
Sonnet 5 $0.00001 $0.00115
Haiku 4.5 $0.00001 $0.00057

Measured 2d ago against content hash 1dfce5238332, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fixing-github-actions-builds scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to fixing-github-actions-builds — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/fixing-github-actions-builds.mdc · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fixing Broken GitHub Actions Builds

Purpose

This guide documents the process for diagnosing and fixing broken GitHub Actions builds using the gh CLI.

Prerequisites

Check if gh is installed

First, verify the GitHub CLI is installed:

gh --version

If gh is not installed

Politely stop and guide the developer:

The GitHub CLI (gh) is not installed. Let's get that set up first!

Installation (macOS):

brew install gh
gh auth login

Follow the prompts to authenticate with GitHub. Once complete, we can proceed with debugging the build!

Diagnostic Workflow

Step 1: List Recent Workflow Runs

gh run list --limit 5

Identify the failed run (marked with X or failure status). Note the run ID.

Step 2: Get Failed Logs

gh run view <run-id> --log-failed | cat

This shows ONLY the logs from failed steps. Analyze these logs to identify the root cause.

Step 3: Reproduce Locally

Based on the error in the logs, reproduce the failure locally to verify the fix.

Step 4: Make the Fix

Edit the relevant files to fix the issue identified in the logs.

Step 5: Verify Locally

Test the fix thoroughly to ensure it resolves the issue.

Step 6: Report to Developer

DO NOT commit or push changes!

Report to the developer:

Build issue fixed!

Changes made:

  • path/to/file: Description of change

Next steps:

  1. Review the changes with git status and git diff
  2. Test locally if desired
  3. Commit and push when ready
  4. Monitor the new build with gh run watch

Integration with Cursor

When a developer says "the build is broken" or "fix the GitHub Actions build":

  1. Run gh --version to verify installation (stop if not installed)
  2. Run gh run list --limit 5 to see recent runs
  3. Identify the failed run ID
  4. Run gh run view <run-id> --log-failed | cat to get error details
  5. Analyze the logs and identify root cause
  6. Fix the issue locally
  7. Verify the fix works
  8. Report back to developer with changes and next steps

Read the full file on GitHub · 104 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 104 lines · 7 tokens per session scan A 1dfce5238332

Subscribe to this mod's changes

fixing-github-actions-builds is a cursor rule published in the GitHub repository TechNickAI/ai-coding-config (24 stars, last pushed 2mo ago), licensed MIT. It adds 7 tokens to every session and 574 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to fixing-github-actions-builds, differing in 1 line, and is treated as a copy.