Loading...
Loading...
Diagnose Harness pipeline executions via MCP. Analyzes any execution (failed or successful) to produce structured reports with stage/step breakdown, timing, bottlenecks, failure details, chained pipeline drill-down, and execution logs. Use when asked to debug a pipeline, investigate a failure, find out why a build failed, analyze pipeline errors, check execution logs, review execution performance, or find bottlenecks. Trigger phrases: debug pipeline, pipeline failed, why did my build fail, analyze failure, pipeline error, execution logs, fix pipeline, execution bottleneck, slow pipeline.
npx skill4agent add harness/harness-skills debug-pipelineCall MCP tool: harness_diagnose
Parameters:
pipeline_id: "<pipeline_identifier>" # or execution_id or url
org_id: "<organization>"
project_id: "<project>"Call MCP tool: harness_diagnose
Parameters:
execution_id: "<execution_id>"
org_id: "<organization>"
project_id: "<project>"
summary: false # raw diagnostic payload
include_yaml: true # include pipeline definition
include_logs: true # include failed step logs
log_snippet_lines: 120 # tail N lines per step (0 = unlimited)
max_failed_steps: 5 # cap number of steps to fetch logs for| Parameter | Default | Description |
|---|---|---|
| -- | Specific execution to analyze |
| -- | Fetch latest execution for this pipeline |
| -- | Harness UI URL (auto-extracts IDs) |
| true | Structured report (true) or raw payload (false) |
| false (summary) / true (raw) | Include pipeline YAML definition |
| false (summary) / true (raw) | Include failed step logs |
| 120 | Max log lines per step (tail). 0 = unlimited |
| 5 | Max steps to fetch logs for. 0 = unlimited |
Call MCP tool: harness_status
Parameters:
org_id: "<organization>"
project_id: "<project>"Call MCP tool: harness_list
Parameters:
resource_type: "execution"
org_id: "<organization>"
project_id: "<project>"
search_term: "<pipeline name>"Call MCP tool: harness_get
Parameters:
resource_type: "execution"
resource_id: "<execution_id>"
org_id: "<organization>"
project_id: "<project>"Call MCP tool: harness_get
Parameters:
resource_type: "execution_log"
resource_id: "<execution_id>"
org_id: "<organization>"
project_id: "<project>"Call MCP tool: harness_get
Parameters:
resource_type: "pipeline"
resource_id: "<pipeline_identifier>"
org_id: "<organization>"
project_id: "<project>"## Pipeline Failure Analysis
**Pipeline:** <name>
**Execution:** <id>
**Failed At:** <timestamp>
### Failure Summary
**Stage:** <failed_stage>
**Step:** <failed_step>
**Error:** <error message>
### Root Cause
<explanation>
### Fix
**Immediate:** <specific steps>
**Prevention:** <how to avoid in future>harness_diagnoseharness_diagnoseharness_statusharness_diagnoseharness_diagnoseharness_diagnoseinclude_logs: true