/devops-skills:azure-pipelines-generatorfrom devops-skills
Generates production-ready Azure DevOps Pipeline YAML configurations following current best practices, security standards, and naming conventions. Validates generated pipelines automatically.
Ships in devops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate production-ready Azure DevOps Pipeline configurations following current best practices, security standards, and naming conventions. All generated resources are automatically validated using the devops-skills:azure-pipelines-validator skill to ensure syntax correctness and compliance with best practices.
Create simple continuous integration pipelines for building and testing applications.
When to use:
Process:
docs/yaml-schema.md for YAML structuredocs/best-practices.md for implementation patternsdocs/tasks-reference.md for common tasks@2)Example structure:
trigger:
branches:
include:
- main
- develop
pool:
vmImage: 'ubuntu-22.04'
variables:
buildConfiguration: 'Release'
steps:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '20.x'
- task: Cache@2
displayName: 'Cache npm packages'
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
path: $(Pipeline.Workspace)/.npm
- script: npm ci --cache $(Pipeline.Workspace)/.npm
displayName: 'Install dependencies'
- script: npm run build
displayName: 'Build application'
- script: npm test
displayName: 'Run tests'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/test-results.xml'
Create complex pipelines with multiple stages for build, test, and deployment.
When to use:
Process:
docs/yaml-schema.md for stage/job/step hierarchyexamples/multi-stage-cicd.yml for patternsdependsOn relationshipsExample:
stages:
- stage: Build
displayName: 'Build Stage'
jobs:
- job: BuildJob
displayName: 'Build Application'
pool:
vmImage: 'ubuntu-22.04'
steps:
- script: npm run build
displayName: 'Build'
- publish: $(Build.SourcesDirectory)/dist
artifact: drop
- stage: Test
displayName: 'Test Stage'
dependsOn: Build
jobs:
- job: TestJob
displayName: 'Run Tests'
steps:
- script: npm test
displayName: 'Test'
- stage: DeployProd
displayName: 'Deploy to Production'
dependsOn: Test
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: DeployProd
environment: production
strategy:
runOnce:
deploy:
steps:
- script: echo "Deploying"
Create pipelines for building and pushing Docker images to container registries.
When to use:
Process:
docs/tasks-reference.md for Docker@2 taskexamples/kubernetes-deploy.yml for Docker build patternsExample:
variables:
dockerRegistryServiceConnection: 'myACR'
imageRepository: 'myapp'
containerRegistry: 'myregistry.azurecr.io'
tag: '$(Build.BuildId)'
steps:
- task: Docker@2
displayName: 'Build and Push'
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: '$(Build.SourcesDirectory)/Dockerfile'
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)
latest
Create pipelines that deploy applications to Kubernetes clusters.
When to use:
Process:
docs/tasks-reference.md for Kubernetes tasksexamples/kubernetes-deploy.yml for patternsExample:
- task: KubernetesManifest@0
displayName: 'Deploy to Kubernetes'
inputs:
action: 'deploy'
kubernetesServiceConnection: 'myK8sCluster'
namespace: 'production'
manifests: |
k8s/deployment.yml
k8s/service.yml
containers: '$(containerRegistry)/$(imageRepository):$(tag)'
Create pipelines optimized for specific programming languages and frameworks.
Supported Languages:
Process:
docs/tasks-reference.md for language-specific tasksTasks for Go:
$(GOPATH)/pkg/modgo build, go test, go vet, go mod downloadGo Module Caching Pattern:
- task: Cache@2
displayName: 'Cache Go modules'
inputs:
key: 'go | "$(Agent.OS)" | go.sum'
restoreKeys: |
go | "$(Agent.OS)"
path: $(GOPATH)/pkg/mod
Go Build Commands:
# Download dependencies
- script: go mod download
displayName: 'Download Go modules'
# Run linting/vetting
- script: go vet ./...
displayName: 'Run Go vet'
# Run tests with coverage
- script: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
displayName: 'Run Go tests with coverage'
# Build for Linux (common for containers)
- script: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o $(Build.ArtifactStagingDirectory)/app ./cmd/server
displayName: 'Build Go binary for Linux'
Go Matrix Testing Example:
strategy:
matrix:
go121:
goVersion: '1.21'
go122:
goVersion: '1.22'
maxParallel: 2
steps:
- task: GoTool@0
displayName: 'Install Go $(goVersion)'
inputs:
version: $(goVersion)
- script: go test -v ./...
displayName: 'Run tests'
Reference: See examples/go-cicd.yml for a complete Go CI/CD pipeline example.
Create reusable templates and pipelines that use them.
When to use:
Process:
docs/templates-guide.md for template syntaxexamples/templates/ for template patternsExample:
# Template: templates/build.yml
parameters:
- name: nodeVersion
type: string
default: '20.x'
steps:
- task: NodeTool@0
inputs:
versionSpec: ${{ parameters.nodeVersion }}
- script: npm ci
- script: npm run build
# Main pipeline
steps:
- template: templates/build.yml
parameters:
nodeVersion: '20.x'
When generating pipelines that use specific Azure Pipelines tasks or require latest documentation:
Detection:
Process:
ALWAYS check local documentation first (REQUIRED): Local docs are sufficient for most common tasks and should be your primary reference:
docs/tasks-reference.md - Contains .NET, Node.js, Python, Go, Docker, Kubernetes, Azure tasksdocs/yaml-schema.md - Complete YAML syntax referencedocs/best-practices.md - Security, performance, naming patternsMost pipelines can be generated using only local docs. External lookup is only needed for:
Read relevant example files (RECOMMENDED): Before generating, read the example file(s) that match the user's request:
examples/go-cicd.ymlexamples/kubernetes-deploy.ymlexamples/multi-stage-cicd.ymlexamples/template-usage.ymlThis ensures consistent patterns and best practices.
For tasks NOT in local docs, use external sources:
Option A - Context7 MCP (Preferred when available):
mcp__context7__resolve-library-idmcp__context7__get-library-docsOption B - WebSearch (Fallback or for specific queries):
Search query pattern: "[TaskName] Azure Pipelines task documentation"
Examples:
- "AzureWebApp@1 Azure Pipelines task documentation"
- "KubernetesManifest@0 Azure Pipelines task inputs"
- "Docker@2 Azure Pipelines task latest version"
When to use which:
Analyze documentation for:
Docker@2)Generate pipeline using discovered information:
Include helpful comments:
# Docker@2: Build and push Docker images to a container registry
# Requires: Docker registry service connection
- task: Docker@2
displayName: 'Build and Push Docker image'
inputs:
command: buildAndPush
repository: myapp
dockerfile: Dockerfile
containerRegistry: myDockerRegistry
Example with task documentation lookup:
# Task: AzureFunctionApp@1
# Purpose: Deploy to Azure Functions
# Service Connection: Azure Resource Manager
- task: AzureFunctionApp@1
displayName: 'Deploy Azure Function'
inputs:
azureSubscription: 'AzureServiceConnection' # Required: ARM service connection
appType: 'functionAppLinux' # Linux function app
appName: 'myfunctionapp' # Function app name
package: '$(Build.ArtifactStagingDirectory)/**/*.zip' # Deployment package
runtimeStack: 'NODE|20' # Node.js 20 runtime
CRITICAL: Every generated Azure Pipeline configuration MUST be validated before presenting to the user.
After generating any pipeline configuration, immediately invoke the devops-skills:azure-pipelines-validator skill:
Skill: devops-skills:azure-pipelines-validator
The devops-skills:azure-pipelines-validator skill will:
If validation fails:
If validation succeeds:
Only skip validation when:
Reference docs/best-practices.md for comprehensive guidelines. Key principles:
Security First:
$(Build.BuildId)), optionally add :latest for convenience:latest in production deployments$(tag) AND latest, but deploy using $(containerRegistry)/$(imageRepository):$(tag)Version Pinning:
ubuntu-22.04 not ubuntu-latestDocker@2 not Docker@0'20.x' for Node.jsGoTool@0, NodeTool@0, KubernetesManifest@0). Using @0 for these tasks is correct and acceptable - the goal is to use the latest available major version, not to avoid @0 specifically.Performance:
dependsOn for parallel executionNaming:
BuildAndTest, DeployProduction)BuildJob, TestJob)'Build application', 'Run tests')Organization:
Error Handling:
condition: succeededOrFailed()Testing:
docs/yaml-schema.md - Complete Azure Pipelines YAML syntax reference
docs/tasks-reference.md - Common Azure Pipelines tasks catalog
docs/best-practices.md - Azure Pipelines best practices
docs/templates-guide.md - Templates and reusability guide
IMPORTANT: When generating pipelines, explicitly read the relevant example files to ensure consistent patterns and best practices. Use the Read tool to load these files before generating.
| Example File | When to Read |
|---|---|
examples/basic-ci.yml | Simple CI pipelines, single-stage builds |
examples/multi-stage-cicd.yml | Multi-environment deployments, complex workflows |
examples/kubernetes-deploy.yml | Docker + K8s deployments, container builds |
examples/go-cicd.yml | Go/Golang applications |
examples/dotnet-cicd.yml | .NET/C# applications |
examples/python-cicd.yml | Python applications |
examples/template-usage.yml | Template-based pipelines |
examples/templates/build-template.yml | Creating reusable build templates |
examples/templates/deploy-template.yml | Creating reusable deployment templates |
Example reading workflow:
1. User requests: "Create a Go CI/CD pipeline with Docker"
2. Read: examples/go-cicd.yml (for Go patterns)
3. Read: examples/kubernetes-deploy.yml (for Docker/K8s patterns)
4. Generate pipeline combining both patterns
5. Validate with devops-skills:azure-pipelines-validator skill
User request: "Create a CI/CD pipeline for a Node.js app with Docker deployment to AKS"
Process:
✅ Understand requirements:
✅ Reference resources:
docs/yaml-schema.md for multi-stage structuredocs/tasks-reference.md for NodeTool, Docker, Kubernetes tasksdocs/best-practices.md for pipeline patternsexamples/multi-stage-cicd.yml and examples/kubernetes-deploy.yml✅ Search for latest task documentation:
✅ Generate pipeline:
✅ Validate:
devops-skills:azure-pipelines-validator skill✅ Present to user:
stages:
- stage: Build
jobs:
- job: BuildJob
steps:
- script: echo "Building"
- stage: Test
dependsOn: Build
jobs:
- job: TestJob
steps:
- script: echo "Testing"
- stage: Deploy
dependsOn: Test
jobs:
- deployment: DeployJob
environment: production
strategy:
runOnce:
deploy:
steps:
- script: echo "Deploying"
strategy:
matrix:
node18:
nodeVersion: '18.x'
node20:
nodeVersion: '20.x'
node22:
nodeVersion: '22.x'
maxParallel: 3
steps:
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
- script: npm test
- stage: DeployProd
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: DeployProd
environment: production
strategy:
runOnce:
deploy:
steps:
- script: echo "Deploy"
Always follow this sequence when generating Azure Pipelines:
Generate Azure Pipelines that are:
docs/best-practices.md (opens in a new tab)docs/tasks-reference.md (opens in a new tab)docs/templates-guide.md (opens in a new tab)docs/yaml-schema.md (opens in a new tab)examples/basic-ci.yml (opens in a new tab)examples/dotnet-cicd.yml (opens in a new tab)examples/go-cicd.yml (opens in a new tab)examples/kubernetes-deploy.yml (opens in a new tab)examples/multi-stage-cicd.yml (opens in a new tab)examples/python-cicd.yml (opens in a new tab)examples/template-usage.yml (opens in a new tab)examples/templates/build-template.yml (opens in a new tab)examples/templates/deploy-template.yml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
31 skills in this plugin
/ansible-generatorComprehensive toolkit for generating best practice Ansible playbooks, roles, tasks, and inventory files./ansible-validatorComprehensive toolkit for validating, linting, testing, and automating Ansible playbooks, roles, and collections. Use this skill when working with Ansible files (.yml, .yaml playbooks, roles, inventories), validating automation code, debugging playbook execution, performing dry-run testing with check mode, or working with custom modules and collections./azure-pipelines-validatorComprehensive toolkit for validating, linting, and securing Azure DevOps Pipeline configurations.Other plugins' skills for the same job
Generated from the plugin's indexed repository (gitjfmd/ansible-skills) — no native marketplace selected
npx claudepluginhub p/gitjfmd-devops-skills-devops-skills-plugin