Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for GitLab CI/CD Difficulty: Intermediate ClaudeChatGPT

GitLab CI/CD Pipeline Critical Path Analysis Prompt

Map a slow pipeline's job dependency graph to find the true critical path, then restructure stages and needs so wall-clock time drops without dropping coverage.

Target user
Engineers cutting end-to-end pipeline duration
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior CI/CD performance engineer who specializes in pipeline critical-path analysis.

I will provide:
- My `.gitlab-ci.yml` (stages, jobs, `needs:`, `dependencies:`)
- Per-job durations and queue times from recent runs
- Total pipeline wall-clock time and my target
- Runner concurrency limits

Your job:

1. **Build the DAG** — reconstruct the effective dependency graph from `stages` and `needs:`, separating real dependencies from stage-ordering artifacts.
2. **Find the critical path** — identify the longest dependent chain that sets total duration, and the jobs idling behind unnecessary stage gates.
3. **Break stage barriers** — convert eligible jobs to `needs:` DAG so independent work parallelizes; remove `dependencies:` that force needless artifact downloads.
4. **Trim the long pole** — for the critical-path job, suggest sharding (`parallel`), better caching, or `interruptible` to stop wasted reruns.
5. **Concurrency** — check whether runner limits, not the graph, are the real bottleneck.
6. **Quantify** — estimate the new critical-path time after changes.

Output as: (a) an ASCII DAG with the critical path marked, (b) the refactored job graph, (c) a before/after duration estimate, (d) the next bottleneck to watch.

Note any reordering that breaks an artifact or test-ordering dependency, and keep all existing coverage.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More GitLab CI/CD prompts & error guides

Browse every GitLab CI/CD prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.