gitlab-ci-patterns

gitlab-ci-patterns is a skill for Claude Code, Codex from sawrus/agent-guides. It costs 58 tokens per session (867 once invoked), scanned A, original, MIT.

A reference guide for building and reviewing GitLab CI/CD pipelines, which are automated workflows that build, test, scan, and deploy code. It covers reusable templates, deployment environments, authentication, caching, protected runners, and Kubernetes deployments.

In plain words
What is it for?
Use it when creating or reviewing a .gitlab-ci.yml file for validation, builds, tests, scans, staging deployments, smoke tests, or production deployments.
Why use it?
It helps teams structure pipeline files consistently and catch common problems in automated delivery workflows. It also provides checks for testing, security scanning, and controlled production releases.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or reviewing a .gitlab-ci.yml file for validation, builds, tests, scans, staging deployments, smoke tests, or production deployments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawrus/agent-guides/gitlab-ci-patterns
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.

Any agent
npx skills add sawrus/agent-guides --skill gitlab-ci-patterns
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gitlab-ci-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/sawrus/agent-guides/gitlab-ci-patterns/github.svg)](https://agentmods.dev/skills/sawrus/agent-guides/gitlab-ci-patterns)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/gitlab-ci-patterns"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/gitlab-ci-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gitlab-ci-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/sawrus/agent-guides/gitlab-ci-patterns"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/gitlab-ci-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 867 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 146
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 147
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 146
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 147
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found 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.1 $0.00058 $0.00867
Opus 5.5 $0.00023 $0.00347
Sonnet 5.5 $0.00012 $0.00173
Haiku 4.5 $0.00006 $0.00087

Measured 1mo ago against content hash 4e5c3a340d25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gitlab-ci-patterns 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 1mo 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.

areas/devops/ci-cd/skills/gitlab-ci-patterns/SKILL.md · 69 lines

How it starts

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

GitLab CI: change and debug a pipeline

1. Read the current pipeline

  1. Open .gitlab-ci.yml and every file it pulls in with include: (local, project, template, component).
  2. List the stages, the jobs per stage, and which jobs run on merge requests, on the default branch, and on tags.
  3. If the project uses CI components or a shared template project, change the caller first. Change the shared template only when the task says so.

2. Make the change

  1. Put job conditions in rules:. Do not add only: or except:.
  2. Express job order with needs: when a job does not need the whole previous stage.
  3. Reuse setup with extends: or !reference; do not copy a script: block into a second job.
  4. Pin every image: to a version tag or a digest. Do not use latest.
  5. Set timeout: on jobs that can hang (integration tests, deploys).
  6. Set interruptible: true on test jobs so a new push cancels the old pipeline.
  7. Cache dependencies with a key that changes with the lock file:
cache:
  key:
    files: [poetry.lock]   # go.sum, pom.xml, package-lock.json
  paths: [.venv/]
  policy: pull-push        # use `pull` in jobs that only read the cache
  1. Pass build outputs with artifacts: and an expire_in: value. Use artifacts:reports:junit for test results.
  2. Read secrets from CI/CD variables (masked and protected) or from id_tokens: with OIDC. Never write a secret into the YAML.
  3. Put deploy jobs on environment: with rules: that limit them to protected branches or tags. A production deploy job uses when: manual; ask the user first before you run it.

3. Validate before you push

  1. Lint the file with the API or the CLI:
glab ci lint                       # uses the project CI lint endpoint
glab ci lint --dry-run --ref main  # simulate a pipeline on a branch
  1. If glab is not available, open CI/CD > Editor > Validate in the project UI.
  2. Check that each changed job has the expected rules: outcome on a merge request and on the default branch.

Read the full file on GitHub · 69 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. 1mo ago Changed · -101 lines · +29 tokens per session 4e5c3a340d25
  2. 3mo ago First seen · 170 lines · 29 tokens per session scan A f1f7d4a7d4d2

Subscribe to this mod's changes

gitlab-ci-patterns is a skill published in the GitHub repository sawrus/agent-guides (21 stars, last pushed 2d ago), licensed MIT. It adds 58 tokens to every session and 867 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

gitlab-ci-patterns compared with skills from other repositories

gitlab-ci-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gitlab-ci-patternssawrus/agent-guidesSkill212d agoMITA58Claude Code, Codex
ci-cd-and-automationaddyosmani/agent-skillsSkill123k2d agoMITA45Claude Code
agentic-actions-auditorsickn33/agentic-awesome-skillsSkill51ktodayMITA59Claude Code
depsickn33/agentic-awesome-skillsSkill51ktodayMITA14Claude Code
sast-configurationsickn33/agentic-awesome-skillsSkill51ktodayMITA31Claude Code
expo-cicd-workflowssickn33/agentic-awesome-skillsSkill51ktodayMITA60Claude Code, Codex
k6-load-testingsickn33/agentic-awesome-skillsSkill51ktodayMITA35Claude Code