agentleFS
agentsdanceagentsdance/agentskills/skills/ci-pipeline-debugger/SKILL.md

ci-pipeline-debugger

Skill3 starsChanged 11 months agoApache-2.0View on GitHub

Debug CI/CD pipeline failures. Use when the user has failing builds, test failures in CI, or deployment issues.

  • Reads credentials
  • Deletes or force-pushes
  • Installs packages

The file

Files
SKILL.md

CI Pipeline Debugger

Troubleshoot and fix CI/CD pipeline failures.

Common Failure Categories

CategorySymptomsSolutions
Dependenciesnpm install failsClear cache, check versions
TestsFlaky failuresAdd retries, fix race conditions
BuildCompilation errorsCheck code, environment
DeploymentConnection failuresCheck credentials, networking
ResourcesOut of memoryIncrease limits, optimize

Debugging Strategies

1. Reproduce Locally

# Match CI environment
docker run -it --rm \
  -v $(pwd):/app \
  -w /app \
  node:20 \
  bash -c "npm ci && npm test"

2. Add Debug Output

# GitHub Actions
- name: Debug info
  run: |
    echo "Node version: $(node -v)"
    echo "npm version: $(npm -v)"
    echo "Working directory: $(pwd)"
    ls -la
    cat package.json

- name: Run tests with verbose
  run: npm test -- --verbose
  env:
    DEBUG: '*'

3. SSH into Runner (GitHub Actions)

- name: Setup tmate session
  uses: mxschmitt/action-tmate@v3
  if: failure()

Common Fixes

Flaky Tests

// Add retry logic
jest.retryTimes(3);

// Increase timeout
jest.setTimeout(30000);

// Wait for async operations
await waitFor(() => expect(element).toBeVisible());

Dependency Issues

# Clear npm cache
npm cache clean --force
rm -rf node_modules package-lock.json
npm install

# Use exact versions
npm ci --prefer-offline

Environment Variables

- name: Check env vars
  run: |
    if [ -z "$API_KEY" ]; then
      echo "Error: API_KEY not set"
      exit 1
    fi

Resource Limits

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      NODE_OPTIONS: "--max-old-space-size=4096"

Artifact Collection

- name: Upload logs on failure
  if: failure()
  uses: actions/upload-artifact@v4
  with:
    name: debug-logs
    path: |
      logs/
      coverage/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.