Agent skill

github-actions-local-checks

Proactively run GitHub Actions pipeline checks locally before pushing code. Use when making code changes to catch test, lint, and type-check failures early.

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/moogah/claude_skills/tree/main/github-actions-local-checks

SKILL.md

GitHub Actions Local Checks

Overview

When working in a repository with GitHub Actions, run relevant pipeline checks locally before pushing. This catches failures early and is much faster than waiting for CI to run and report errors.

When to Use This Skill

  • Before committing and pushing code changes
  • After making significant changes to ensure tests still pass
  • When adding new features or fixing bugs
  • Before creating a pull request

Identifying Steps to Run Locally

Look at workflow files in .github/workflows/*.yml to identify runnable steps:

Run Locally (Fast Feedback)

  • Tests: npm test, npm run test:unit, jest --coverage
  • Linting: npm run lint, eslint .
  • Type Checking: npm run type-check, tsc --noEmit
  • Prettier/Formatting: npx prettier --check .
  • Build validation: npm run build (if fast)

Skip Locally (CI-Only)

  • Deployments: cdk deploy, deployment scripts
  • Docker builds/pushes: Slow and require credentials
  • Integration tests: If they require external services
  • Codecov uploads: CI handles this

Workflow Pattern

  1. Identify the relevant workflow file

    • For PRs: Usually .github/workflows/run-tests.yml or similar
    • For deployments: Usually .github/workflows/deploy-*.yml
  2. Find test/lint steps in the workflow

    • Look for run: commands under steps:
    • Note the working-directory: if specified
    • Identify which commands to run
  3. Run commands locally

    bash
    # Example: Run tests for a specific stack
    cd stacks/oncall-data-sync-stack
    npm run test -- --coverage
    
    # Example: Run linting
    npm run lint
    
    # Example: Type checking
    npm run type-check
    
  4. Fix any failures before pushing

Common Patterns

Matrix strategies

If workflow uses matrix (e.g., testing multiple stacks), run checks for each affected area:

yaml
matrix:
  stack: [stack-a, stack-b, stack-c]

→ Run tests in each stack directory you modified

Working directories

Match the workflow's working-directory:

yaml
- name: Run tests
  working-directory: ./stacks/my-stack
  run: npm test

→ Run cd stacks/my-stack && npm test locally

Conditional steps

If workflow has if: conditions, check if they apply to your changes:

yaml
- name: Integration tests
  if: github.event_name == 'push'
  run: npm run test:integration

→ Skip if you're just testing locally, but run if condition matches

Example

Scenario: Modified code in stacks/oncall-data-sync-stack/

Workflow file shows:

yaml
- name: Run unit tests
  working-directory: ./stacks/oncall-data-sync-stack
  run: npm run test -- --coverage

Run locally:

bash
cd stacks/oncall-data-sync-stack
npm run test -- --coverage

Result: Catches test failures before pushing, saves time waiting for CI.

Benefits

  • Faster feedback loop: Seconds vs minutes waiting for CI
  • Cheaper: No wasted CI compute on failures
  • Better workflow: Fix issues immediately while context is fresh
  • Fewer failed builds: Keep CI green

Expand your agent's capabilities with these related and highly-rated skills.

moogah/claude_skills

characterization-testing

Guide for characterization testing - capturing current system behavior to enable safe refactoring. Use when working with legacy code, undocumented systems, or code that needs modification but lacks tests. Helps create a safety net before making changes by testing what the code actually does (not what it should do).

0 0
Explore
moogah/claude_skills

bead-implementation

Execute on a Beads issue with proper discovery workflow and mandatory session close protocol. Use when starting work on a bead, during implementation when discovering new work that should be externalized, or when completing a session to ensure all work is properly committed.

0 0
Explore
moogah/claude_skills

architecture-analyzer

Perform in-depth architectural analysis of codebases through iterative dialog and visual diagrams. Use when users want to understand their software architecture, explore design patterns and anti-patterns, evaluate potential architectural changes, or gain deep insights into code structure and relationships. Particularly valuable for onboarding to unfamiliar codebases, assessing technical debt, planning refactoring efforts, or understanding how components interact across system boundaries.

0 0
Explore
moogah/claude_skills

openspec-to-beads

Convert OpenSpec artifacts (proposal.md, design.md, tasks.md, specs/) into self-contained Beads issues for implementation tracking. Use when you have completed OpenSpec planning artifacts and need to create trackable implementation tasks, or when converting any specification or design document into actionable Beads issues.

0 0
Explore
moogah/claude_skills

github-actions-troubleshooting

Troubleshoot and fix failing GitHub Actions pipeline steps. Use when user reports a failing pipeline with error output.

0 0
Explore
moogah/claude_skills

skill-learner

Reviews conversation context to identify learnings and patterns that should be captured in skills. Use when the user asks to review the session for skill creation or updates.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results