gitlab-ci-dotnet
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
Use for GitLab CI/CD pipelines that restore, build, test, package, scan, and deploy C#/.NET services.
In this repository14 other files it gives its agents.
- aspnet-core-apiSkill
- aspnet-mvcSkill
- blazorSkill
- docker-dotnetSkill
- dotnet-expertSkill
- dotnet-file-based-appsSkill
- dotnet-messagingSkill
- dotnet-observabilitySkill
- dotnet-performanceSkill
- dotnet-testingSkill
- dotnet-version-guideSkill
- efcore-postgresqlSkill
- gitlab-basicsSkill
- pandocSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Use for GitLab CI configuration, build/test jobs, caching, artifacts, service containers, Docker builds, deployments, and pipeline …
- Distinctive: line 27
Do not change production deployment or secret settings without understanding the environment and approval path.
- Distinctive: line 31
Prefer explicit validate, build, test, package, and deploy stages.
- Very specific: line 37
Use dotnet restore, dotnet build --no-restore, and dotnet test --no-build where job boundaries permit.
- Distinctive: line 39
Start PostgreSQL/RabbitMQ service containers only for jobs that need them.
- Distinctive: line 40
Keep secrets in masked/protected CI variables, never YAML or logs.
- Distinctive: line 41
Use needs for the actual dependency graph.
- Distinctive: line 43
Keep Docker-in-Docker or socket access restricted and intentional.
- Distinctive: line 47
Check YAML syntax, MR and protected-branch rules, cache correctness, artifact paths, test results, dependency readiness, secret masking, …
- Very specific: line 90
Use an SDK image compatible with global.json.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitLab CI for .NET
When to Use
Use for GitLab CI configuration, build/test jobs, caching, artifacts, service containers, Docker builds, deployments, and pipeline troubleshooting for .NET projects.
When Not to Use
Do not change production deployment or secret settings without understanding the environment and approval path.
Pipeline Shape
Prefer explicit validate, build, test, package, and deploy stages. Keep restore, format/analyzer checks, build, tests, coverage, packaging, and deployment as reviewable jobs. Use rules to avoid deployments from untrusted branches.
.NET Rules
- Pin or control the SDK with global.json and a deliberate container image.
- Cache NuGet packages with a key including lockfiles or project files.
- Use dotnet restore, dotnet build --no-restore, and dotnet test --no-build where job boundaries permit.
- Publish test and coverage artifacts with bounded retention.
- Start PostgreSQL/RabbitMQ service containers only for jobs that need them.
- Keep secrets in masked/protected CI variables, never YAML or logs.
- Use needs for the actual dependency graph.
- Make retries explicit and avoid hiding flaky tests with unlimited retries.
- Keep Docker-in-Docker or socket access restricted and intentional.
Quality Gate
Check YAML syntax, MR and protected-branch rules, cache correctness, artifact paths, test results, dependency readiness, secret masking, and deployment approvals.
Example: Build and Test Pipeline
stages: [validate, build, test, image]
variables:
NUGET_PACKAGES: "$CI_PROJECT_DIR/.nuget/packages"
cache:
key:
files:
- "*.sln"
- "**/*.csproj"
- "Directory.Packages.props"
paths:
- .nuget/packages/
validate:
stage: validate
image: mcr.microsoft.com/dotnet/sdk:10.0
script:
- dotnet format --verify-no-changes
build:
stage: build
image: mcr.microsoft.com/dotnet/sdk:10.0
script:
- dotnet restore
- dotnet build --no-restore --configuration Release
test:
stage: test
image: mcr.microsoft.com/dotnet/sdk:10.0
script:
- dotnet restore
- dotnet test --no-restore --configuration Release --logger "trx;LogFileName=test-results.trx"
artifacts:
when: always
reports:
junit: "**/TestResults/*.trx"Use an SDK image compatible with global.json. Add PostgreSQL or RabbitMQ service containers only to jobs that need them, and make deployment rules explicit for protected branches.
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
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.

