gitlab-ci-patterns
Build GitLab CI pipeline patterns
Teams often struggle to design reliable GitLab CI workflows at scale. This skill provides proven pipeline patterns for builds, tests, deployments, caching, and security scanning.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "gitlab-ci-patterns". Show a GitLab CI pipeline for build, test, and deploy with caching
Expected outcome:
- Stages are build, test, and deploy in order
- Build job uses node:20 and caches node_modules
- Test job runs lint and tests with coverage reporting
- Deploy job applies Kubernetes manifests and waits for rollout
Using "gitlab-ci-patterns". How do I set up Docker builds in GitLab CI?
Expected outcome:
- Use docker:24 image with docker:24-dind service
- Login to registry using CI_REGISTRY_USER and CI_REGISTRY_PASSWORD variables
- Build and push images with tags for both SHA and latest
- Trigger on main branch and tags only
Using "gitlab-ci-patterns". Create a security scanning stage
Expected outcome:
- Include GitLab's built-in security scanning templates
- Add Trivy vulnerability scanning for container images
- Set exit-code 1 for HIGH and CRITICAL severity findings
- Allow job to fail so scanning does not block merges
Security Audit
SafeThis is a pure documentation skill containing only static GitLab CI YAML examples and DevOps guidance. No executable code, scripts, network calls, or file access behavior is present. All 32 static findings are false positives: hash values, YAML frontmatter, markdown code block delimiters, and placeholder URLs were misidentified as security risks.
Risk Factors
🌐 Network access (4)
⚙️ External commands (18)
Quality Score
What You Can Build
Standardize CI templates
Create consistent GitLab CI patterns for multiple repositories and teams.
Add deployment stages
Extend an existing pipeline with Kubernetes deployment jobs.
Speed up pipelines
Apply caching and artifact patterns to reduce build times.
Try These Prompts
Create a simple GitLab CI pipeline with build, test, and deploy stages for a Node.js service.
Provide a GitLab CI job to build and push Docker images on main and tags.
Generate validate, plan, and apply stages for Terraform with manual apply.
Design staging and production deploy jobs using kubectl with a shared template.
Best Practices
- Use specific image tags for reproducible builds
- Cache dependencies with stable keys to speed up jobs
- Use manual approval gates for production deployments
Avoid
- Using latest image tags in production pipelines
- Skipping artifacts for build outputs needed downstream
- Deploying to production without an approval gate
Frequently Asked Questions
Which GitLab versions are supported?
Are there limits on pipeline size?
Can this integrate with existing runners?
Is any sensitive data collected?
What if a job fails after using this?
How does this compare to GitHub Actions?
Developer Details
Author
wshobsonLicense
MIT
Repository
https://github.com/wshobson/agents/tree/main/plugins/cicd-automation/skills/gitlab-ci-patternsRef
main
File structure
📄 SKILL.md