pipeline-validator
Validate CI/CD pipelines after PR creation. Discovers pipelines, triggers runs, monitors status, diagnoses failures, applies auto-fixes, and retries. Use after any change-making skill creates a PR that needs pipeline validation.
- License 许可
- MIT
- 最近更新
- 2026-03-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- pipeline-validator
- model
- claude-sonnet-4-5
- agents
- [ "devops", "implementer", "qa" ]
- license
- MIT
- metadata
- { "version": "1.0.0" }
- description
- Validate CI/CD pipelines after PR creation. Discovers pipelines, triggers runs, monitors status, diagnoses failures, applies auto-fixes, and retries. Use after any change-making skill creates a PR that needs pipeline validation.
02 资源文件 1
- 参考文档references/error-patterns.md4.9 KB
03 SKILL.md 正文
Pipeline Validator
Post-PR pipeline validation workflow. Discovers pipelines, triggers runs, monitors completion, diagnoses failures, applies fixes, and retries until all pipelines pass.
Triggers
| Trigger Phrase | Operation |
|---|---|
validate pipelines |
Full 8-step workflow |
discover pipelines |
Step 1: Find pipeline definitions |
trigger pipeline runs |
Step 3: Queue pipeline runs |
monitor pipeline status |
Step 4: Poll for completion |
diagnose pipeline failure |
Step 5: Analyze failure logs |
When to Use
Use this skill when:
- A PR has been created and needs pipeline validation before merge
- Pipeline runs have failed and need diagnosis
- Auto-fix and retry cycles are needed for transient or known failures
- Any change-making skill (e.g.,
windows-image-updater) needs post-PR validation
Process
Step 1: Discover Pipelines
- Scan the repository for pipeline definition files:
.azure-pipelines/*.yml.pipelines/*.ymlbuild/**/*.yml- Root-level
azure-pipelines.yml
- Classify each pipeline by type: PR Build, Buddy Build, Buddy Release, Other
- Record pipeline names and file paths
Step 2: Identify Target Pipelines
- Filter to pipelines triggered by PR events or manual dispatch
- Exclude pipelines that are disabled or have path filters excluding the changed files
- Produce a target list with pipeline name, type, and definition path
Step 3: Trigger Pipeline Runs
- For each target pipeline, trigger a run against the PR branch
- Use Azure DevOps REST API or
az pipelines runCLI - Record the run ID and URL for each triggered pipeline
- Update the PR description with pipeline run links
Step 4: Monitor Pipeline Status
- Poll each pipeline run at 60-second intervals
- Track status transitions: Queued, Running, Completed
- Set a timeout of 120 minutes per pipeline run
- Report intermediate status updates as PR comments (at 5-minute intervals)
Step 5: Diagnose Failures
For each failed pipeline run:
- Download the run logs
- Match log content against known error patterns (see error-patterns.md)
- Classify the failure:
- Auto-fixable: Known pattern with a documented fix
- Transient: Infrastructure flake, retry without changes
- Investigation required: Unknown pattern, escalate to human
Step 6: Apply Auto-Fixes
For auto-fixable failures:
- Apply the documented fix from the error pattern catalog
- Commit the fix to the PR branch with a descriptive message
- Push the commit
Step 7: Retry
- Re-trigger failed pipelines after fixes are applied
- Track retry count per pipeline (maximum 3 retries)
- If a pipeline fails after 3 retries, mark it as requiring investigation
Step 8: Report Results
Update the PR description with a summary table:
## Pipeline Validation Results
| Pipeline | Type | Status | Retries | Run Link |
|----------|------|--------|---------|----------|
| PR Build | PR | Passed | 0 | [Run #123](url) |
| Buddy Build | CI | Passed | 1 | [Run #124](url) |
| Buddy Release | CD | Passed | 0 | [Run #125](url) |
Constraints
- Maximum 3 retry attempts per pipeline
- 120-minute timeout per pipeline run
- Do not auto-fix failures that modify production configuration
- Always update the PR description with run links before monitoring
- Log all diagnosis results, even for passing pipelines
Composability
This skill is designed to be invoked by any skill that creates a PR needing pipeline validation. The calling skill creates the PR. This skill validates it.
Example integration:
windows-image-updatercreates a PR with image updatespipeline-validatoris invoked with the PR numberpipeline-validatordiscovers, triggers, monitors, and reports
Any future migration skill (e.g., .NET version upgrades) can follow the same pattern.
See Also
| Document | Content |
|---|---|
| error-patterns.md | 12-category error diagnosis catalog |
windows-image-updater skill |
Pre-PR change-making skill |
04 同仓库更多 Skills
validation-authority
Treat upstream validators as authoritative. Align local config to them. Use when validation fails unexpectedly, before modifying validator behavior, or when tempted to change upstream tool code.
using-brain-memory
Guidance for using Brain semantic memory effectively. Applies Zettelkasten atomic note principles with observations and relations. Use when deciding whether to query or create notes, structuring note content, or understanding the semantic knowledge graph.
threat-modeling
Structured security analysis using OWASP Four-Question Framework and STRIDE methodology. Generates threat matrices with risk ratings, mitigations, and prioritization. Use for attack surface analysis, security architecture review, or when asking what can go wrong.
taste-lints
Custom lints with agent-readable remediation instructions. Enforces taste invariants (file size, naming conventions, structured logging, complexity) and surfaces errors that agents can act on directly. Use when writing or reviewing code to catch style violations early.
style-enforcement
Validate code against style rules from .editorconfig, StyleCop.json, and Directory.Build.props. Detects line ending violations, naming convention issues, indentation problems, and charset mismatches across C#, Python, TypeScript, and JavaScript. Produces JSON reports for pre-commit hooks and CI pipelines.
steering-matcher
Match file paths against steering file glob patterns to determine applicable steering guidance. Use when orchestrator needs to inject context-aware guidance based on files being modified.