yaml-pipeline-validator
Validate and lint Azure Pipelines YAML with best practices checks. Use when validating pipeline syntax or ensuring pipeline quality.
When & Why to Use This Skill
This Claude skill provides automated validation and linting for Azure Pipelines YAML configurations. It ensures pipeline quality by checking syntax, enforcing security best practices like secret management, and offering optimization suggestions for performance and reliability within the DevOps workflow.
Use Cases
- Syntax Validation: Automatically detect and fix YAML syntax errors before committing changes to prevent pipeline breaks and deployment failures.
- Security Auditing: Identify hardcoded secrets or sensitive information within scripts and migrate them to secure Azure variable groups.
- Performance Optimization: Implement caching strategies and parallel job execution to significantly reduce build times and resource consumption.
- Best Practice Compliance: Verify mandatory fields such as triggers and pool settings to ensure all pipelines meet organizational and industry standards.
| name | yaml-pipeline-validator |
|---|---|
| description | Validate and lint Azure Pipelines YAML with best practices checks. Use when validating pipeline syntax or ensuring pipeline quality. |
YAML Pipeline Validator Skill
Azure Pipelinesの YAML検証を行うスキルです。
主な機能
- 構文検証: YAMLシンタックスチェック
- ベストプラクティス: 推奨設定確認
- セキュリティ: シークレット露出チェック
- パフォーマンス: 最適化提案
検証項目
1. 必須フィールド
# ❌ Bad: トリガーなし
pool:
vmImage: 'ubuntu-latest'
# ✅ Good
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
2. シークレット管理
# ❌ Bad: ハードコード
steps:
- script: echo "Password: MySecretPassword123"
# ✅ Good: 変数グループ使用
variables:
- group: Secrets
steps:
- script: echo "Password: $(SecretPassword)"
3. キャッシュ使用
# ✅ Good: 依存関係キャッシュ
steps:
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
path: $(npm_config_cache)
- script: npm install
4. 並列実行
# ✅ Good: 並列ジョブ
jobs:
- job: TestLinux
pool:
vmImage: 'ubuntu-latest'
steps:
- script: npm test
- job: TestWindows
pool:
vmImage: 'windows-latest'
steps:
- script: npm test
Azure CLI検証
# YAML検証
az pipelines validate \
--repository myrepo \
--branch main \
--path azure-pipelines.yml
バージョン情報
- Version: 1.0.0