gitlab-ci-artifacts-caching
Use when configuring artifacts for inter-job data passing or caching for faster builds. Covers cache strategies and artifact management.
Best use case
gitlab-ci-artifacts-caching is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when configuring artifacts for inter-job data passing or caching for faster builds. Covers cache strategies and artifact management.
Teams using gitlab-ci-artifacts-caching should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gitlab-ci-artifacts-caching/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gitlab-ci-artifacts-caching Compares
| Feature / Agent | gitlab-ci-artifacts-caching | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when configuring artifacts for inter-job data passing or caching for faster builds. Covers cache strategies and artifact management.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# GitLab CI - Artifacts & Caching
Configure artifacts and caching for efficient pipeline execution.
## Artifacts
### Basic Artifact Configuration
```yaml
build:
script:
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 week
```
### Artifact Reports
```yaml
test:
script:
- npm test -- --coverage
artifacts:
reports:
junit: junit.xml
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
```
### Conditional Artifacts
```yaml
build:
artifacts:
paths:
- dist/
when: on_success # on_success, on_failure, always
exclude:
- dist/**/*.map
```
### Artifact Dependencies
```yaml
build:
artifacts:
paths:
- dist/
test:
dependencies:
- build # Downloads build artifacts
script:
- npm test
deploy:
dependencies: [] # Skip all artifact downloads
script:
- ./deploy.sh
```
## Caching
### Basic Cache Configuration
```yaml
default:
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .npm/
```
### Cache Key Strategies
```yaml
# Per-branch cache
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
# Lock file based cache
cache:
key:
files:
- package-lock.json
paths:
- node_modules/
# Combined key
cache:
key:
prefix: ${CI_JOB_NAME}
files:
- package-lock.json
paths:
- node_modules/
```
### Cache Policy
```yaml
install:
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
policy: push # Only upload cache
script:
- npm ci
test:
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
policy: pull # Only download cache
script:
- npm test
```
### Fallback Keys
```yaml
cache:
key: ${CI_COMMIT_REF_SLUG}
fallback_keys:
- ${CI_DEFAULT_BRANCH}
- main
paths:
- node_modules/
```
## Distributed Cache (S3)
Configure in GitLab Runner:
```toml
[runners.cache]
Type = "s3"
Shared = true
[runners.cache.s3]
ServerAddress = "s3.amazonaws.com"
BucketName = "gitlab-runner-cache"
BucketLocation = "us-east-1"
```
## Artifacts vs Cache
| Feature | Artifacts | Cache |
|---------|-----------|-------|
| Purpose | Pass data between jobs | Speed up job execution |
| Storage | GitLab server | Runner local or S3 |
| Reliability | Guaranteed | Best effort |
| Expiration | Configurable | Configurable |
| Cross-pipeline | Yes (with dependencies) | Yes (with keys) |
## Best Practices
1. Use cache for dependencies (node_modules, vendor)
2. Use artifacts for build outputs
3. Set appropriate expiration times
4. Use lock file-based cache keys
5. Exclude source maps and unnecessary files
6. Use `policy: pull` for jobs that only read cacheRelated Skills
llm-caching
Optimize LLM costs and latency through KV caching and prompt caching. Use when (1) structuring prompts for cache hits, (2) configuring API cache_control for Anthropic/Cohere/OpenAI/Gemini, (3) setting up self-hosted inference with vLLM/SGLang/Ollama, (4) building agentic workflows with prefix reuse, (5) designing batch processing pipelines, or (6) understanding cache pricing and tradeoffs.
gitlab-jobs
Manages GitLab CI jobs. Use for listing, logs, canceling, retrying, or erasing jobs. Triggers: CI builds, job status.
gitlab-cli-skills
Comprehensive GitLab CLI (glab) command reference and workflows for all GitLab operations via terminal. Use when user mentions GitLab CLI, glab commands, GitLab automation, MR/issue management via CLI, CI/CD pipeline commands, repo operations, authentication setup, or any GitLab terminal operations. Routes to specialized sub-skills for auth, CI, MRs, issues, releases, repos, and 30+ other glab commands. Triggers on glab, GitLab CLI, GitLab commands, GitLab terminal, GitLab automation.
gitlab-automation
Automate GitLab project management, issues, merge requests, pipelines, branches, and user operations via Rube MCP (Composio). Always search tools first for current schemas.
apollo-caching-strategies
Use when implementing Apollo caching strategies including cache policies, optimistic UI, cache updates, and normalization.
prompt-caching
Caching strategies for LLM prompts including Anthropic prompt caching, response caching, and CAG (Cache Augmented Generation) Use when: prompt caching, cache prompt, response cache, cag, cache augmented.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
moai-lang-r
R 4.4+ best practices with testthat 3.2, lintr 3.2, and data analysis patterns.
moai-lang-python
Python 3.13+ development specialist covering FastAPI, Django, async patterns, data science, testing with pytest, and modern Python features. Use when developing Python APIs, web applications, data pipelines, or writing tests.
moai-icons-vector
Vector icon libraries ecosystem guide covering 10+ major libraries with 200K+ icons, including React Icons (35K+), Lucide (1000+), Tabler Icons (5900+), Iconify (200K+), Heroicons, Phosphor, and Radix Icons with implementation patterns, decision trees, and best practices.
moai-foundation-trust
Complete TRUST 4 principles guide covering Test First, Readable, Unified, Secured. Validation methods, enterprise quality gates, metrics, and November 2025 standards. Enterprise v4.0 with 50+ software quality standards references.
moai-foundation-memory
Persistent memory across sessions using MCP Memory Server for user preferences, project context, and learned patterns