Agent Native

ci-cd

This skill guides agents through setting up CI/CD pipelines for .NET applications using GitHub Actions or Azure DevOps.

by codewithmukeshCommunityNot reviewed

Community author

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
MIT (permissive)
Pin
2330089pinned Oct 9, 2026
Context cost
about 1,300 tokenswhen the skill loads
GitHub stars
754on codewithmukesh/dotnet-claude-kit
Scripts
None found

What it does

“CI/CD pipelines for .NET applications. Covers GitHub Actions and Azure DevOps YAML pipelines with build, test, publish, and deploy stages. Load this skill when setting up continuous integration, automated testing, deployment workflows, or when the user mentions "CI/CD", "pipeline", "GitHub Actions", "Azure DevOps", "workflow", "deploy", "build pipeline", "publish", "NuGet push", "release", or "continuous integration".”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill guides agents through setting up CI/CD pipelines for .NET applications using GitHub Actions or Azure DevOps. It provides YAML templates for build, test, and publish stages, along with patterns for Docker image publishing and NuGet package deployment.

When to use it

  • Setting up automated build and test workflows for .NET projects
  • Creating Docker image publishing pipelines triggered by version tags
  • Configuring NuGet package publishing for library projects
  • Establishing multi-environment deployment with artifact promotion

When not to

  • Projects using only UI-based pipeline configuration without YAML code
  • Teams requiring non-.NET technology stacks

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add codewithmukesh/dotnet-claude-kit --skill ci-cd

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install codewithmukesh/dotnet-claude-kit ci-cd@23300897f4d1a276bc475e373ecfe886e43dd7c5

Installs the commit we checked (2330089).

Copy by hand

Download the folder at 2330089 and put it in .claude/skills/ci-cd for Claude Code and in .agents/skills/ci-cd for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 2330089

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "ci-cd" by codewithmukesh.

Source, pinned to commit 23300897f4d1a276bc475e373ecfe886e43dd7c5:
https://github.com/codewithmukesh/dotnet-claude-kit/tree/23300897f4d1a276bc475e373ecfe886e43dd7c5/skills/ci-cd

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/ci-cd/ for Claude Code and .agents/skills/ci-cd/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/codewithmukesh/ci-cd

SKILL.md at the pin

---
name: ci-cd
description: >
  CI/CD pipelines for .NET applications. Covers GitHub Actions and Azure DevOps
  YAML pipelines with build, test, publish, and deploy stages.
  Load this skill when setting up continuous integration, automated testing,
  deployment workflows, or when the user mentions "CI/CD", "pipeline",
  "GitHub Actions", "Azure DevOps", "workflow", "deploy", "build pipeline",
  "publish", "NuGet push", "release", or "continuous integration".
---

# CI/CD

## Core Principles

1. **Pipeline as code** — YAML pipelines committed to the repo. No click-ops in the UI.
2. **Fast feedback** — Build and test on every push. Cache NuGet packages. Fail fast.
3. **Build once, deploy many** — Build the artifact once, promote it through environments (dev → staging → production).
4. **Never skip tests** — Tests gate the pipeline. No deployment without passing tests.

## Patterns

### GitHub Actions — Build + Test

```yaml
# .github/workflows/ci.yml
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  DOTNET_VERSION: '10.0.x'
  DOTNET_NOLOGO: true
  DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
  build-and-test:
    runs-on: ubuntu-latest

    services:
      postgres:
        image: postgres:18
        env:
          POSTGRES_DB: testdb
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
        ports:
          - 5432:5432
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    steps:
      - uses: actions/checkout@v5

      - name: Setup .NET
        uses: actions/setup-dotnet@v5
        with:
          dotnet-version: ${{ env.DOTNET_VERSION }}

      - name: Restore
        run: dotnet restore

      - name: Build
        run: dotnet build --no-restore --configuration Release

      - name: Format check
        run: dotnet format --verify-no-changes --no-restore

      - name: Test
        run: dotnet test --no-build --configuration Release --logger trx --results-directory TestResults
        env:
          ConnectionStrings__Default: "Host=localhost;Database=testdb;Username=postgres;Password=postgres"

      - name: Publish test results
        uses: actions/upload-artifact@v5
        if: always()
        with:
          name: test-results
          path: TestResults/*.trx
```

### GitHub Actions — Build + Publish Docker Image

```yaml
# .github/workflows/publish.yml
name: Publish

on:
  push:
    tags: ['v*']

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - uses: actions/checkout@v5

      - name: Login to GitHub Container Registry
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Extract version from tag
        id: version
        run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

      - name: Build and push
        uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          tags: |
            ghcr.io/${{ github.repository }}:${{ steps.version.outputs.VERSION }}
            ghcr.io/${{ github.repository }}:latest
```

### Azure DevOps — Build + Test

Same restore → build → format → test flow as GitHub Actions. Key differences:

```yaml
# azure-pipelines.yml
trigger:
  branches:
    include: [main]
  paths:
    exclude: ['*.md', docs/]

pool:
  vmImage: 'ubuntu-latest'          # vs runs-on: ubuntu-latest

variables:
  dotnetVersion: '10.0.x'

# Key task differences from GitHub Actions:
#   Setup .NET:  task: UseDotNet@2  (inputs: version: $(dotnetVersion))
#   Test results: task: PublishTestResults@2  (testResultsFormat: VSTest)
#   Steps use `script:` + `displayName:` instead of `- name:` + `run:`
#   Services (e.g., Postgres) require a separate Docker task or pipeline service connection
```

### NuGet Package Publishing

```yaml
# Part of GitHub Actions workflow
- name: Pack
  run: dotnet pack src/MyLibrary -c Release -o ./nupkg --no-build

- name: Push to NuGet
  run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
```

## Anti-patterns

### Don't Build Different Artifacts per Environment

```yaml
# BAD — building separately for each environment
- script: dotnet publish -c Debug   # for dev
- script: dotnet publish -c Release # for prod

# GOOD — build once, deploy everywhere
- script: dotnet publish -c Release -o ./publish
# Then deploy the same ./publish artifact to dev, staging, prod
```

### Don't Skip Format Checks in CI

```yaml
# BAD — no format enforcement
steps:
  - run: dotnet build
  - run: dotnet test

# GOOD — format check catches style issues early
steps:
  - run: dotnet build
  - run: dotnet format --verify-no-changes
  - run: dotnet test
```

### Don't Hardcode Secrets in Pipelines

```yaml
# BAD — secret in pipeline YAML
env:
  DB_PASSWORD: "my-secret-password"

# GOOD — use pipeline secrets
env:
  DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
```

## Decision Guide

| Scenario | Recommendation |
|----------|---------------|
| Open source project | GitHub Actions |
| Enterprise with Azure | Azure DevOps Pipelines |
| Docker deployment | Multi-stage build in CI, push to container registry |
| NuGet library | Build → Test → Pack → Push on tag |
| Database migrations | Run in CI test stage, script for production |
| Environment promotion | Same artifact, different configuration |

From codewithmukesh/dotnet-claude-kit at 2330089, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at 2330089

Files

1 file, 5.6 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 2330089
All Cloud and DevOps skills
  • playwright-ci-caching

    This skill configures caching of Playwright browser binaries in GitHub Actions and Azure DevOps CI/CD pipelines by extracting the Playwright version from…

    by AarononthewebCommunity

    Claude Code, Codex, Cursor +3 · about 1.7K tokens · pinned 6 days ago

  • linear-release-setup

    Generates CI/CD configuration files for Linear Release, a tool that syncs Git commits and deployments with Linear release pipelines.

    by linearCommunity

    Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago

  • docker-build-deploy

    This skill generates a complete Docker CI/CD pipeline for Node.js applications, creating an optimized Dockerfile with multi-stage builds and non-root user…

    by wu529778790Community

    Claude Code, Codex, Cursor +4 · about 730 tokens · pinned 6 days ago

  • debug-openshell-cluster

    Diagnoses OpenShell gateway deployment problems across Docker, Podman, Kubernetes, and VM compute platforms.

    by NVIDIAOfficial publisher

    Claude Code, Codex, Cursor +4 · about 19.1K tokens · pinned 6 days ago

  • huggingface-spaces

    Create and deploy machine-learning applications on Hugging Face Spaces using Gradio, Docker, or Static SDKs.

    by Hugging FaceOfficial publisher

    Claude Code, Codex, Cursor +4 · about 4.3K tokens · pinned 6 days ago

  • architect-for-startups

    Provides stage-appropriate AWS architecture guidance for startups from pre-revenue through Series B+, considering runway, team size, and AWS credits.

    by Amazon (AWS)Official publisher

    Claude Code, Codex, Cursor +4 · about 3.4K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use