/devops-skills:azure-pipelines-validatorfrom devops-skills
Validates, lints, and secures Azure DevOps Pipeline YAML configurations. Checks syntax, best practices, and hardcoded secrets.
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; scripts run unread.
Comprehensive toolkit for validating, linting, testing, and securing Azure DevOps Pipeline configurations (azure-pipelines.yml, azure-pipelines.yaml files). Use this skill when working with Azure Pipelines, validating pipeline syntax, debugging configuration issues, implementing best practices, or performing security audits.
Use the azure-pipelines-validator skill in the following scenarios:
azure-pipelines.yml or azure-pipelines.yaml filesTo validate an Azure Pipelines configuration file:
bash .claude/skills/azure-pipelines-validator/scripts/validate_azure_pipelines.sh <file-path>
Example:
bash .claude/skills/azure-pipelines-validator/scripts/validate_azure_pipelines.sh azure-pipelines.yml
This runs all four validation layers: 0. YAML lint (yamllint) - optional, auto-installed in venv if needed
# Run only syntax validation
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --syntax-only
# Run only best practices check
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --best-practices
# Run only security scan
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --security-only
# Skip YAML linting (yamllint)
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --skip-yaml-lint
# Skip best practices check
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --no-best-practices
# Skip security scan
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --no-security
# Strict mode (fail on warnings)
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --strict
You can also run individual validation scripts:
# Syntax validation
python3 scripts/validate_syntax.py azure-pipelines.yml
# Best practices check
python3 scripts/check_best_practices.py azure-pipelines.yml
# Security scan
python3 scripts/check_security.py azure-pipelines.yml
════════════════════════════════════════════════════════════════════════════════
Azure Pipelines Validator
════════════════════════════════════════════════════════════════════════════════
File: azure-pipelines.yml
[1/3] Running syntax validation...
✓ Syntax validation passed
[2/3] Running best practices check...
SUGGESTIONS (2):
──────────────────────────────────────────────────────────────────────────────
INFO: Line 15: Job 'BuildJob' should have displayName for better readability [missing-displayname]
💡 Suggestion: Add 'displayName: "Your Job Description"' to job 'BuildJob'
WARNING: Line 25: Task 'Npm@1' in job 'BuildJob' could benefit from caching [missing-cache]
💡 Suggestion: Add Cache@2 task to cache dependencies and speed up builds
ℹ Best practices check completed with suggestions
[3/3] Running security scan...
MEDIUM SEVERITY (1):
──────────────────────────────────────────────────────────────────────────────
MEDIUM: Line 8: Container 'linux' uses ':latest' tag [container-latest-tag]
🔒 Remediation: Pin container images to specific versions or SHA digests
✓ Security scan passed
════════════════════════════════════════════════════════════════════════════════
Validation Summary
════════════════════════════════════════════════════════════════════════════════
Syntax Validation: PASSED
Best Practices: WARNINGS
Security Scan: PASSED
════════════════════════════════════════════════════════════════════════════════
✓ All validation checks passed
# Validate syntax and structure
bash scripts/validate_azure_pipelines.sh new-pipeline.yml
# Run security scan only with strict mode
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --security-only --strict
# Check for best practices and optimization opportunities
bash scripts/validate_azure_pipelines.sh azure-pipelines.yml --best-practices
# In your Azure Pipeline
trigger:
branches:
include:
- main
pool:
vmImage: 'ubuntu-22.04'
steps:
- script: |
pip3 install PyYAML
bash .claude/skills/azure-pipelines-validator/scripts/validate_azure_pipelines.sh azure-pipelines.yml --strict
displayName: 'Validate Pipeline Configuration'
When Claude Code invokes this skill, it will:
azure-pipelines*.yml files in the current directory (up to 3 levels deep)Example prompts:
The validation scripts provide static analysis. For dynamic documentation lookup, manually use these tools when you need:
How to fetch documentation:
# Use Context7 MCP for structured docs
mcp__context7__resolve-library-id("azure-pipelines")
mcp__context7__get-library-docs(context7CompatibleLibraryID, topic="deployment")
# Or use WebSearch/WebFetch for Microsoft Learn docs
WebSearch("Azure Pipelines Docker@2 task documentation 2025")
WebFetch("https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/docker-v2")
Note: Documentation lookup is a manual action - the validator scripts focus on static analysis and do not automatically fetch external documentation.
yaml-syntax: Valid YAML formattingyaml-invalid-root: Root must be a dictionaryinvalid-hierarchy: Cannot mix stages/jobs/steps at root leveltask-invalid-format: Tasks must follow TaskName@version formatpool-invalid: Pool must specify name or vmImagestage-missing-jobs: Stages must define jobsjob-missing-steps: Regular jobs must define stepsdeployment-missing-strategy: Deployment jobs must define strategyvariable-invalid-name: Variables should use valid namingmissing-displayname: Stages/jobs should have displayNametask-version-zero: Tasks should not use @0 version (except whitelisted tasks where @0 is the only version: GoTool, NodeTool, UsePythonVersion, KubernetesManifest, DockerCompose, HelmInstaller, HelmDeploy)task-missing-version: Tasks must specify versionpool-latest-image: Avoid 'latest' in vmImagemissing-cache: Package installations should use cachingmissing-timeout: Deployment jobs should specify timeoutmissing-deployment-condition: Production deployments should have conditionsparallel-opportunity: Test jobs could use parallelizationtemplate-opportunity: Duplicate job patterns could use templatesmany-inline-variables: Consider using variable groupshardcoded-password: Hardcoded passwords detectedhardcoded-api-key: Hardcoded API keys detectedhardcoded-secret: Hardcoded secrets/tokens detectedhardcoded-aws-credentials: AWS credentials hardcodedhardcoded-azure-ids: Azure subscription/tenant IDs hardcodedcurl-pipe-shell: Dangerous curl | bash patterneval-command: Eval command usage with variableschmod-777: Overly permissive file permissionsinsecure-ssl: SSL/TLS verification disabledsecret-in-logs: Potential secret exposure in logscontainer-latest-tag: Container using :latest tagtask-no-version: Task missing version (security risk)hardcoded-service-connection: Service connection IDs hardcodedcheckout-no-clean: Checkout without cleanvariable-not-secret: Sensitive variable not marked as secretNo manual installation required! The validator uses automatic venv management:
.venv is created and packages are auto-installedTo manually install dependencies system-wide (optional):
pip3 install PyYAML yamllint
Comprehensive documentation is included in the docs/ directory:
azure-pipelines-reference.md: Complete Azure Pipelines YAML syntax reference with examplesExample Azure Pipelines configurations are provided in the examples/ directory:
basic-pipeline.yml: Simple CI pipeline with build and test stagesdocker-build.yml: Docker build and push workflowdeployment-pipeline.yml: Multi-environment deployment with approval gatesmulti-platform.yml: Multi-platform build matrixtemplate-example.yml: Pipeline using reusable templatesTest the skill with examples:
bash scripts/validate_azure_pipelines.sh examples/basic-pipeline.yml
When encountering specific Azure Pipelines tasks, resources, or version requirements, you can manually use the following tools to get up-to-date information:
Note: These tools are not automatically invoked by the validation scripts. Use them manually when you need to look up specific Azure Pipelines tasks, features, or troubleshoot validation errors.
Add custom rules to the validation scripts:
scripts/validate_syntax.pyscripts/check_best_practices.pyscripts/check_security.py# In check_best_practices.py
def _check_custom_rule(self):
"""Check for custom organization rule"""
for job in self._get_all_jobs():
job_name = job.get('job') or job.get('deployment')
# Your custom validation logic
if 'tags' not in pool:
self.issues.append(BestPracticeIssue(
'warning',
self._get_line(job_name),
f"Job '{job_name}' should specify agent tags",
'custom-missing-tags',
"Add 'tags' to pool to select appropriate agents"
))
# Install PyYAML
pip3 install PyYAML
# Or with homebrew Python
python3 -m pip install PyYAML
# Make scripts executable
chmod +x scripts/*.sh scripts/*.py
Check the documentation:
docs/azure-pipelines-reference.md for syntax referenceTo improve this skill:
This skill is part of the DevOps Skills collection.
For issues, questions, or contributions:
docs/ directoryexamples/ directoryRemember: This skill validates Azure Pipelines configurations but does not execute pipelines. Use Azure DevOps Pipeline validation or Azure CLI for testing actual pipeline execution.
docs/azure-pipelines-reference.md (opens in a new tab)examples/basic-pipeline.yml (opens in a new tab)examples/deployment-pipeline.yml (opens in a new tab)examples/docker-build.yml (opens in a new tab)examples/multi-platform.yml (opens in a new tab)examples/template-example.yml (opens in a new tab)examples/test-with-issues.yml (opens in a new tab)scripts/check_best_practices.py (opens in a new tab)scripts/check_security.py (opens in a new tab)scripts/python_wrapper.sh (opens in a new tab)scripts/validate_azure_pipelines.sh (opens in a new tab)scripts/validate_syntax.py (opens in a new tab)scripts/yamllint_check.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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-plugin31 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-generatorComprehensive toolkit for generating best practice Azure DevOps Pipelines following current standards and conventions. Use this skill when creating new Azure Pipelines, implementing CI/CD workflows, or building deployment pipelines./bash-script-generatorComprehensive toolkit for generating best practice bash scripts following current standards and conventions. Use this skill when creating new bash scripts, implementing shell automation, text processing workflows, or building production-ready command-line tools./bash-script-validatorComprehensive toolkit for validating, linting, and optimizing bash and shell scripts. Use this skill when working with shell scripts (.sh, .bash), validating script syntax, checking for best practices, identifying security issues, or debugging shell script problems./dockerfile-generatorComprehensive toolkit for generating production-ready Dockerfiles following current standards and best practices. Use this skill when creating new Dockerfiles, implementing containerization for applications, or optimizing existing Docker builds.